I purchased a gaming laptop nearly eighteen months ago and I was so happy and hyped about it until it started to overheat and give me bluescreens of death. I searched a lot on google and Acer’s community for a fix, but unfortunately, there was none. After so many attempts to fix it, I figured out that the discrete Graphics Card (Nvidia 1660Ti) was causing the problem whenever the laptop was running on Battery. Therefore, I decided to disable the GPU whenever I was using the laptop on battery, but it was taking a lot of my time (probably 15 seconds every time) and if you know me you’ll probably already know that I don’t love wasting time(😁). So I figured out one way to disable it automatically whenever I remove the charger and enable it otherwise.
What do you need to do?
1. Write two simple PowerShell scripts to disable and enable your GPU(or any other device)
2. Find the event logged when you plug and unplug your power adapter using Windows Event Viewer.
3. Attach a task to each Event using TaskScheduler
No need to worry, the script is already there all you have to do is replace the InstanceID with your GPU’s(or any other devices) Instance ID without removing the quotations.
pnputil /disable-device "InstanceID"
pnputil /enable-device "InstanceID"
press Windows Key + R to open Run.
select the device you want (for me it’s Nvidia Geforce GTX 1660Ti)
Now your Scripts are ready. Next, we are going to Log the power plug and unplug events.
Now, we need to know which event is being logged when we plug and unplug the charger. For that, we have to head to the Windows event viewer. Follow me:
- open Run again, press Windows Key + R
eventvwr.mscand press enter
- head to windows logs -> System
- now plug and unplug your charger multiple times (two to three is enough) to see the event that’s being logged.
refresh the list by pressing F5 and you’ll see multiple events with the “Kernel-Power” source.
there you’ll see something like
The first one is for the event that’s raised when you plug in the power and the other one is for unplugging the power (if yours is any of the two don’t worry the other one is the event below or above it).
Now we have found the event, the next step is to attach a task to each of the events. Here, I'm only going to attach a task to the unplugging event, but you’ll need to do it for the plugging too. Don’t panic, it’s the same step except that you have to attach the enable script to the plugging task instead of the disable script.
- Give the task any name you wish (I’m choosing DisableGPU) and press next
Powershell.exein the “Program/Script” filed
Hooray 🎉🎉🎉, now your laptop will automatically disable the GPU whenever you remove the power cord but don’t forget you need to automatically turn it back on by attaching the plug event to a task that runs enable GPU script.