The laptop turns off when unplugged even though the battery is plugged in.
1. Bad battery.
2. Faulty motherboard.
Possible troubleshooting steps and repair solution:
First of all, take a look at the battery icon in the lower right corner of the desktop. If there is a red cross on the battery icon, the laptop doesn’t see the battery and because of that, it shuts down when you unplug the power adapter. Try reconnecting the battery, maybe it’s not making good contact with the motherboard. Reconnecting the battery might help.
If reseating the battery doesn’t help, most likely you have a bad battery and it has to be replaced.
Also, this problem could be related to the motherboard failure, but you cannot tell which one is causing the problem the battery or motherboard until you test the laptop with another good battery.
If replacing the battery doesn’t help, you have a motherboard problem. Replace the motherboard or use the laptop as is, just on AC power.