Windows Server 2022 DPI Scaling Issues via RDP & Horizon
Windows Server 2022 users have recently encountered a perplexing issue: display scaling anomalies occur whether you’re connecting via RDP or through VMware Horizon (now Omnissa). The anomaly—where visual elements appear either oversized or undersized—has been traced to unusual DPI settings applied by Windows, and it’s disrupting a critical Remote Desktop Services (RDS) environment. Let’s break down the problem, the evidence gathered, and possible approaches to troubleshoot and ultimately resolve these scaling glitches.Understanding the Environment and the Issue
The problem surfaced in an environment running:- VMware Horizon 8 (latest version, now rebranded as Omnissa)
- Windows Server 2022 Datacenter with all current updates
Key Observations:
- Incorrect DPI Values: A look in the registry under HKCU\Control Panel\Desktop\WindowMetrics revealed that on the problematic server, the key AppliedDPI was set to 0x00000078 (120), which corresponds to a 125% scaling setting. Conversely, on a working version of the server, this value was 0x00000060 (96), the standard value for 100% scaling.
- Temporary Resolution: Restoring the affected server from backup seemed to temporarily fix the scaling. However, after a few days, the problem reappeared.
- User Specific Impact: When access was limited solely to the IT department, the scaling issue did not reoccur. This points to a possibility that a specific user (or user action) might be inadvertently triggering the change in scaling configuration.
- Client-Side Requests Ignored: Despite logs from Horizon showing that the client correctly requested the appropriate scaling factor, Windows appears to override those settings, leaving the display improperly scaled even at the ESXi console’s lock screen.
Investigating the Root Causes
When faced with DPI scaling issues in a Windows Server 2022 RDS environment, several factors can contribute to the discrepancies:1. DPI Settings and Registry Tweaks
Windows manages DPI settings not only through display settings but also via registry keys. In our case, the key under HKCU\Control Panel\Desktop\WindowMetrics is crucial. The expected standard is an AppliedDPI value of 96 (100%), but the problematic system was using a value of 120 (125%). This deviation suggests:- User-Initiated Changes: The fact that scaling remains correct when only IT users log in hints that one or more user profiles could be applying custom scaling settings, altering the registry.
- Persistence and Reversion: The temporary fix provided by the backup restoration further indicates that the default state (with the correct DPI setting) is being modified over time—perhaps following a user session where certain display settings are adjusted, either intentionally or inadvertently.
2. RDP and Horizon Agent Behavior
Remote Desktop Protocol and VMware Horizon agents are known to handle DPI scaling in slightly different ways compared to local console sessions. Some important factors include:- Client vs. Server Scaling Negotiation: In optimal setups, the client’s scaling request should be honored by the server, but the logs indicate that while the correct scaling is requested, Windows ends up applying a different setting.
- Agent Versions: The Horizon Agent was reinstalled in an attempt to resolve this, but no change was noted. This could mean that the issue is less about the agent and more about how Windows Server 2022 processes DPI adjustments for remote sessions.
3. Potential Software Bugs or Update-Induced Changes
Given that Windows Server 2022 is continuously updated, it’s not out of the realm of possibility that a recent security patch or feature update might have inadvertently affected how DPI scaling metrics are calculated or applied. A known bug or a regression in recent updates could override client-specific settings with an incorrect default value.Strategies to Diagnose and Resolve the Issue
For IT professionals and system administrators grappling with this puzzle, here are several steps and recommendations that merge both standard troubleshooting methods and insights based on community feedback:A. Registry and Profile Checks
- Inspect User Profiles: Verify which user profiles are in use, and compare their registry settings under HKCU\Control Panel\Desktop\WindowMetrics. It may be that a particular user account—once logged in—introduces a DPI override.
- Baseline Comparison: Since restoring the server from backup temporarily fixes the problem, document the baseline registry settings. You might consider scripting a routine to check or even enforce the correct AppliedDPI value upon user login.
B. RDP and Horizon Configuration Adjustments
- Override Client Scaling Settings: In RDP’s advanced options, there is a setting to override client scaling rules on high-DPI displays. Experiment with these settings to see if they enforce the desired DPI.
- Agent Updates: Even though reinstalling the Horizon Agent did not help this time, remain vigilant for updated versions or patches from VMware/Omnissa that might specifically address DPI handling.
- Session Policies: Consider implementing Group Policy settings that lock out users from altering display scaling properties, thereby maintaining consistent behavior across sessions.
C. Engage Vendor and Community Support
- Microsoft and VMware Support: Because this behavior is observed on the latest versions of Windows Server 2022 and VMware Horizon, raising a support ticket with both vendors could shed light on whether this is a known issue or requires a deeper fix.
- User Community Input: As demonstrated in the Spiceworks community thread, peer insights can be invaluable. Other IT professionals might have identified workarounds or diagnostic techniques that worked in similar environments.
D. Monitor and Document
- Logging and Analysis: Increase logging for sessions where the DPI setting is overridden. Check Windows Event Logs for any entries around display settings modifications.
- Pattern Recognition: Identify if there’s a common factor when the settings revert (for instance, after a specific user logs in or after certain system events). This pattern could help isolate the cause.
Broader Implications for Windows RDS and Remote Display Technologies
The challenges posed by DPI scaling in remote environments are not entirely new. As remote work and virtualized environments become the norm, ensuring a consistent and user-friendly display experience across different devices and network conditions is critical. Issues such as this underscore the importance of:- User Profile Management: Regularly cleaning and standardizing user profiles to prevent unwanted customizations that can affect system behavior.
- Consistent Patch Management: Testing operating system updates in a controlled environment to ensure that changes in DPI or remote connectivity settings do not disrupt production environments.
- Vendor Collaboration: Leveraging vendor support channels and community forums to quickly disseminate information about known issues and potential fixes.
Practical Workaround: A Step-by-Step Guide
Here’s a quick guide that might help administrators temporarily mitigate the issue while a permanent fix is being explored:- Backup Registry Settings:
- Before making any changes, export the current settings from HKCU\Control Panel\Desktop\WindowMetrics.
- Modify the AppliedDPI Value:
- Set the AppliedDPI registry value manually to 96. This can often be done through a login script if the issue seems to recur with particular user profiles.
- Implement a Group Policy:
- If feasible, create a policy that prevents changes to display scaling settings. This may involve locking down parts of the registry or using system configuration policies.
- Test on a Controlled User Account:
- Create a new user account and enforce the correct DPI setting. Monitor the behavior over a few days to see if the issue reappears.
- Revisit RDP and Horizon Settings:
- Check the remote desktop connection settings. Ensure that the "Use all my monitors" and "Optimize for best appearance" options are correctly configured for high-DPI displays.
- Document and Report:
- Keep a log of changes and behaviors. Reporting this systematic diagnostic process to vendors can help expedite a permanent resolution.
Conclusion
The DPI scaling puzzle in Windows Server 2022 via RDP and VMware Horizon illustrates the potential complexities encountered in modern remote desktop environments. With the scaling discrepancy clearly tied to an abnormal registry setting (AppliedDPI shifting from 96 to 120), it’s likely that either localized user configuration changes or overarching system updates are at play.While temporary measures like restoring the server or enforcing IT-only access have shown temporary relief, longer-term resolutions will likely require a concerted effort between system administrators, Microsoft support, and VMware/Omnissa. Continued vigilance on updates and community collaboration remain key.
For Windows professionals facing similar issues, consider a methodical approach: monitor registry settings, evaluate user profile behavior, and fine-tune both RDP and Horizon configurations. And remember—the devil is often in the details, especially when dealing with remote display scaling. By staying informed and methodical, you can keep your Windows Server environments running smoothly even in the face of tricky scaling bugs.
Happy troubleshooting, and may your DPI always be in the right place!
Source: Spiceworks Windows Server 2022 – DPI / Scaling broken via RDP & VMware Horizon