vscode: Ubuntu 21.10: The whole vscode application looks blur under 200% DPI scaling
Does this issue occur when all extensions are disabled?: No
- VS Code Version: Version: 1.61.2 Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643 Date: 2021-10-19T14:58:13.605Z Electron: 13.5.1 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Linux x64 5.13.0-20-generic
- OS Version: Ubuntu 21.10 amd64 GNOME 40.4.0 Wayland
Steps to Reproduce:
- Setup 200% DPI scaling (4k monitor)
- Open vscode
Update:
Disable “Fractional Scaling” and then the problem solved. But if other users are using 125%, 150% or 175% scaling, this problem might not avoid?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 24 (2 by maintainers)
This is because it’s running in on X11 and not wayland, launching it with: code -enable-features=UseOzonePlatform -ozone-platform=wayland
fixes that problem, but then (at least for me) the header bar goes poof! At least shortcuts like Super + Arrowkeys work.
/usr/share/applications/code.desktop Edit xec=/usr/share/code/code --unity-launch %F to Exec=/usr/share/code/code --enable-features=UseOzonePlatform %U --ozone-platform=wayland --unity-launch %F. (For vscode in the dock) 2. /usr/bin/code Edit ELECTRON_RUN_AS_NODE=1 “$ELECTRON” “$CLI” --ms-enable-electron-run-as-node “$@” to ELECTRON_RUN_AS_NODE=1 “$ELECTRON” “$CLI” --enable-features=UseOzonePlatform --ozone-platform=wayland --ms-enable-electron-run-as-node “$@”. (For “code .”) 3. If your vscode was hide title bar “window.titleBarStyle”: “custom”
Try disabling Wayland on Ubuntu, un-comment “WaylandEnable=flase” in /etc/gdm3/custom.conf and reboot/re-login.
You can enable window decorations with another flag:
This has an effect only when “Window: Title Bar Style” is set to “native”. If set to “custom”, custom window decorations are shown with some nice space-saving features, but unfortunately the window drop shadow is missing then.
You can fix it as described in this comment: https://github.com/microsoft/vscode/issues/109176#issuecomment-846656606
I can confirm same blurry UI under Wayland with fractional scaling (KDE), but I’m using the Flatpak version. I don’t think this should get closed until you don’t need any flags to run it in Wayland mode
@yangcheng @rorysteward @Demonese To anyone still having problems, there is a good chance the following fix will work for your setup. I have a 1920x1080 monitor and carbon x1 thinkpad with 2K screen. I run latest 22.04 ubuntu and wayland is enabled by default. I think you shouldnt disable it because for example, it breaks screen sharing, fonts get blurry, insane lag when window swtiching etc. Also, fractional scaling still sucks for electron apps so that should be disabled also.
The solution is to install gnome-tweaks:
sudo apt install gnome-tweak-tool
After that, launch it, go to Fonts. There you can adjust Interface Text, Document Text etc and you can set the Scaling Factor which seems to not affect VSC in any way. For me, I just set it to 1.50 there, fonts all 13 and its working great!
Hi everyone.
I have the same issue when scaling the interface to 125% on Ubuntu 21.10 vscode looks blur.