question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Enable / disable dGPU when it should not be active

See original GitHub issue

First of all let me say thank you for this project! It’s hard to believe this didn’t exist a couple of months ago.


Is your feature request related to a problem? Please describe.

Sometimes the dGPU will stay active after Advanced Optimus switches cards (from dGPU to iGPU); some apps keep using the dGPU even through they shouldn’t. Similar tools already implement fixes for this: https://github.com/BartoszCichecki/LenovoLegionToolkit#deactivate-discrete-nvidia-gpu

Describe the solution you’d like

Implement a way to force stuck apps to move to the iGPU, either by killing them (could be bad); or disabling/enabling the dGPU temporarily (good if no critical process is using it).

Describe alternatives you’ve considered

I have a small script to do the latter for me:

pnputil /disable-device "PCI\VEN_10DE&DEV_2860&SUBSYS_14731043&REV_A1\4&17526e30&0&0008"
timeout /nobreak /t 3 > NUL
pnputil /enable-device "PCI\VEN_10DE&DEV_2860&SUBSYS_14731043&REV_A1\4&17526e30&0&0008"
timeout /nobreak /t 3 > NUL

Could be nice to have a button (e.g. in the “Extra” window) to do this for us, conditioned by the fact that the dGPU is not driving the display (and other conditions maybe?).

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
danielrscommented, Jun 15, 2023

We can reopen if we desire to explore this again 😃

1reaction
seergecommented, Jun 15, 2023

@danielrs hello.

Restart GPU (via pnputil) is already in g-helper actually, but app offers to run it only as a last resort if switching to “Eco” mode (i.e. powering dPGU off) is refused by bios on first attempt. This is quite “invasive” operation (windows could BSOD from that even) and I’m not sure if it’s a very good idea to add it as a publicly accessible button somewhere in UI 😃

But you can manually execute this operation (in powershell as admin)

$device = Get-PnpDevice | Where-Object { $_.FriendlyName -imatch 'NVIDIA' -and $_.Class -eq 'Display' }; Disable-PnpDevice $device.InstanceId -Confirm:$false; Start-Sleep -Seconds 3; Enable-PnpDevice $device.InstanceId -Confirm:$false

Killing apps using GPU is also implemented in the app (under Extra), but it’s executed prior to setting “Eco” mode as well (again to help bios to power off GPU)

That button could be added to the UI (it’s even in the poll for new features https://github.com/seerge/g-helper/discussions/583 )

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to disable the dGPU while plugged in : r/ZephyrusG14
plug in the laptop (dGPU starts by default) · open Device Manager · under "Display adapter", check your dGPU (NVIDIA GeForce RTX 3060...
Read more >
dGPU not turning off when not used / Kernel & Hardware ...
Hello,. I have a ThinkPad P52 with an Nvidia Quadro P1000 GPU. I have the laptop run in hybrid mode to use the...
Read more >
Configuring hybrid GPU laptop to only use dGPU when ...
I don't think it will relate to my old dGPU. ... It can be active or suspended ,activate means is powered on,otherwise it...
Read more >
iGPU + dGPU not working on Windows 11
Hello, I have an issue since I updated to Windows 11 (it worked fine on Windows 10) : games freeze on startup when...
Read more >
Solved: dGPU Switch and Freeze Problem
The problem can be solved by either disabling Intel GPU, which forces the system to always work with NVIDIA, or disabling NVIDIA GPU....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found