@pasture
It would be a good idea to have a look on xda forums for whatever phone you have, to see if anyone else had similar problems.
If the phone is older and doesn't get regular Android updates anymore, a software issue is indeed unlikely, but doesn't hurt having a quick look on xda. But even as a hardware issue, that's really odd.