iPhone 4s volume bar disappearing

I have a iPhone 4s 64GB for 3 1/2 years now. A few weeks ago, my volume bar randomly wasn't showing up when I tried pressing the + or - button on the phone itself.

Also, the volume bar was "grey texted" when opening the music app and it was completely gone opening the screen where you swipe from down the screen.

enter image description here

enter image description here

The problem fixed itself when I had the phone charged over 30% battery power and restarted the phone a few times.

When i'm getting a phone call or setting the timer, the speaker just works, no problems.

When I have a headphone plugged in, the sound also works normally.

When setting the option on to that i can set the calling sound with my volume buttons, the volume buttons work fine.

enter image description here

Questions

How does this come and how can i solve this problem??


There might be lint in the headphone jack. The lint is partially blocking the contacts, which is causing intermittent behaviour.

Get a wooden toothpick. Use the toothpick to remove lint. Be gentle.

Some people suggest using a can of compressed air. This is potentially bad because lint can be blown further INTO the device.

If you need more information about cleaning your phone, there are various online sites that can help.


This happened to us with an old iPad 2. Specifically, there was some built-up grime in the dock connector/power cord port. It was so bad that the iPad thought what it was sporadically connected to a docked peripheral (like an alarm clock). When you do not see the volume bar, it's because your device thinks that it should delegate volume control to the dock. It would happen randomly to us.

The way we fixed it was to repeatedly plug in and pull out a power connector (unpowered of course), which had the effect of scraping the leads clean. However, there are other ways to clean the port like the ways suggested here: http://www.cnet.com/how-to/use-a-toothpick-to-clean-out-your-iphone/