My iPhone on charges when locked
My iPhone only charges when locked
My iPhone only charges when locked
What happens when you unlock it? When it is unlocked, are you moving it around? It could be a problem with the charging cable. You can check the troubleshooting steps here regarding charging issues. If your iPhone or iPod touch won't charge - Apple Support
My iPhone on charges when locked