I have a Toshiba Satellite laptop and the power is playing up.
The battery will charge whilst the computer is off. Once running it shows as running on AC power accurately but the battery slowly discharges and when it gets to 0% cuts the power. To get it to charge I sometimes have to take out the battery, unplug the cable and the reconnect - sometimes it charges no problem.
Very occasionally it shoes as charging whilst on.
Is it likely to be:
a software problem? ( I have tried a system restore back to January when I was not aware of a problem)
a battery problem solved by a new battery?
a hardware problem with the laptop? (I have tried blowing out the contacts on battery and laptop with an air duster)
From what you say I'm almost sure it is a hardware problem with the laptop.
My reason would be that though more sophisticated than the cheapest of battery chargers, the more important voltage regulation is done inside the laptop, so that one system ensures accurate voltages regardless of whether it is supplied via the mains or the laptop's own battery.
There is almost certainly a spring loaded tang in the socket which makes/breaks a circuit when the charger unit is plugged in and then perhaps some voltage regulating circuit which decides which source provides the power.
If you have an aerosol of switch or tape head cleaning fluid, it might (used with care) do the job. If you do use it, then allow plenty of time for the spare solvent to evaporate before switching on.