SSMS in High-DPI Displays: How to Stop the Madness
I spent the last few weeks travelling a lot compared to my usual routine and I got quickly fed up with bringing my mobile workstation with me. My Dell precision M4600 is a powerhouse, but it’s definitely too big and too heavy for travelling, so I decided it was time to buy a small laptop just for travelling and presenting at SQL Saturdays and events around Europe.
After lots of research, I pulled the trigger on a new XPS13. It’s a very nice, tiny and light machine, beefy enough to run my virtual machines and slim enough to fit in a small bag.
So, everything fine? Not quite. The XPS13 2015 sports a stunning QHD touch display, with almost no bezel: a small wonder. The only complaint with it is windows and its (in)ability to scale applications when running at High DPI.
Windows got better at scaling applications on HiDPI displays and Windows 10 is doing a remarkably good job at scaling applications that can actually scale. I am running at maximum resolution (3200 x 1800) with 200% scale factor and, for instance, Visual Studio 2015 renders perfectly:
Other applications scale horribly. For instance, SSMS (SQL Server Management Studio) 2014 is a complete disaster:
At a first glance, it looks ok, but look at those icons on the Object Explorer tree: aren’t they a little bit too small compared to the labels next to them?
I can live with small icons, but you just need to open some dialog windows to understand how bad things really are:
As you can see, text gets scaled correctly, but the size of the window and some controls are completely wrong.
While some dialog windows are easily fixed by resizing them, some other are completely unusable. For instance, the restore database dialog, when locating a backup file, looks like this:
I’m not the first one to discover this kind of issues: Scott Hanselman posted his impressions quite a long time ago, but he offered no solution.
There’s also a Connect item that describes this issue, but… ok, you know what I’m about to say.
A new hope from an old technique
In Windows Vista, you had two possible ways of scaling applications: with the first one (the default) applications were instructed to scale their objects using the scaling factor imposed by the operating system. The results, depending on the quality of the application and the Windows version, could vary a lot. Some scaled correctly, some other look very similar to what we are seeing in SSMS, with some weird-looking GUIs. In Vista, this option was called “XP style DPI scaling”.
The second option, which you could activate by unchecking the “XP style” checkbox, involved drawing the graphical components of the GUI to an off-screen buffer and then drawing them back to the display, scaling the whole thing up to the screen resolution. This option is called “bitmap scaling” and the result is a perfectly laid out GUI:
In order to enable this option in Windows 10, you need to merge this key to your registry:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide] "PreferExternalManifest"=dword:00000001
Then, the application has to be decorated with a manifest file that instructs Windows to disable DPI scaling and enable bitmap scaling, by declaring the application as DPI unaware. The manifest file has to be saved in the same folder as the executable (ssms.exe) and its name must be ssms.exe.manifest. In this case, for SSMS 2014, the file path is “C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Ssms.exe.manifest”.
Paste this text inside the manifest file and save it in UTF8 encoding:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="22.214.171.124" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"> </assemblyIdentity> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"> </assemblyIdentity> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings">false</ms_windowsSettings:dpiAware> </asmv3:windowsSettings> </asmv3:application> </assembly>
This “Vista style” bitmap scaling is very similar to what Apple is doing on his Retina displays, except that Apple uses a different font rendering algorithm that looks better when scaled up. If you use this technique in Windows, ClearType rendering is performed on the off-screen buffer before upscaling, so the final result might look a bit blurry.
The amount of blurriness you will see depends on the scale factor you set in the control panel or in the settings app in Windows 10. Needless to say that exact pixel scaling looks better, so prefer 200% over 225% or 250% scale factors, because there is no such thing as “half pixel”.
Seeing is believing:
That’s it: nice and easy. Enjoy your High DPI lifestyle, until Microsoft comes up with a better solution (or a better SSMS).
Posted on October 14, 2015, in SQL Server and tagged 4K, High DPI, Scaling, SQL Server, SSMS, Surface Pro 3, Windows 10. Bookmark the permalink. 89 Comments.
Thank you so much sir, now i can enjoy SSMS with my Hp Spectre .
Thanks, my manifest for Eclipse/Java stopped working after upgrading to Windows 10 and the registry entry fixed it again.
THANK YOU! Same as wezgeb! Why does life have to be so difficult sometimes?
My friend, many thanks for this. You have provided a solution that Microsoft was incapable or unwilling to provide for a problem caused by themselves. Cheers
This is just so useful! FWIW I’ve just sent a tweet out saying so, thanks 🙂
Thank you for your post, it worked perfectly.
I might sound very naive but how to marge a key into the registry? like i know the steps to open the registry and reach the path till …[sidebyside], but then what should I do? and I have no idea what a manifist file is? is there anyway i can get steps to do that?
I would appreciate your help guys, i am using windows 8.1 and it is very frustrating using MS SQL server with the High DPI!
Copy this text to notepad and save it as “hidpi.reg”.
Windows Registry Editor Version 5.00
When saving the file, put the name in quotes, otherwise notepad will try to save it as hidpi.reg.txt.
Double click the hidpi.reg file to merge it to the registry.
Regarding the manifest file, copy the XML from the post and paste it in notepad. Save it as “ssms.exe.manifest” (same caution about the quotes applies). In the save as dialog in notepad, make sure you choose the UTF8 encoding.
You are simply Awesome! Thank you so much, works grrreatt now!
Thank you Moath for asking for this clarification.
Thank you Spaghettidba for both the solution and this response for those of us with less experience but the same frustration 🙂
In the November 2015 release of the standalone SSMS installation Microsoft finally added bitmap scaling for High resolution displays, see: https://msdn.microsoft.com/en-us/library/mt588477.aspx
Thanks Rogier. In fact Microsoft decided to switch to bitmap scaling after reading this post. You can find the release blog post here: http://blogs.msdn.com/b/sqlreleaseservices/archive/2015/11/30/announcing-sql-server-management-studio-november-2015-release.aspx
How did you solve the same scaling issue, but with SSDT?
I copied the manifest file to SSDT folder, it now renders fine, but it gives me an error that debug function is not available and I have to reinstall SSDT.
AFAIK, SSDT is built on a different visual studio shell (2012 or 2013, depending on your setup) and it should not have scaling issues. What scaling problems are you seeing?
This is what I see out of the box:
This is what I can see thanks to your xml manifest put into the same folder as devenv.exe:
The results are pretty amazing. Unfortunately, when I press “Start” I get the error:
Unable to start debugging.
The debugger is not properly installed.
Run setup to install or repair the debugger. (Microsoft.DataTransformationServices.VsIntegration)
I had a theory that it starts another application within Visual Studio.
I found out that when you press “start” on SSIS package it runs DtsDebugHost.exe from “C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn” (depending on your version of course). So I decided to try adding manifest with the same name to it. Sadly, this did not solve the problem. I still get the error.
I have the same problem with visual studio 2015. When I remove devenv.exe.manifest file then debuging is working. Did you find any solution how to set the manifest file for visual studio?
I don’t understand what you mean. Visual studio is scaled perfectly in my QHD display. What are you trying to do?
Visual studio 2015 is scaled perfectly but winforms application development (I mean visual studio winforms layout development) has issues in case you are using hiDPI display. But I managed to generate the right visual studio manifest file using mt utility after that I set application dpiAware attribute and now winforms development works correctly. I have Win10 with 4k display native resolutin, zoom is set to 200% but I can work with my old winforms project and all is scaled correctly in visual studio winform preview using dpiAware attribute 🙂
Cool! Thanks for the feedback.
make devenv.exe.manifest. open command promt same folder (you need write permission on this folder)
D:\>mt -inputresource:”C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe” -out:devenv.exe.manifest
use this command. this will make visual studio manifest on your empty devenvçexçmanifest file.
Microsoft Visual Studio
this is my file. You need change only this section;
change true to false.
Sory for my english 🙂
Thank you. Very impressed you worked out that solution.
Reblogged this on Nicholas Rogoff's Blog and commented:
Got a new high resolution latop with scaling and struggling to use SSMS. Here’s the fix
Thanks, this worked like a charm for me! Surface Pro 4 is now usable.
Thank you so much for this! I also used this technique to create a manifest file for mstsc.exe in the Windows System32 directory. Remote Desktop no longer requires a magnifying glass to be used on a Surface Book!
OMG, you’re a legend! That is soooo good. I dropped $3,500 on a new Surface book as a dev laptop and was feeling pain with SSMS. Now to see if I can fix Remote Desktop. Thank you so much, this totally worked!!
Glad it worked for you. I can confirm that it works for Remote Desktop as well.
Amazing post! Worked like a charm! :)) Thank you!
Worked perfectly, thank you!
wow, you made my day, thanks a million, i was feeling it was my big mistake buying XPS 13 2015, but now i am actually feeling good 🙂
Tanks very much for your solution for this, now it works great on Surface Pro 4
I didn’t think it would work. But it does! Thank you!
THANK YOU!!! YOU MADE MY DAY! YOU ARE GREAT!
I can’t say how much this changed my working experience, really glad you posted your solution! Thanks a lot!
Thank you so much for this. Now able to use SSMS on my XPS 13 when traveling.
P.S. I’ve also recently installed SQL Server 2016 CTP 3.3 and they appear to have applied this fix, or something similar.
Just applied the same fix to SQL Server Data Tools 2015, i.e. by renaming the manifest file to “devenv.exe.manifest” and saving it to “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\”.
Your gift just keeps on giving!
Another thank you! This is a huge help!
Worked for me…THANK YOU!….
You deserve some sort of reward for this. Been setting up a new XPS 15 this weekend and this is a lovely solution. SSMS, SoapUI (and, I suspect many other applications) – all now usable.
I take beer 🙂
I’d like to add my thanks along with all the others. Being unable to use effectively SSMS on my new fully loaded Surface Book was driving me nuts!
You’re a star.
Thanks for your post – I’ve been using this solution on my XPS13 since I ran across it. It has helped to no end -I am using it with Calibre ebook editor, 7zip V15.14, Bittorrent 7.2.1, VLC 2.2…and so on.
There are a few drawbacks to this method though:
1-slight blurring of text/icons
SOLUTION: use DPI Awareness Enabler (Freeware) – easy, just drag & drop applications into the bottom pane. You will have a larger but very crisp/clear display.
2-does not work if the application is called indirectly (via another application)
You MUST click on the app yourself (L-click on the .exe or R-click >”open with” or “send to” -select desired .exe)
For example: if you click on a torrent file in Firefox >>and Firefox opens Bittorrent (when it’s not already running) ..Bittorrent is NOT rescaled despite the manifest.
If anyone has a solution to this problem – PLEASE post…you are a genius.
Just FYI -there is one alternate solution which works for some apps:
Create a new environment variable named “QT_PIXEL_DENSITY_RATIO” and assign it the value “auto”
log out and log in again…and any apps which use QT will be rescaled.
*this works for Calibre and Calibre’s ebook-viewer…
Kudos to Tim Zwicker for coming up with this solution.
I’ve been struggling with this scaling problem since I got my DELL XPS13 – it almost makes me want to return the stupid computer. I finally implemented this external manifest solution – but it does NOT work for Kindle for PC or Gyration Motiontools (the software for my mouse/keyboard, essential for my daily functioning)!!
Neither the external manifest nor environment variable solution (QT_DEVICE_PIXEL_RATIO – auto) worked for these applications. I’ve attached pictures (of Kindle 4 PC) – but I had to uninstall Gyration (it was 1.5″ x 1.5″ ….impossibly small).
IF anyone has a fix for this please post and let me know.
ALSO : The “manifest solution” has a fairly significant drawback: it won’t work if the application is started “thru” another application…
eg if you click a torrent file in Firefox >and Firefox starts Bittorrent >>Bittorrent is NOT rescaled, despite the external manifest.
IF anyone has a solution for this…again, please, please let me know!
Any idea if similarly this same fix can be applied to Visual Studio 2015? When I open server explorer and try to add new database same display issue is noted here. Not sure if anyone is going through the same thing.
Thanks for this! I’m pretty sure my eyes were close to popping out before adding the manifest.
For those who are having issues with this fix – if the app you are using is 32-bit, you may want to try changing the processorArchitecture value from “amd64” to either “x86” or “*”. Not a guaranteed solution, but it may help.
Love that fix! awesome work m8, cheers!
As of now, since release of SQL Server 2016 and SSMS having it’s own download page, you can now download the latest Version of SSMS here: https://msdn.microsoft.com/en-us/library/mt238290.aspx
It now fully supports 4K displays. I just tested it on my XPS 15 and Works great! No longer any scaling issues with SSMS. Super happy now!
Not sure what you mean by fully supports. It looks like crap on my high res monitor. Windows render correctly, but the text is extremely blurry, I am missing something?
Just to leave a follow-up. I had my scaling at 225% and it was very blurry, changed it to 200% and it’s pretty good now. Not as good as apps that actual support high DPI, but much better.
wow – Fantastic Fix!! – Can’t believe Microsoft have not resolved this yet though…
Thanks so much… stupid Windows
Thank you! very helpful. now my eyes will no longer pop out when I’m working with my Surface
I’m running Windows 8.1 on a 27″ iMac so I can self-teach myself SSMS. Just getting the sizing right when I initially installed Windows took a minute. This process worked great and I can finally see EVERYTHING! Thank you so much!
Finally I can work on 4k!
Thank you so much… This worked for me, then I had to redo this setting after a windows update. I’m using an iMac with SSMS on Windows 10 Boot Camp.
Awesome tutorial mate! Thanks for this pro tip!
I used this for SSMS 2012 on my 4k screen and it works perfectly.
As I mentioned before, this worked perfectly for SSMS 2012 on my 4k screen…. however, I just discovered that when I now go into SSRS (SQL Server Reporting Services) and edit a report in the Report Builder, the Report Builder’s resolution is ALL wrong… all small, just like SSMS was before this RegEdit and manifest change.
When I backed out the RegEdit change and manifest (and rebooted it allow the registry to be re-read), then when I edit a report in the Report Builder, the report builder is fine (and of course SSMS is back to being an unusable resolution.
Is there any information available as to what is the conflict? Or perhaps an additional edit I could make?
I suggest that you download and install the latest ssms update. It supports hidpi without registry hacks that may affect other applications’ behavior.
The client that I am working for is using SQL 2012. If I install the latest SQL 2016 we would be out of sync.
Is there a way of using the latest SSMS on SQL 2012? Perhaps I’m misunderstanding something about that. (I wouldn’t be the first time!)
Thanks for your help.
Ssms is not tied to a particular version of the relational engine anymore. You can work with any version of SQL server using the latest ssms.
ah, yes…. it been a long day…. I’ll try the SSMS download later tonight.
Thanks for your help!
I had forgotten that Microsoft no longer ties SSMS to a particular version…. plus now the Developer’s Edition of SQL is free.
Using the latest version of SSMS does indeed solve the 4k monitor problem for both the SSMS and SSRS’ Report Builder.
Thanks for your help.
Thank you very much for this tip! I have been struggling with this issue for as long as I can remember after switching to Windows 10 Anniversary edition. Not only SSMS 2014 was affect, so was VS 2012. This tip helps me to fix them both. Thank you!
This fix does not work for VS 2012. While everything displayed correctly, I ran into this error
“Error while trying to run project: Unable to start debugging.
An error occurred that usually indicates a corrupt installation (code 0x80040155). If the problem persists, repair your visual studio installation via ‘Add or Remove Programs’ in Control Panel.”
Removing the manifest file and the error is gone.
As far as I know, VS2012 should scale correctly with DPI scaling. Isn’t it the case for you?
This still appears to be a problem with Sql Server Data Tools for VS 2015. Just fixed it using the variant described by pynchmeawake . Awesome.
This worked awesome – thank you!
thanks for the tip. works great, and saves lots of hassles
I cannot begin to estimate how much time I have spent on this issue. I have read 30+ posts on the issue and tried numerous “solutions”, none of which have worked. I bought myself a new laptop (Dell XPS15 / 32Gb RAM / 1 TB SSD), a really nice laptop that cost me my whole budget and some. I was honestly going to by myself another just because I couldn’t find any solution. SSMS is really annoying at best, unusable at worst. After applying this fix its all FIXED!!! You cannot begin to imagine how bloody happy I am right now! Thanks you!
I tried it but it is not working for my ASUS Q534U win 10 laptop. I use SSMS 2014
It has recommended resolution of 3840*2160 and scale of 250%.
Your help is very much appreciated.
I found a new way for Windows 10:
1. Go to the file’s (.exe file) properties
2. Go to Compatability
3. Select ‘Change high DPI settings’
4. Select ‘Override high DPI scaling behavior’ and select ‘System (Enhanced)’ from the drop-down box.
Done or else play around as per intuition and something will hit right. Thanks!
This process worked for me to correct scaling issues with SSAS MDX query windows using SSMS 18.5. on Windows 10 (1809) — Dell (M3800) Windows laptop with 15″ 4K monitor set to %250 display scaling.
1). Right Click – SSMS.exe
2). Click – Compatibility panel
3). Click – Change high DPI setting button
4). Click – Override high DPI scaling behavior checkbox
5). Select – System or System Enhanced in Scaling Performed by dropbox
6). Click – Ok button
7). Click – Apply button
8). Click – Ok button
This fix has worked for a couple of years. Thank You Gianluca. But today I tried to implement for a Dynamics exe and got errors. In troubleshooting I found M$ has a option in the Compatibility tab for the .exe file. You can “Disable” Display Scaling on high DPI settings. In effect disables DPI scaling and enables bitmap scaling. And also appears M$ has change the wording for this once or twice. So your system may be different.
thanks for saving me from such disaster
Thanks mate this worked pretty well in SSMS, expect for the grid display which is still very small… Anyway thought I would do the same for Visual Studio 2019. Worked great for Visual Studio but it broke the SSIS plugin (which seems to be just rubbish) and as such had to roll it back. So don’t do it if you need SSIS.
Pingback: Using SQL Server on high resolution monitors - Simons SQL Blog
Pingback: Announcing SQL Server Management Studio - November 2015 Release - Microsoft SQL Server Release Services - Site Home - MSDN Blogs
Pingback: Announcing SQL Server Management Studio Release - Microsoft SQL Server Release Services - Site Home Blogs - MyDBAPool
Pingback: Announcing SQL Server Management Studio – November 2015 Release - MyDBAPool
Pingback: SSMS February Preview – Curated SQL
Pingback: FIX: SQL Server Management Studio and 4k Monitors - SQL Server - SQL Server - Toad World
Pingback: SSMS in High-DPI Displays – Senior DBA
Pingback: SSMS 2016 is now HiDPI ready | spaghettidba
Pingback: [Windows 10] DPI Scaling madness on High Resolution Monitors | ConfigMonkey.co.uk
Pingback: SSMS in High-DPI Displays: How to Stop the Madness – Nicholas Rogoff Blog
Pingback: Fix Ssms.exe 2014 on 4K monitors | Chris Straw