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

Problem with Monitor Profile Switcher possibly due to changing adapterID. #163

Open
Ziemniaczenka opened this issue Sep 30, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Ziemniaczenka
Copy link

Ziemniaczenka commented Sep 30, 2024

I want to change between physical displays and virtual display using shortcuts - I'm using Monitor Profile Switcher. It works fine until the PC restarts which I think causes a change in Virtual Display Driver adapterID. MPS probably recognizes displays by it so remote profile stops working.

Is there a way to lock adapterID in Virtual Display Driver?

Profiles:
Home - uses only physical displays, works fine
Remote 1 - uses only virtual display from one PC reset (adapterId LowPart 99241)
Remote 2 - uses only virtual display from different PC reset (adapterId LowPart 99464)

MonitorSwitcher_profiles.zip

@bud3699 bud3699 added enhancement New feature or request help wanted Extra attention is needed labels Oct 9, 2024
@parski
Copy link

parski commented Oct 23, 2024

I use MonitorSwapAutomation and my setup has been broken for a few weeks I think. I'm not sure if my particular issue is due to this, that or the other but I thought I'd add my observation to this issue anyway.

I think it looks like the monitor ID is unchanged but the name is new.

Before reboot:

[Monitor1]
Name=\\.\DISPLAY11
MonitorID=MONITOR\LNX0000\{4d36e96e-e325-11ce-bfc1-08002be10318}\0006

After reboot:

[Monitor1]
Name=\\.\DISPLAY10
MonitorID=MONITOR\LNX0000\{4d36e96e-e325-11ce-bfc1-08002be10318}\0006

@zjoasan
Copy link

zjoasan commented Oct 28, 2024

That's because windows assigns these logicalnames to screens rather "randomly", in order to keep your screen setup the same between boots I suggest you have a script in place that locates the logicalname for the VDD before you use it or rewrite the "swap app" to use monitorID instead of windows Logicalname which will fluctuate.

Example use a powershell module called monitorconfig (found at psgallery), that has the cdm-applet get-monitor:

PS C:\Users\osmc> get-monitor

LogicalDisplay FriendlyName        InstanceName
-------------- ------------        ------------
\\.\DISPLAY1   LCD 1280x800        DISPLAY\LEN4035\4&1993faf7&0&UID67568640_0
\\.\DISPLAY3   Generic PnP Monitor DISPLAY\MTT1337\1&28a6823a&0&UID256
 

This how you'd use this
get-monitor | Where-Object { $_.InstanceName -match "MTT1337" } | Select-Object LogicalDisplay

to get \.\DISPLAY3

@Nonary
Copy link

Nonary commented Oct 31, 2024

That's because windows assigns these logicalnames to screens rather "randomly", in order to keep your screen setup the same between boots I suggest you have a script in place that locates the logicalname for the VDD before you use it or rewrite the "swap app" to use monitorID instead of windows Logicalname which will fluctuate.

Example use a powershell module called monitorconfig (found at psgallery), that has the cdm-applet get-monitor:

PS C:\Users\osmc> get-monitor

LogicalDisplay FriendlyName        InstanceName
-------------- ------------        ------------
\\.\DISPLAY1   LCD 1280x800        DISPLAY\LEN4035\4&1993faf7&0&UID67568640_0
\\.\DISPLAY3   Generic PnP Monitor DISPLAY\MTT1337\1&28a6823a&0&UID256
 

This how you'd use this get-monitor | Where-Object { $_.InstanceName -match "MTT1337" } | Select-Object LogicalDisplay

to get .\DISPLAY3

My monitor swap script restores the IDS every time that way when it changes it wont be impacted, but it broke on 24H2 (which has now been fixed as of 2 days ago)

@parski If you have 24H2, update monitor swap script

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

No branches or pull requests

5 participants