Turning off the discrete GPU to save power

This post is for friends who rarely shut down their desktop and often remote into it to work.

My daily workstation and gaming rig are the same machine, with a 4K 144 Hz monitor. I normally leave the discrete GPU on just to make everyday interactions smoother, but power draw is noticeably higher.

The wattage in the screenshots below also covers an always-on J4125 mini-host that idles around 18 W, so take the numbers with a grain of salt.

Without any games running, simply moving the mouse vigorously on the desktop can spike consumption to 192 W.

After disabling the discrete GPU, refresh rate drops to 60 Hz and the peak falls to roughly 120 W.

When I tunnel home from outside, I use an entry-level Tencent host that’s bandwidth-constrained—remote refresh is only 30 Hz. Under these conditions the dGPU is pointless, so switching to the iGPU is worthwhile.

Most of the time I skip traditional remote desktop altogether and instead connect via VS Code’s Remote-SSH. It’s stealthy, bandwidth-efficient, and feels almost like local development.

While editing code normally, power sits around 72 W—better than the 120 W seen with the dGPU still enabled.

When coding through remote ssh, you can shut the dGPU off with a quick script.

Save it as switch_dedicate_graphic_cards.ps1 and run switch_dedicate_graphic_cards.ps1 off.

# Usage: switch_dedicate_graphic_cards.ps1 on|off

# Get parameters
$switch = $args[0]

# exit if no parameter is passed
if ($switch -eq $null) {
    Write-Host "Usage: switch_dedicate_graphic_cards.ps1 on|off" -ForegroundColor Yellow
    exit
}

# Get display devices
$displayDevices =  Get-CimInstance -Namespace root\cimv2 -ClassName Win32_VideoController

# If there is no display device or only one display device, exit
if ($displayDevices.Count -le 1) {
    Write-Host "No display device found."
    exit
}

# Get dedicated graphic cards
$dedicatedGraphicCards = $displayDevices | Where-Object { $_.Description -like "*NVIDIA*" }

# If there is no dedicated graphic card, exit
if ($dedicatedGraphicCards.Count -eq 0) {
    Write-Host "No dedicated graphic card found."
    exit
}

# turn dedicated graphic cards on or off
if ($switch -eq "on") {
    $dedicatedGraphicCards | ForEach-Object { pnputil /enable-device $_.PNPDeviceID }
    Write-Host "Dedicated graphic cards are turned on."
} elseif ($switch -eq "off") {
    $dedicatedGraphicCards | ForEach-Object { pnputil /disable-device $_.PNPDeviceID }
    Write-Host "Dedicated graphic cards are turned off."
} else {
    Write-Host "Invalid parameter."
    Write-Host "Usage: switch_dedicate_graphic_cards.ps1 on|off" -ForegroundColor Yellow
}