Source: https://wiki.archlinux.org/title/Visual_Studio_Code#Blurry_text_under_Wayland
Due to Electron issues Visual Studio Code defaults to run under XWayland which may cause blurry text if you're using HiDPI screens.
In order to fix this issue you need to force Electron to run under Wayland by adding --enable-features=UseOzonePlatform --ozone-platform=wayland
, for example you'll be launching VSCode like
$ code --enable-features=UseOzonePlatform --ozone-platform=wayland
This fix can be made permanent by creating a .desktop
file or by directly editing /usr/share/applications/visual-studio-code.desktop
This used to work, but recently, it looks blurry in the same way in both Xwayland mode and in Wayland mode. That is, I ran it with
code --enable-features=UseOzonePlatform --ozone-platform=wayland
, and it looks blurry as Xwayland mode. I am sure it is running in Wayland mode, because IME is not working. When running in Xwayland mode, IME works. What gives? Is there any solution?PS: I have found the reason... the presence of another monitor with a different DPI. Someone has already opened an issue with that ( microsoft/vscode#174876 ).