Power Management Software Problem
Sometimes, the problem is merely with the software. This is the classic case, when the laptop charges when switched off, but doesn't, when the computer has booted. The software may have gotten corrupted, which might be causing the problem.