Skip to content

Resolution change bug (with Virtual Display) #92

@edel79

Description

@edel79

Hello,

I have a bug when I want to change the resolution of my remote pc, on which I don't have any screen connected to, so I use the famous Virtual Display Driver by MTT.

At first, after the installation of your script, it is working, the initial screen resolution change is working... but not totally.
In fact during the resoultion change, the script is hanging at a point I don't understand. It seems related to the refresh rate, indeed here is the end of the initial run (the full one is attached to this tkcket) :

DÉBOGUER : Function Assert-ResolutionChange called with Width: 1920, Height: 1200, Refresh: 60
...
DÉBOGUER : Attempt number: 12
DÉBOGUER : Function Get-HostResolution called
DÉBOGUER : devMode.dmSize: 220
DÉBOGUER : Current modeNum: -1
DÉBOGUER : Current devMode.dmPelsWidth: 1920
DÉBOGUER : Current devMode.dmPelsHeight: 1200
DÉBOGUER : Current devMode.dmDisplayFrequency: 60
DÉBOGUER : Current host resolution: 1920 x 1200 x 60
DÉBOGUER : Refresh difference: 0

And just above that :

DÉBOGUER : Match found. Attempting to change resolution.
Resolution changed successfully.

As stated, this is the 12th and last attempt to change the resolution (already done), after that litteraly nothing occurs, the script is hanging, preventing every further action until this one is closed manually through the task manager.

Until that, the next attemps ends up with :

Exiting: Another instance of the script is currently running.

the previous one.

Here are the virtual screen resolution definitions I use :

_<global>
	<!--These are global refreshrates, any you add in here, will be replicated to all resolutions-->
	<g_refresh_rate>60</g_refresh_rate>
	<g_refresh_rate>90</g_refresh_rate>
	<g_refresh_rate>120</g_refresh_rate>
	<g_refresh_rate>144</g_refresh_rate>
	<g_refresh_rate>165</g_refresh_rate>
	<g_refresh_rate>244</g_refresh_rate>
</global>

    <resolution>
        <width>1920</width>
        <height>1080</height>
        <refresh_rate>30</refresh_rate>
    </resolution>
    <resolution>
        <width>1920</width>
        <height>1200</height>
        <refresh_rate>30</refresh_rate>
    </resolution>_

With that on the Windows display settings I can see these two resolutions among others, and all the refresh rates from 30 to 244.

Can you telle me what's wrong ?

log_1740161580.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions