Windows – How to change screen’s DPI scaling automatically when switching to multi-monitor setup

dpimultiple-monitorsresolutionscalingwindows 10

I have a 14" 1920×1080 laptop and a 24" 1920×1200 screen. The pixel density difference is huge.

When I'm using the large screen as a main one and laptop as an additional screen, I'd like to have the smaller one set to 150% scaling so that I can use it comfortably. But when I'm away from my desk and the external screen is disconnected, I'd like the laptop to automatically switch to 100% scaling to maximize desktop area.

How can I make Windows switch DPI scaling automatically when external screens are connected or disconnected?

I'm okay with using 3rd party software if it's necessary, but I'd rather stick to built-in features of Windows.

I'm using Windows 10 Pro Version 1703.

Best Answer

You can't change DPI scaling automatically because it requires you to logoff and logon.

Here's a good thread on using powershell to set the DPI registry key and toggle back and forth between two DPIs a little quicker. You still have to logoff, and the script automates that.

https://stackoverflow.com/questions/10365394/change-windows-font-size-dpi-in-powershell

If you want to expand on this, here is information about reading monitor information with Powershell: https://blogs.technet.microsoft.com/heyscriptingguy/2013/10/03/use-powershell-to-discover-multi-monitor-information/

And, here is information about changing the registry key of a specific user. This will be needed because if you run your script while you are not logged on, or during startup your registry hive will not be loaded. https://www.pdq.com/blog/modifying-the-registry-of-another-user/

Combine it all together with some ingenuity and you could schedule this script to run on logoff and on computer startup. The tricky part is that you will always have to be doing a new logon to get the new settings to take effect and to me, that is the biggest drawback about this.

Now, a better solution might be to change the actual display resolution which can be done without logging off: https://blogs.technet.microsoft.com/heyscriptingguy/2010/07/07/hey-scripting-guy-how-can-i-change-my-desktop-monitor-resolution-via-windows-powershell/

A lot of programs do not function properly with a non-standard DPI, and so if you ask me, changing the display resolution is a better solution.

So there you have it. All the resources to create your new script to automate this. Now you can see if you can get anybody over at http://stackoverflow.com to help you with it. :)

Related Question