IPhone 5 not charging when idling
This sounds like it may have something to do with the charger cable connection. Before I realized there was lint in my phone's charger port, I was able to sometimes get it to charge when pulling horizontally on the cable.

Check out the phone's lighting port and the laptop's usb ports with a flashlight to see if there is any lint in there blocking the connection