Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursion issue when using display version #1

Open
HunterAhlquist opened this issue Jun 15, 2023 · 1 comment
Open

Recursion issue when using display version #1

HunterAhlquist opened this issue Jun 15, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@HunterAhlquist
Copy link

Hi, I'm trying to use this when plugging in my eGPU. I want to disable both my iGPU and dGPU when plugged in, and enable when unplugged. It works with the former, but the latter causes the display version of the script to trigger continuously (until some kind of OS limit is hit I'm guessing.)
The first assumption would be to use the power trigger version, but since this is a laptop, I often plug into a charger without docking capabilities.
I had to uninstall to return to normal and I accidentally deleted my scripts in the process, but I just used powershell to enable/disable the devices.

Maybe these trigger scripts should have exclusions settings for specific display devices? Not sure if that would be possible.

@Lulech23 Lulech23 added the enhancement New feature or request label Jun 16, 2023
@Lulech23
Copy link
Owner

I'm going to treat this as a feature request rather than a bug. While it's an interesting use-case to solve, I have no way of reproducing it without the same setup, and I suspect it would be difficult to address universally.

Changing the primary GPU shouldn't cause attached monitors to be reported any differently, so something unusual seems to be going on here. It might be that re-enabling the built-in GPUs causes a temporary disconnect of the internal monitor, which would trigger OnDock. And if your OnDock is disabling the built-in GPUs when the number of monitors changes, that's how you'll get your loop.

If you wanted to gain insight on what's happening, you could run this PowerShell code to log the changes while plugging/unplugging:

while ($true) { Write-Host ""; Get-PnpDevice | Where-Object {($_.Class) -like "Monitor"}; Start-Sleep 1 }

Honestly, the correct solution here is to not disable the iGPU. Even though it's a popular thing to do among eGPU enthusiasts, it's outdated advice at this point. Windows and your GPU drivers are designed to have an iGPU for desktop composition while the eGPU does the heavy lifting. Disabling it forces dependency on the eGPU that can break things when disconnected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants