Get WinXP DPI Scaling (No More Blur) in Win8.1 w/ Registry
Update 1/19: This thread seems to live on, so to summarize: what “DPI Disable.reg” does is add a right click context menu entry to .exe files to "Disable DPI scaling", which is equivalent to clicking (Properties) -> (Compatibility) -> (Disable display scaling) on high DPI.
Relative to other methods, this is the least intrusive thing that always seems to work--the only case where it doesn't that I've seen is on some files flagged as protected in the Windows folder.
The result is to mark the app as DPI-capable and allow it to scale using its own WMF methods, as opposed to the 8.1 way which makes everything big but also often adds a blurry looking effect to the upscaled window. This marks the app as capable of doing its own scaling even if it is not marked that way in its application manifest (an internal list of specs and functions that are part of the app.)
Besides DPI Disable.reg, I’ve attached a more powerful, but less reliable method to this update named "DPI Fix.reg". It doesn't always work, but when it does it prevents from having to manually add files to the high-DPI-capable list. I've seen best results when using right after a fresh install, and apparently getting similar results after deleting the AppCache value under the AppCompat key. I didn't bother to track down the exact cause/effect relationship once apps started behaving the way I wanted.
Update 9/10: Funny how this thread is getting responses 4 months later. I solved it and hadn't looked back, but the first part had mixed up the keys for environment variables and compatibility layers. Here's my all in one solution:
That's it! Stop reading here.
Now you did it. There's a whole bunch of reasons this works that spans acronyms long enough to build a bridge with. It's components, managed assemblies, common runtimes, manifest preference, policy merging, environment inheritance, process invocation.... or if you prefer your acronyms: COM, GAC, MSIL, NI's, CLR, DCOM, PCA, MSDT, EDB and all their struts like XML serializers that keep track of this stuff. This is a sledgehammer that puts them to rest.
This is really where you should stop reading. If you continue past this point and apply the settings to you graphics adapters, those will work, but you may get all sorts of out of range memory issues. Like hitting PrtScr and your computer freezing. I was desperate and crossed the line there, but am leaving the info for reference. The reg fix above is safe and works.
Update 5/18: Done and down to 2 keys that worked across a number of computers. There are a few tricks to make sure you don't have to do extra work or restore to get scaling unlocked if you don't follow them.
This is all from a clean install so if you have enabled "one size for all displays, roll that back first. If you've tweaked the settings a lot (ex: 200% with the slider, applied, then switched to checkbox and typed 200%), do each of those with logoff/on in between. When done, a restart/reboot is required to commit the changes.
After you're back in there are just 2 steps. If you don't reboot there is a higher risk of the set getting flagged for out of spec values. Windows does a sanity check as well as a bunch of recursion and cycle checks across many keys in the registry, but only does a full reparse on a restart. Then it prioritizes the last known good configuration over any other, even if it the values seem out of range.
Step 1. Make a new string in HKLM and set it to:
[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"__COMPAT_FLAGS"="HighDpiAware"
Step 2. Change the key 00 (and 01 for monitor 2, etc.) to its current value, usually from 4 to 16 like so:
(I've only seen 4 but can vary according to msdn):
[HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\[ABC...]\00\0#]
"Scaling"="16"
There should only be one [ABC...] key representing your display adapter. I have 2 because I've been messing with the keys and Windows has been putting me back in my spot. But after many attempts I've got it nailed down:
Step 3. Make sure you log in/log out at least once before restarting.
That's to to commit the current control set as a known working one before Windows has a chance to evaluate it for compatibility. Wait a few minutes (the timer is 20000 but I'm not sure what that specifies, presumably it's around 5 min 20 sec) and log off/on it again just to make sure.
That should be it. After restarting and making sure everything sticks, you can change other keys as needed to adjust from the base of 150%. Changing other keys is not necessary in most cases, 200% is too big and themes/visual styles still adhere to the 120/144 ppi spec or 125%/150% scaling.
Also this gives you Win8-style scaling. That's the environment key at work in a backwards way, by applying the scaling outside of your user context and having it scale back up as though on another display. Hence the note to go back to defaults and reboot first.
If you get blurry desktop apps or any other results let me know. I have many other variables that may be getting cycled back into the environment but the session manager is the top level key of the internal undocumented variable passed internally, and it seems to do the trick. Let me know if you have trouble.
More screens when it's not 3am, but here's one I have with the key:
Ignore the 8 as this was a test, it should be 16. Here's key #2 from another test (X's here mean ignore, not remove/replace):
Tried this on 3 fairly different computers, Acer laptop with Intel HD4000, custom desktop with ATI 5570 and Dell Inspiron with nVidia 8600M) so should not be hardware specific.
If you get throttled there are a few dozen registry keys waiting for you to clean up that even the system user (above administrator) can't access. I guess I could put to make a restore at the top but I'll come back to it since it could give the impression any of this is unsafe when it's just Windows winding back a hardware-level hack that can't hurt.
Follow-up: If it scales but blurry, this key overrides the override of the variable the other key set:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Windows\\explorer.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\explorer.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\runonce.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\mmc.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\cmd.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\conhost.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\svchost.exe"="~ HIGHDPIAWARE"
That key is always parsed so it sticks as a HKLM reg key, and since also results in an env var being set, gets passed down to child processes in case they don't do their own parsing.
If needed it can also be added to HKCU (same subkey) and HKU\S-5-1-18 if you want HKCU's equivalent for the system user (if you use psexec or nircmd)
View attachment DPI Fix.reg
Update 5/12: Done! Before and after:
Non-8.1 users won't see a difference as they haven't been dealing with what is the norm in Win8.1, next screenshot. "Blurry" sounds like almost too nice a word:
Fixes are available as far as I've found and gathered to this point, for individual files. They can be automated, but not a system-level fix that's a once-and-forget. That is what the goal is here, and it's without to any specific exe. Sorry wasn't taking too many when things were that hard to read.
Now I'll test this and pull out the parts that are needed and clean out the ones that aren't. It's been many tries but ended up i nthe same place I started, the PCW changing SMI settings applied to the CLR's...
Now that there is some room to work with I can put back the font rasterizer I was using and try out an auto hinting tool I just came across. I think MacType was mentioned once on this forum but without good examples you can't really see the difference. Here are some from a few months ago:
That's Mactype (no DPI change here, getting rid of blur was with the REG script attached.)
I ran this really quick conversion on ttfautohint's default settings:
Big benefit from a 1-time change, as MacType is easy on the eyes but caches all those characters as bitmaps.
As far as DPI is concerned I'll put a new reg script together. For now moving everything old further down and just leaving the older script up until I've got the new one ready and ironed out.
Alternative REG script for Disable DPI Scaling option in right click context menu
Before this tweak I was using this script to make DPI management easier in Win8.1. I tried to make it as fast and clean as possible and it works pretty well. Unfortunately they did seem to snap back once in a while bcause eventually some parameter of the app would change and the flag would have to be set again.
However if you use an HTPC or have aQH+ display you might prefer this. Feel free to use it if you don't need a system wide change, otherwise global" one is probably what you're looking for. Here is the old script:
This was still annoying because I have symlinks/directory junctions that create several paths to a single file, often change folder names to organize apps especially in my Dropbox, and will sometimes first run a program in a sandbox to make sure it doesn't do anything bad to my computer, then run it again outside the sandbox.
In all those cases the app would snap back to being blurry and the script only helps by greatly reducing clicks and travel. The better solution will be posted soon, just so I don't mess up your systems . In the meantime this reg should tide things over:
Update 1/19: This thread seems to live on, so to summarize: what “DPI Disable.reg” does is add a right click context menu entry to .exe files to "Disable DPI scaling", which is equivalent to clicking (Properties) -> (Compatibility) -> (Disable display scaling) on high DPI.
Relative to other methods, this is the least intrusive thing that always seems to work--the only case where it doesn't that I've seen is on some files flagged as protected in the Windows folder.
The result is to mark the app as DPI-capable and allow it to scale using its own WMF methods, as opposed to the 8.1 way which makes everything big but also often adds a blurry looking effect to the upscaled window. This marks the app as capable of doing its own scaling even if it is not marked that way in its application manifest (an internal list of specs and functions that are part of the app.)
Besides DPI Disable.reg, I’ve attached a more powerful, but less reliable method to this update named "DPI Fix.reg". It doesn't always work, but when it does it prevents from having to manually add files to the high-DPI-capable list. I've seen best results when using right after a fresh install, and apparently getting similar results after deleting the AppCache value under the AppCompat key. I didn't bother to track down the exact cause/effect relationship once apps started behaving the way I wanted.
Update 9/10: Funny how this thread is getting responses 4 months later. I solved it and hadn't looked back, but the first part had mixed up the keys for environment variables and compatibility layers. Here's my all in one solution:
Code:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Environment]
"__COMPAT_LAYER"="HighDpiAware"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"__COMPAT_LAYER"="HighDpiAware"
[HKEY_USERS\.DEFAULT\Environment]
"__COMPAT_LAYER"="HighDpiAware"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
@="^ HIGHDPIAWARE"
"C:\\Windows\\explorer.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\userinit.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\wininit.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\winlogon.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\smss.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\cmd.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\csrss.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\runonce.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\services.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\mmc.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\svchost.exe"="^ HIGHDPIAWARE"
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
@="^ HIGHDPIAWARE"
"C:\\Windows\\explorer.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\userinit.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\wininit.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\winlogon.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\smss.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\cmd.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\csrss.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\runonce.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\services.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\mmc.exe"="^ HIGHDPIAWARE"
"C:\\Windows\\System32\\svchost.exe"="^ HIGHDPIAWARE"
Now you did it. There's a whole bunch of reasons this works that spans acronyms long enough to build a bridge with. It's components, managed assemblies, common runtimes, manifest preference, policy merging, environment inheritance, process invocation.... or if you prefer your acronyms: COM, GAC, MSIL, NI's, CLR, DCOM, PCA, MSDT, EDB and all their struts like XML serializers that keep track of this stuff. This is a sledgehammer that puts them to rest.
This is really where you should stop reading. If you continue past this point and apply the settings to you graphics adapters, those will work, but you may get all sorts of out of range memory issues. Like hitting PrtScr and your computer freezing. I was desperate and crossed the line there, but am leaving the info for reference. The reg fix above is safe and works.
Update 5/18: Done and down to 2 keys that worked across a number of computers. There are a few tricks to make sure you don't have to do extra work or restore to get scaling unlocked if you don't follow them.
This is all from a clean install so if you have enabled "one size for all displays, roll that back first. If you've tweaked the settings a lot (ex: 200% with the slider, applied, then switched to checkbox and typed 200%), do each of those with logoff/on in between. When done, a restart/reboot is required to commit the changes.
After you're back in there are just 2 steps. If you don't reboot there is a higher risk of the set getting flagged for out of spec values. Windows does a sanity check as well as a bunch of recursion and cycle checks across many keys in the registry, but only does a full reparse on a restart. Then it prioritizes the last known good configuration over any other, even if it the values seem out of range.
Step 1. Make a new string in HKLM and set it to:
[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"__COMPAT_FLAGS"="HighDpiAware"
Step 2. Change the key 00 (and 01 for monitor 2, etc.) to its current value, usually from 4 to 16 like so:
(I've only seen 4 but can vary according to msdn):
[HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\[ABC...]\00\0#]
"Scaling"="16"
There should only be one [ABC...] key representing your display adapter. I have 2 because I've been messing with the keys and Windows has been putting me back in my spot. But after many attempts I've got it nailed down:
Step 3. Make sure you log in/log out at least once before restarting.
That's to to commit the current control set as a known working one before Windows has a chance to evaluate it for compatibility. Wait a few minutes (the timer is 20000 but I'm not sure what that specifies, presumably it's around 5 min 20 sec) and log off/on it again just to make sure.
That should be it. After restarting and making sure everything sticks, you can change other keys as needed to adjust from the base of 150%. Changing other keys is not necessary in most cases, 200% is too big and themes/visual styles still adhere to the 120/144 ppi spec or 125%/150% scaling.
Also this gives you Win8-style scaling. That's the environment key at work in a backwards way, by applying the scaling outside of your user context and having it scale back up as though on another display. Hence the note to go back to defaults and reboot first.
If you get blurry desktop apps or any other results let me know. I have many other variables that may be getting cycled back into the environment but the session manager is the top level key of the internal undocumented variable passed internally, and it seems to do the trick. Let me know if you have trouble.
More screens when it's not 3am, but here's one I have with the key:
Ignore the 8 as this was a test, it should be 16. Here's key #2 from another test (X's here mean ignore, not remove/replace):
Tried this on 3 fairly different computers, Acer laptop with Intel HD4000, custom desktop with ATI 5570 and Dell Inspiron with nVidia 8600M) so should not be hardware specific.
If you get throttled there are a few dozen registry keys waiting for you to clean up that even the system user (above administrator) can't access. I guess I could put to make a restore at the top but I'll come back to it since it could give the impression any of this is unsafe when it's just Windows winding back a hardware-level hack that can't hurt.
Follow-up: If it scales but blurry, this key overrides the override of the variable the other key set:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Windows\\explorer.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\explorer.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\runonce.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\mmc.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\cmd.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\conhost.exe"="~ HIGHDPIAWARE"
"C:\\Windows\\System32\\svchost.exe"="~ HIGHDPIAWARE"
That key is always parsed so it sticks as a HKLM reg key, and since also results in an env var being set, gets passed down to child processes in case they don't do their own parsing.
If needed it can also be added to HKCU (same subkey) and HKU\S-5-1-18 if you want HKCU's equivalent for the system user (if you use psexec or nircmd)
View attachment DPI Fix.reg
Update 5/12: Done! Before and after:
Non-8.1 users won't see a difference as they haven't been dealing with what is the norm in Win8.1, next screenshot. "Blurry" sounds like almost too nice a word:
Fixes are available as far as I've found and gathered to this point, for individual files. They can be automated, but not a system-level fix that's a once-and-forget. That is what the goal is here, and it's without to any specific exe. Sorry wasn't taking too many when things were that hard to read.
Now I'll test this and pull out the parts that are needed and clean out the ones that aren't. It's been many tries but ended up i nthe same place I started, the PCW changing SMI settings applied to the CLR's...
Now that there is some room to work with I can put back the font rasterizer I was using and try out an auto hinting tool I just came across. I think MacType was mentioned once on this forum but without good examples you can't really see the difference. Here are some from a few months ago:
That's Mactype (no DPI change here, getting rid of blur was with the REG script attached.)
I ran this really quick conversion on ttfautohint's default settings:
Big benefit from a 1-time change, as MacType is easy on the eyes but caches all those characters as bitmaps.
As far as DPI is concerned I'll put a new reg script together. For now moving everything old further down and just leaving the older script up until I've got the new one ready and ironed out.
Alternative REG script for Disable DPI Scaling option in right click context menu
Before this tweak I was using this script to make DPI management easier in Win8.1. I tried to make it as fast and clean as possible and it works pretty well. Unfortunately they did seem to snap back once in a while bcause eventually some parameter of the app would change and the flag would have to be set again.
However if you use an HTPC or have aQH+ display you might prefer this. Feel free to use it if you don't need a system wide change, otherwise global" one is probably what you're looking for. Here is the old script:
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\exefile\shell\disabledpi]
@="Disable DP&I Scaling"
[HKEY_CLASSES_ROOT\exefile\shell\disabledpi\command]
@="cmd /c @reg add \"HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\" /v \"%1\" /f /t REG_SZ /d \"~ HIGHDPIAWARE\">nul"
"IsolatedCommand"="cmd /c @reg add \"HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\" /v \"%1\" /f /t REG_SZ /d \"~ HIGHDPIAWARE\">nul"
[HKEY_CLASSES_ROOT\Msi.Package\shell\disabledpi]
@="Disable DP&I Scaling"
[HKEY_CLASSES_ROOT\Msi.Package\shell\disabledpi\command]
@="cmd /c @reg add \"HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\" /v \"%1\" /f /t REG_SZ /d \"~ HIGHDPIAWARE\">nul"
"IsolatedCommand"="cmd /c @reg add \"HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\" /v \"%1\" /f /t REG_SZ /d \"~ HIGHDPIAWARE\">nul"
[HKEY_CLASSES_ROOT\Directory\shell\disabledpi]
@="Disable DP&I Scaling"
[HKEY_CLASSES_ROOT\Directory\shell\disabledpi\command]
@="cmd /c @start /min cmd /c for /f \"usebackq delims=\" %%i in (`dir /b /s \"%1\\*.exe\" \"%1\\*.msi\"`) do @reg add \"HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\" /v \"%%i\" /f /t REG_SZ /d \"~ HIGHDPIAWARE\""
"IsolatedCommand"="cmd /c @start /min cmd /c for /f \"usebackq delims=\" %%i in (`dir /b /s \"%1\\*.exe\" \"%1\\*.msi\"`) do @reg add \"HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\" /v \"%%i\" /f /t REG_SZ /d \"~ HIGHDPIAWARE\""
This was still annoying because I have symlinks/directory junctions that create several paths to a single file, often change folder names to organize apps especially in my Dropbox, and will sometimes first run a program in a sandbox to make sure it doesn't do anything bad to my computer, then run it again outside the sandbox.
In all those cases the app would snap back to being blurry and the script only helps by greatly reducing clicks and travel. The better solution will be posted soon, just so I don't mess up your systems . In the meantime this reg should tide things over:
Attachments
Last edited:
My Computer
System One
-
- OS
- Windows 8.1 Pro/Server 2012 R2 Datacenter
- System Manufacturer/Model
- Self-assembled
- CPU
- Core i7-920 @ 3.4 GHz
- Memory
- 12 GB DDR3
- Hard Drives
- SSD RAID 0
- Mouse
- Razer Naga 2012
- Internet Speed
- 100 Mbps
- Antivirus
- virustotal.com