My iphone won't charge with my usb cable?

I have a usb cable which i always use to charge with my wall charger. Yesterday i wanted to charge my iphone 4s with it but suddenly it didn't work. No alert, no warning; nothing. Then i turned my phone off and i plug the usb cable in. And my phone turned on without i pressed the power button! I know the usb cable is working and maybe the problem is in my phone software. Anybody know how to fix this? What kind of software can fix my phone? Ps: it's jailbroken.

Get a new one