17

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?

2

5 Answers 5

19

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):

  1. Open regedit, navigating to
    HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration
    
  2. Select key starting with SIMULATED, then child key 00
  3. Change the decimal value of PrimSurfSize.cx to the desired horizontal resolution (i.e 1920)
  4. Change the value PrimSurfSize.cy to the desired vertical resolution (i.e. 1080)
  5. Change the value Stride (for 1920x1080 this is 7680: ((1920 * 32 + 7) / 8))
  6. Select the child key of 00, also named 00, and change ActiveSize.cx to the same horizontal resolution value above
  7. Change the value of ActiveSize.cy to the same vertical resolution above
  8. Restart the PC after saving the registry
  9. While you can change the other values in this key that are set to 1024 and 768, I haven't noticed an impact.
3
  • I double checked on Win 11 and the settings seem to be under this node (SIMULATED) again in spite they were moved in Win 10 to NOEDID. So for Windows 11 this is the right answer.
    – Manngo
    Feb 27 at 15:16
  • Hmm, I followed your steps and got 1920x1200. Verified that everything is set to 1080, not 1200, so it's not just a typo. Better than 1024x768, but not ideal. Apr 17 at 10:42
  • Can this work at a UHD resolution, 3840x2160? I have an app that needs to run headless at more than 1920x1200.
    – paulkon
    Jun 30 at 16:59
11

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:

  1. HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\GraphicsDrivers\Configuration\NOEDID_blah_change_me>\00
  2. 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.

3
  • 2
    I'm not going to write as an answer because I'm not adding much - but, FYI to others, you don't need to restart the machine - go to computer management, right click the display adapter and select disable, then, enable it again and it should apply the new resolution. Mar 31, 2021 at 6:00
  • This still works fine as of 2023 Feb. Windows 10 Pro, 22H2. I edited all the keys from the post of Hank Killinger under the NOEDID nodes. Actually this was the only solution that worked for me with remote only access. I could not get the amyuni virtual display installed from an RDP session. (It installed but no display was created while I was on remote. Plus once I got it done the USB display disappeared after restart.)
    – Manngo
    Feb 27 at 15:11
  • Thank you! This worked for me on Win 10 Pro 22H2 as well. The only thing I needed to do after changing the registry keys above (I also updated the Stride to 7680) and rebooting was manually change the resolution from 1024x768 to 1920x1080 from Windows Display settings. Thanks again!
    – bhall
    May 18 at 17:28
4

After much trial and error, the actual fix is to install a virtual monitor. See the link https://www.amyuni.com/forum/viewtopic.php?t=3030

4
  • Welcome to Super User! Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
    – DavidPostill
    Jun 11, 2021 at 6:20
  • 1
    This was the solution. None of the others worked for me. Feb 7, 2022 at 16:02
  • 1
    It works for me too. Feb 14, 2022 at 20:47
  • Doesn't work for me on Windows 11, I get an error "deviceinstaller64 failed" Nov 8, 2022 at 5:53
1

Either this has changed again in the current Win10 (Oct 2021), or it depends on various factors.

I had no "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration" keys starting in "NOEDID", just some (it seems) legacy 'SIMULATED' ones, but they didn't work. Registry spying with Process Monitor revealed it was

"MSNILSIMULATED_1414_008D_FFFFFFFF_FFFFFFFF_0^E05DF7FBE6BC1262616DEB19B2C37C01"

(the numbers may not be essential, just try your 'MSNILSIMULATED_" entry)

0

I am using VNC remote and trying HKLM registry keys did not work for me. However, I tried https://www.amyuni.com/forum/viewtopic.php?t=3030 and it worked like a charm.

However, if you restart the PC, it goes back to the original state. So I guess I have to right a batch file so each time the PC is restarted, it runs the commands and create a second monitor.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .