wslg: Electron apps look pixelated at 200% resolution

Environment

Windows build number: 10.0.21343.1000 (Dev Channel)
Your Distribution version: Ubuntu 20.04
Your WSLg version: 0.2.14

Steps to reproduce

  1. Set display to 200% resolution. Repo via Windows VM and macOS Remote Desktop client (Optimize for Retina display).
  2. Install Node.js 15.x in WLS
  3. git clone https://github.com/electron/simple-samples
  4. cd simple-samples/activity-monitor
  5. npm install
  6. npx electron .

WSL logs: @craigloewen-msft

Expected behavior

App renders in high resolution: ubuntu-screenshot

Actual behavior

App renders pixelated with different chrome: wsgl-screenshot

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 7
  • Comments: 24 (3 by maintainers)

Most upvoted comments

Is there still any interest in fixing this?

Any progress?

Launching Google chrome with --enable-features=UseOzonePlatform --ozone-platform=wayland flag to force it to use Wayland will give a non-pixelated window, but it freezes after trying to resize the window. Launching VSCode with the same flag would also give a cleaner look, but no windows border is shown, thus there is no way to scale or maximize the window.

Don’t know the freezing problem is related to Chrome’s Wayland or WSLg side.

New laptop, first time with Windows 11. I’m on a 16" with a 3k display and usually run it at 150 to 175%. The Linux GUI apps are pretty difficult to use without scaling but when it’s enabled it looks awful. I’ve just tried “gik”, “git gui”, and “hexchat”.

I’ve used all 4 combinations of true and false for the two options below.

[system-distro-env]
WESTON_RDP_HI_DPI_SCALING=true
WESTON_RDP_FRACTIONAL_HI_DPI_SCALING=true
;100 to 500
WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=175

Happy that the stuff “just works”, now it needs to just work better 😉

@baracunatana gedit uses wayland while Emacs probably uses XWayland/X11. You can try both with any program like this:

GDK_BACKEND=x11 gedit GDK_BACKEND=wayland gedit

I’m getting the same issue. I installed Chrome, Edge, Firefox & VLC and all of them look pixelated.

I’m running Windows 10 with WSL2 on a 32 inch 4k monitor with 200% scaling. Updated wsl using wsl --update

For Chrome I’ve tested, as @leoleoasd has mentioned, running it with --enable-features=UseOzonePlatform --ozone-platform=wayland fixes the blurring issue, but this feels more like a hack.

Commenting to keep the interest alive in hopes that this would eventually get fixed.

I have the same problem running IntelliJ IDEA (which is not an Electron app) with WSLg.

I don’t have this problem using VcXsrv which I set up following this guide.

any update?

Clion is also pixelated at 200% resolution.