I've had this problem with my Lenovo g510 where the battery performs perfectly normally, but if I run the battery down, the computer's AC adapter won't charge the battery unless I have the computer plugged into an external display. If the display is unplugged, it won't charge, but if it is plugged in the computer will charge the battery regardless of whether the display is powered on or off. It's been fine, except that because of the necessity of being near an external display, I've put undue stress on the AC connection to the computer, and that is not even working now. I believe that I can take the laptop apart and fix the AC adapter port or replace it, but I've never done anything so invasive with a laptop before. I like the computer--the size of the screen and body, the proportions of the keyboard, the weight, etc. So I'd like to get it working again and not just transfer the HDD to an external enclosure.
But here's where things get weird. Before I realized that I could get my battery charged by plugging in an external display, I bought a cheap Dell E5500 laptop with a dead battery. Bought a new battery from Newegg, and everything was fine. About three weeks after starting to use this laptop and moving files, updating, installing peripherals, etc., the battery stopped recharging. As a joke, I decided to plug in a display, and BAM! it started charging again. This has been going on for weeks, and it will ONLY charge if it's attached to a secondary display, just like the Lenovo G510. I'm really perplexed. I've never experienced anything like this in all of the ~20 laptops I've used either personally or for work, and now I have this same strange problem with two laptops from two different companies. Any ideas about what might be going on?