It doesn't sound like an easy fix, which would be software. No it sounds more like a hardware issue, which really wouldn't be something you could fix on your own.
Your best bet is to take it to a tech to have it looked at, that is if you need anything from it. Even then there is no guaranty that they will be able to resolve the problem. If you don't need anything from it, then considering that it is already a few years old, you may want to look at getting a new device. Especially if they say it will cost much for the repair.
After reading your problem, I am sure that this is not any software issue this is a hardware issue, it seems like there is some problem in your motherboard so you have to replace the motherboard which will cost you very high as whole phone structure is dependent on motherboard as all parts are embedded pon it so it's better to buy a new phone.