Laptop shutsdown while playing games while plugged

Xerviex

Commendable
Mar 9, 2016
4
0
1,510
It does not shutdown with battery life. It only does when plugged in.

Lenovo G5070-20351
Specs
Intel Core i5 4210U @ 1.70Ghz 2.40Ghz
4GB of ram
64bit windows 8.1(Previously) windows 10(Now)
AMD Radeon HD 8500M


Now for what i think and have done.
No error messages when I open it again. Tried removing the battery but still nothing
The first couple months, I was having no problems while plugged in. But one day, it just suddenly shuts down when plugged in. Very annoying when playing online games.
Note that when I play low demanding games (Plague Inc, Torchlight II) it does not shutdown even when plugged. Only demanding ones (Dota 2, Cs:go)

One fix that I found out myself is play a game and let my battery drain, then when it's drained and shuts off, I charge it. Then I open my laptop and resume to playing my game without any problems. The game and running programs previously was all still there. I don't think it's overheating because someone cleaned my laptop and said not many dust were there. I also have a laptop cooler and it still shuts down.

Another way i temporarily but coincidentally fixed it is when i used system restore. It fixed the problem but after a few days, it was back again. Note that this was a few months after experiencing the problem. Meaning the restore point is only a few days ago while the problem is months ago. I only did system restore because I mistakenly removed my school files. Is it possible that this could be a virus?

Sorry for my lack of knowledge in computers and lack of information if I missed any. I will try my best to asnwer all your questions