Speaker not working properly!

My samsung galaxy captivate is a second hand and its speaker seemed to work fine for a few days and now suddenly it doesnt work without a pat on the back which is only a temporary solution. I tried the one that says that i have to loosen a screw and it works fine, but it doesnt. I am searching for a more permanent solution.