Setting display resolution beyond 1024x768 with headless Windows 10?
I have a Windows 10 desktop that I run headless. When I plug in a display, it correctly uses that display's native resolution. When I disconnect the display and connect to the computer over VNC, the resolution is locked to 1024x768. There are several places to adjust the resolution (classic Control Panel, new Settings panel, Nvidia control panel) but all fail with various errors along the lines of "settings could not be saved."
Is it possible to change the display resolution to something under than 1024x768 when running headless?
I experienced something similar when trying to stream from a computer that only had network and power connected; here's what worked for me (source):
- Open
regedit
, navigating toHKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration
- Select key starting with
SIMULATED
, then child key00
- Change the decimal value of
PrimSurfSize.cx
to the desired horizontal resolution (i.e1920
) - Change the value
PrimSurfSize.cy
to the desired vertical resolution (i.e.1080
) - Change the value
Stride
(for 1920x1080 this is7680
:((1920 * 32 + 7) / 8)
) - Select the child key of
00
, also named00
, and changeActiveSize.cx
to the same horizontal resolution value above - Change the value of
ActiveSize.cy
to the same vertical resolution above - While you can change the other values in this key that are set to 1024 and 768, I haven't noticed an impact.
It appears that with recent Windows versions the regedit paths had changed. Keys starting with SIMULATED are no longer showing up, but NOEDID are the ones to use (as of October 2020).
I managed to set the resolution by only changing PrimSurfSize.cx and PrimSurfSize.cy in a couple of places:
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\GraphicsDrivers\Configuration\NOEDID_blah_change_me>\00
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\GraphicsDrivers\Configuration\NOEDID_blah_change_me>\00\00
Search for PrimSurfSize.cx and PrimSurfSize.cy and change the NOEDID ones as above, restart the machine.
Good luck. Hope this helps.