Skip to main content

How to Lock or Fix Screen Resolution on Windows Server 2022 VPS

Learn how to lock screen resolution on your VPS and prevent display shifts using fixed settings, registry edits, and fullscreen mode.

Updated over a week ago

If your VPS resolution changes unexpectedly or appears locked to an unfamiliar size, you’re not alone. This behavior is tied to how Windows Remote Desktop Protocol (RDP) handles screen resolution and scaling.

Why This Happens

Windows RDP dynamically adjusts the screen resolution based on the display properties of the first device that connects to the server.

This can also happen if you access your VPS from multiple devices with different screen sizes or scaling settings (e.g., switching between a laptop and an ultrawide monitor).

Fortunately, the fix is simple:

🔁 Just restart your VPS and reconnect from your preferred device — the display will automatically re-adjust to your screen size.

If you want to lock a fixed resolution regardless of the device used, follow one of the methods below.

Option 1: Set a Fixed Resolution via RDP Client

  1. Open the Remote Desktop Connection app on your local machine

  2. Click Show Options → go to the Display tab

  3. Use the slider to choose your desired resolution

  4. (Optional) Save your settings as a .rdp file for future sessions

  5. Connect to your VPS — the resolution will match what you selected

Option 2: Use a Custom .RDP File (Advanced)

  1. Save your .rdp session to a file

  2. Open it in Notepad

  3. Add or confirm the following lines (replace values as needed):

desktopwidth:i:1920 desktopheight:i:1080

Save the file and connect using it for consistent resolution

Option 3: Use Group Policy to Disable Dynamic Resizing

  1. Press Win + R, type gpedit.msc, and hit Enter

  2. Go to:

    Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Remote Session Environment

  3. Double-click Limit maximum display resolution

  4. Set to Enabled, specify resolution (optional), click Apply

⚠️ Use this method only if you require fixed display sizes across all connections.

Option 4: Manually Set Resolution via Registry Editor (Advanced)

If your resolution settings are missing or unresponsive:

  1. Press Win + R, type regedit, and press Enter

  2. Navigate to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration

  3. Expand each entry under Configuration

  4. Locate your active display adapter profile

  5. Right-click and modify the resolution values as needed (you may see PrimSurfSize.cx and PrimSurfSize.cy for width and height)

  6. Close the Registry Editor and restart your VPS

⚠️ This method requires care. Always back up the registry before making manual edits.


Bonus Tip: Use Fullscreen Mode to Prevent Window Shifting

If you’re running trading platforms, charts, or terminal-based software inside your VPS, you may notice that windows shift position or resize slightly when you disconnect and reconnect — even with a fixed resolution set.

To reduce layout disruptions:

  • Always launch Remote Desktop in fullscreen mode

  • Avoid resizing the window or minimizing the session mid-use

Why this helps:

When you use fullscreen, Windows maintains a consistent virtual display size across sessions. This prevents open applications inside the VPS from snapping or shifting due to resolution detection changes during reconnection.

💡 Fullscreen mode can be enabled from your RDP client’s display settings or by pressing CTRL + ALT + BREAK while connected.

This is especially useful for traders, analysts, or developers who rely on precise window layouts across multiple monitors or when running charting tools like NinjaTrader, Quantower, or StrategyQuant.

Did this answer your question?