Hello, can you specify on how does it appear?
Does it display a message You're about to be signed out or just shuts down immediately?
If your laptop shuts down immediately when you remove your DC charger, then there is likely a problem with your battery, try these :
- Reseating your battery
- Try to power on your laptop without charging it and see if it can turn on
If those action fails then you might want to try changing the battery, make sure you use the original battery.
If you're still under warranty, you may use it.
Check this post for more information : https://h30434.www3.hp.com/t5/Notebook-Software-and-How-To-Questions/Laptop-shuts-down-when-I-unplug...