microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.49k stars 29.38k forks source link

Incorrect scaling detection on Linux (GNOME) #232857

Open paulober opened 2 weeks ago

paulober commented 2 weeks ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Connect 2 DP monitors to your system
  2. Open VS Code on primary screen
  3. Change the scaling on the second screen

VSCode detects this change but it doesn't respect the monitor this update was intended for. Sometimes this also results in a broken window where the window size did not update but the content did scale. If this happens you get a window where the content is zoomed and you have no window decorations as they where also scaled. So you only option is to alt+f4 and restart vscode.

vs-code-engineering[bot] commented 2 weeks ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.95.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

akasakakona commented 2 weeks ago

I second this. I have the same problem on Fedora 41 GNOME. In 1.95.1, the newest version available on Fedora.

It's very finicky. I can't even take a screenshot because the window goes back to normal scaling as soon as I try to take a screenshot.

image

akasakakona commented 1 week ago

After some research...

Seems like the workaround is to launch VSCode from the command line with the following parameter: --ozone-platform=wayland

So.... I guess this indeed is an Electron issue. Hope this helps.

Do note that this breaks IME (Input Method) for VSCode.