Vscode: VSCode is not per monitor DPI aware

Created on 8 May 2016  路  34Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.0.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Connect second monitor and adjust DPI such as the second monitor has different DPI than the main one
  2. Drag Vscode window to the second monitor - UI becomes all blurry.

Possibly related to #1896 and also this upstream Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=426656

bug electron electron-2-update upstream verified

Most helpful comment

Updating to Electron 1.7.x is on the plan for July.

All 34 comments

Also happens on VSCode Version: 1.1.0-insider; OS: Windows 10 14332

@ivanz @Chococat could you try our latest insider release to see if this issue still reproduces?
You can give our preview releases a try from: http://code.visualstudio.com/Download#insiders

@bpasero Not as far as I can tell. You can easily test this without multiple monitors on Windows by simply changing the size of text etc. As far as I can tell the work is still in progress on the Chromium side here and is currently available in their dev and canary builds only.

image

Ok but good to know they plan for it because that means we will eventually also benefit.

@ivanz we recently updated Chrome again to 53 in our insider builds, maybe this improved?
You can give our preview releases a try from: http://code.visualstudio.com/Download#insiders

@bpasero No improvement with 53. I believe that the proper DPI support may land in 55 or later. Chrome Beta (which is 55) has it enabled by default, but no idea what that means for chromium stable.

Got it, thanks 馃憤

This is bothering, I'm running Google Chrome 54, and it works perfectly but not the Electron which is running with Chromium 53. I opened issue to Electron https://github.com/electron/electron/issues/8062

P.S. I have own Electron app too, which is now running with 1.4.8 and it suffers the same problem. The 1.4.x is not going to solve this.

Electron 1.5 fixes this by updating to Chrome 54.

Todays VS Code insider build comes with Electron 1.6.x, would be interesting to hear if this update solves this issue for anyone: http://code.visualstudio.com/Download#insiders

I am afraid not. I changed the DPI of one of my monitors and with build from sha 61753c029226f43c12124a75020b5d8b86c60700 and date 2017-04-10T07:15:44.057Z when I drag across monitors VSCode becomes blurry. :(

Electron still hasn't resolved this on their end, right? https://github.com/electron/electron/issues/5429

True that, would still be happy for more people trying out this new electron release.

@bpasero it does for me :) I have a Surface Book and the Explorer panel used to look super tiny, now it's fine.

The default scaling factor ("zoom") is now more sensible out of the box (guess DPI aware) indeed.

It's now system DPI aware, but not yet per-monitor DPI aware.

Recently I started a test project with Electron, and I found it's now Per-Monitor Aware.

I'm using Electron 1.6.10, Renderer 56.0.2924.87, while VS Code 1.12.2 is using Electron 1.6.6 and same Renderer 56.0.2924.87.

capture

Maybe another upgrade required? It's really annoying.

I temporarily have a setup with mixed-DPI screens and it is really annoying that VS Code isn't per-monitor DPI aware.

This is supposedly fixed in Electron 1.6.7: https://github.com/electron/electron/releases/tag/v1.6.7

Enabled per-monitor DPI awareness in the app manifest. https://github.com/electron/electron/pull/8786

(any chance of updating to the latest 1.6.x in the near term?)

Updating to Electron 1.7.x is on the plan for July.

I just found a great workaround for this that might be helpful to others. You will need a recent build of Windows 10. Find the shortcut you use to launch Visual Studio Code, right click on it and choose Properties. Go to the Compatibility tab, check the "Override high DPI scaling behavior" checkbox, and choose Scaling performed by "Application". Close and restart Visual Studio Code.
image

Now, when you drag VS Code between monitors with different DPI, it will initially fail to resize the text. So going from a high DPI screen to a low DPI screen, the text will apear huge. But all you have to do is resize the window on the new monitor and the text will instantly size properly for the monitor and be perfectly sharp.

@kring I have heard that choose System (Enhanced) will also work.

But anyway, after a month of postpone, Electron 1.7.4 is now in the master branch, so Insider builds from today should be per-monitor DPI aware now, at least in theory.

@kring (and others), yeah let us know if the insiders build (e.g. from today) fixes this.

Yep today's Insiders looks great, no settings tweak or manual resize necessary. Thanks!

Marking as verified based on @kring comment.

After testing many text editors, this and Notepad are the only ones I could find that have per monitor DPI awareness, which is a big help to me, with a 4K monitor next to a 1080p one. Since Notepad still doesn't support Unix style line endings, and I often create text files on Linux, MacOS, and Android, that was not an option. I'm now using Visual Studio Code as my text editor for all my personal notes and lists. I am not a programmer, but I'm very glad VS Code now works this way. Many thanks to the Electron team for fixing this and to you folks making it work with Code.

Windows 8.1 x64, VS Code 1.17.2 x64, external 20" HP monitor @1600x900, here is a screenshot with VS Code on the left and Notepad++ on the right.

vsc-blurry

This is basically unusable, too blurry. Will this ever be fixed? I really want to use VS Code.

@alper6 VS Code has not done that for a while on any of my computers. As I drag it between monitors with different DPIs, it rescales so that it never becomes blurry. What version are you using?

@jnm2 the version is 1.17.2. I periodically test every latest version to see if anything has improved.

Random thing to check: Have you by any chance maybe set a "Custom scaling" in Windows for the monitor or any monitor? I think that turns off lots of multi-DPI goodness in Windows 10 and reverts back to legacy behavior (not 100% sure).

Edit: I use VSCode on a daily basis with laptop and 2 monitors. Currently running Windows 10 Creators Update and just made all 3 monitors different DPI and it VSCode rescales fine across.

@ivanz I mentioned details about my system in first post, top of screenshot (is it not visible?)
It's not Windows 10, but Windows 8.1
I'm not using multi-monitor, it's set as "show desktop only on 2nd monitor", here's a shot:

ss1

There's also no custom scaling, those settings are all at default, here's a shot:

ss2

Your Notepad++ is super blurry in your first screenshot too.

I would like to reopen this issue.
VSCode seems to support 'per monitor aware scaling', at my surface.
Link to some explanation about scaling modes.
However, Tooltips and Dialog Boxes are still only system aware.
image

Was this page helpful?
0 / 5 - 0 ratings