Hacker News new | ask | show | jobs
by mtzet 1595 days ago
Theoretically, Wayland has proper support for fractional scaling, and this just works. In practice however, this only works for wayland-native applications and all applications running through XWayland will be rendered small and scaled up, which ends up looking terrible. I guess this is implementation dependent, but this is consistent across Wayland on GNOME, Sway and KDE Plasma.

This is unfortunate, since many applications can scale just fine, but only through older hacks. Chrome and Electron applications will scale just fine by providing a proper DPI. Same for very old apps. GTK and QT applications will not, but they scale just fine by setting appropriate environment variables.

In practice, this leads to the experience often being better on X11. I've found KDE X11 to handle this the best, with the limitation being a single global scale, only certain fractions allowed and needing to restart KDE after changing it.

GNOME with Ubuntu patches and Xfce will scale everything x2 and use RandR to provide a higher virtual resolution. This has performance costs and messes with cursor speed (measured in pixels) but otherwise also produces good results.

2 comments

There is a pull request [1] to Xwayland to solve fractional scaling problem.

[1] https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests...

Why is it surprising (or even Wayland’s fault) that X apps don’t have proper fractional scaling under Wayland (or anywhere)? Like it is quite clearly the fault of X, isn’t it?
The thing is that many X apps DO have fractional scaling under X, but not under Wayland. This implies that it could be made to work but for some reason isn't.
It's also an incentive for the apps to use Wayland which is a good thing.
Some frameworks don't have support for Wayland. So it might be not up to the program authors. World is not limited to GTK and Qt. One such example is Java.
The X11 support in Java wasn't so good either AFAIR. Remember having problems with AWT/Swing apps in tiling window managers in the past.

Also, there is some ongoing work on Wayland in Java - https://www.phoronix.com/scan.php?page=news_item&px=Wakefiel...