The first solution could be to update the BIOS of your laptop. It should really work if it doesn't then go to the "power setting" then go to change the plan settings, then find the change advanced power settings. The dialog box opens in the multimedia option, click open playing videos and there change the plugged-in option to balanced.
Hoping that this solves your problem
Thanks!
Hi everyone,
So I've been having a problem with my asus R558U. Whenever I plug my charger in my laptop begins to lag every 10 minutes or so. I have noticed this started to happen while I was playing some games : my fps drops from 120 or so to 2-10 which is very annoying. I have cleaned the fan and adjusted my battery settings. I don't know what to do please help.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic