Working with Remote Desktop and High DPI issues
Hi, my name is Kim and I herd cats... where cats in this case are High DPI issues. I've been working to get more information out there on DPI issues, like bribing the Product Group to write some awesome technical blogs about the fun of High DPI. (Ok - didn't have to bribe) getting public KB articles and other posts published and fielding questions from various groups on the status of many of the DPI problems. DPI and RDP is one that has come up often of late and I wanted write this to help people have the best possible experience with Windows 10, high resolution monitors and remote desktop connections.
Disclaimer - I know High DPI issues can be pretty complicated and ugly. But many DPI issues can be mitigated. This article isn't meant to address the difficulties in truly fixing DPI issues in code or discuss known bugs. It is meant to offer best practices to result in optimal performance for Remote Desktop sessions using Windows 10 1607 with multiple monitors.
For reference and for examples in this blog, I'm use a Surface Book with a Surface dock connected to a Dell 34" wide 4k monitor. I also connect to several remote systems, both Hyper-V VMs and physical systems. I'll stick with Surface Dock for simplicity and familiarity, but this applies to any high resolution devices and companion hardware.
- Always be up to date
- Get to Baseline before making adjustments, registry hacks, judgements
- Logoff the device
- Setup hardware as you plan use it (connect all monitors, connect to the dock, etc)
- Bad - I am keeping it generic here. DPI behavior can be any combination of large, small, fuzzy or crisp. The blogs go into more depth on general High DPI behavior:
- Display Scaling in Windows 10
- Display Scaling changes for the Windows 10 Anniversary Update
- Local system - the computer making the call
- Remote system - the computer answering the call
- Disconnect - Disconnect breaks the connection between the two systems. It does not logoff the remote session. Everything is left running.
- Logoff - Shuts down all programs running on the system and ends the Winlogon session.
Tools I'm using
- Remote Desktop Connection MSTSC.exe (Win32)
- Remote Desktop Preview (App)
One of the key considerations to avoid or mitigate DPI issues is knowing your scenarios. If you are considering buying a Surface Book, think of how you will be using the device. If it’s a sit-on-couch-binge-Netflix device/take notes in a meeting device, you won't notice any DPI issues. If you get a Surface Dock to go with it and have it docked, lid closed, most of the time, you won't see many DPI issues. But if you move around, dock/undock or connect to other systems via remote desktop protocol (RDP), or both, you'll probably run into Bad behavior.
The Bad behavior comes into play for two reasons. Hardware configuration(monitor) changes or the difference in resolution between the Surface and connected monitors is large. The latter can be addressed by using a monitor that matches or comes close to the resolution of the device. For example, my Surface Book does 3000x2000 and my external monitor does 3440x1440. When I connect to the dock, most applications look fine and will move between the monitors without noticeable burps. To combat the first issue, hardware changes, it is always best to logoff off, connect the dock, then logon and configure the displays as you want to use them. Key: You can return to this baseline at any time by logging off, docking, and logging on.
This is key. Winlogon starts when a user logs on. At that time, the existing hardware configuration is noted and DPI for that session is set. When applications are launched they use this information. When the hardware configuration changes mid-session, DPI is revised, but many applications are (currently) not aware enough to adjust. This is admittedly over-simplifying how it works, but the easiest way to think about it is that DPI is tied to the logon session. Key: If monitors change then create a new windows session = best experience.
Let's say you get a brand new Surface Book and Dock and 4k external monitor to connected to the dock - there's still some housekeeping to do (after you take time to enjoy the unboxing and new device smell - brand new keyboards are awesome and will never be that clean again!) Updates! Every release of Windows 10 has had DPI improvements. It's always best to be at the latest (currently its 1607. Which stands for year 2016, month 07. 1511 was November 2015, the first version, 1507 is July 2015 etc etc. This numbering convention will continue with future releases) Cumulative updates are also important. They typically do not introduce new features but they may provide bug fixes that improve behavior. Then, finally, hardware updates. Firmware updates for the Surface Book/Pro series will come down via Windows Updates. You will also need to check for updates to the Surface Dock. Key: always make sure you're troubleshooting new issues, not something that has already been fixed.
Remote desktop adds another layer of complexity to the situation. There are two RDP tools I'll compare here. First there is the Win32 app "Remote Desktop Connection" or MSTSC.exe. This is an older application and does not scale well itself.
The second is Remote Desktop Preview App and is available in the Windows Store. There is both a normal and preview beta version. The one I'm working with here is the Preview version. Modern apps scale for free so this RDP client will always present itself as the right size.
Best RDP results with single monitors
Single monitor RDP scenarios are mostly unexciting when it comes to DPI issues so I'll keep it short.
Using MSTSC from a Surface Book to a remote system is not too problematic. The MSTSC client itself will behave on a single monitor. The behavior of the remote system will vary depending on the resolution of that system. You can control that in MSTSC settings under Display.
The same is true for the Remote Desktop Preview. Connections will be fine with little to no DPI issues. You can also control the display options for each session.
The only DPI issue in single monitor connections is more of an after-effect of an RDP session. Let's say you're working from home on the Surface Book and you RDP to your computer in the office. Everything looks great. When you're done you disconnect the RDP session instead of logging off the session.
The next day you go into the office and logon to that computer directly. The session is still active from yesterday, still thinking it is displaying to a 3000x2000 monitor. The display will be Bad especially if the monitor is much lower resolution. Logging off/on will fix it. Again, this is because the hardware configuration for that Windows session changed and cycling a logon will force the DPI to reset.
Best RDP results with multiple monitors
It gets a bit trickier when you have multiple monitors setup on your local system and use RDP.
- Know what monitor you want to use for the remote session.
- Know what monitor is marked as your main monitor.
- I've found that I get the best results when I check “ Make this my Main Monitor” on the monitor I selected for #1
3. Use Microsoft Remote Desktop App Preview instead of MSTSC.exe
Once you have the above sorted out, make sure the configuration is lookin' good. This goes back to the Key Points above:
- Always be up to date - Software and hardware
- Get to Baseline - Log off, configure the hardware, logon
Next, fire up the connection to the remote machine. When you make that connection, remember you might be connecting to an existing session. Before making any judgements or adjustments to the display settings in the Remote Desktop app make sure to log off the remote session (not disconnect) and log back on. Once that is done both the local and remote sessions will be optimized for your current hardware configuration.
At this point, if the remote session view isn't quite your jam, make adjustments to the display settings options. Make sure to log off the remote session each time until it looks just right.
[caption id="attachment_525" align="alignnone" width="300"] I typically match up the Windows Start button icons and taskbar items to make sure I'm close to good. You can see the MSTSC frame does not scale well, but the remote desktop can be adjusted to display very close to the local desktop.[/caption]
Remote Desktop Preview App. This app is in beta and while some think that means buggy, it also means there is active worked being done to it. Since it's an app in the Store, it will update automagically.
And since it’s a modern app you can move it from monitor to monitor and it will adjust and scale on the fly.
[caption id="attachment_395" align="alignnone" width="300"] Sliding a modern app from the 34" to the Surface Book, you will see there is a critical mass point where the app tips over to use the display settings on the Book. Top of the screen is my external monitor, bottom is the Surface Book. Captured with SnagIt[/caption]
[caption id="attachment_535" align="alignnone" width="300"] During the move: Bridging the app between 2 screens may be messy depending on which screen it is using for display settings. Here's a shot of the Remote Desktop Preview moving to the larger screen. The App still is using the Surface Book's settings, as you can see the Start Button and the Remote Desktop frame are right-sized, while the taskbar on the larger screen seems tiny. One the App is completely on the larger screen it will then adjust to look great there.[/caption]
You can also resize the window as needed. Note: I have seen the remote session screen get stuck while resizing. This is not a feature, but part of the wonderful Beta-ness.
The app saves desktop connections (MSTSC does this too, but I like the options in the App better) This means you can create multiple connections to the same remote machine. Each connection can be setup to have unique display (and more) settings. For example: I'm working from hotel, no extra monitors or dock and I connect remotely to my office. I can setup that RDP connection and save it as Computer-Solo and I set the display settings to "Choose for me". But when I work from home I have multiple monitors, a better connection and I work mainly on my external monitor. I save this connection as Computer-Multimon.
I love long blogs posts as much as I love DPI issues. (sorry!) But devil is in the details when it comes to conquering Bad behavior. I can't stress some items enough. Various hardware/software configurations can make it difficult to clearly identify exactly what specific pains people are feeling. I've reviewed a majority of DPI support cases that have come in on Windows 10 since launch and know it's hard to address all the Bad behavior.
But every Windows 10 release is a step forward. Skype for Business and Office 2016 updates have be released and Modern/UWP apps scale for free.
- There is no one "Just fix it" button for DPI issue. (We'd all love a magic Fix it!)
- Always check for the latest software/hardware versions and updates.
- Always check to see if the issue is there at Baseline - monitors setup as needed, new logon session.
- Use the new Remote Desktop Preview (beta) app
- If you make registry changes to effect DPI behavior - don’t forget about them. Those changes do come with caveats. Roll registry changes back to default settings if you notice odd behavior and test DPI performance without them.
- If you do find an issue, check Windows Feedback app to see if someone has reported it, if so, vote it up! If not - describe exactly how to reproduce the behavior, hardware configuration, screenshots help! More Feedback votes = Higher priority!
DPI reference links: