I am on NixOS 19.09, and I switched to Wayland instead of Xorg, and this enabled the experimental “fractional scaling” feature.
GTK apps scale nicely, but Chromium and Firefox retain a
1 and they rendering things bigger but fuzzy.
Any idea if this is supported yet, and I just don’t have the right configuration? Or maybe I need an update or patch?
As a “workaround”, font scaling works, and it also sets the
devicePixelRatio of the browser correctly and they render bigger but sharp instead of fuzzy. As a nice side-effect, GTK/Shell UIs (f.e. title bars, and other parts) still render at the smaller size, which I actually like; the size proportion between font and UI is not bad at all (unlike my experience in Gnome Classic / Gnome 2).
Seems to me like we need two features: UI scale, and font scale, then we can tweak both to our liking while having the appropriate
devicePixelRatio in browsers.
Are you sure that your Chromium and Firefox are using Wayland (and not Xwayland)?
AFAICT Chromium doesn’t support Wayland and Firefox needs to be told explicitly to use Wayland.
I’m not sure about that. Is there a command I can run that’ll tell me? I’m on NixOS, just in case (Linux, but not using FHS filesystem structure).
If you’re using gnome-shell: bring up Looking Glass (see
Projects/GnomeShell/LookingGlass - GNOME Wiki!), click on “Windows” in the upper right corner and choose a window from the list by clicking on its title. If the info at the top of the inspection window says “GType:MetaWindowWayland” then this application is rendering with Wayland. If it’s “GType:MetaWindowXwayland” then it’s still rendering via X (using the Xwayland X11 server). Use ESC-ESC to close the Looking Glass window.
Indeed that is what I see. Alrighty, let me figure how to switch to pure Wayland in NixOS then I’ll report back.
@rschupp I see that Gnome apps (f.e. Files/Nautilus) run with
GType:MetaWindowWayland, while Chromium runs with
I’m not sure what you’re leading to though. Are you saying that I can tell Chromium specifically to use Wayland instead of Xwayland somehow?
AFAIK Chromium doesn’t support Wayland yet.
For Firefox, set the environment variable
MOZ_ENABLE_WAYLAND=1 . You need a fairly recent version of Firefox, though (71 and 72 definitely work).
After researching, yep, Chromium with Wayland isn’t out yet, but should be soon. Arch Linux AUR has an unstable build,
I’m looking forward to trying fractional scaling once Chromium and Firefox support it out of the box. Until then, I’ll use font-scaling, which achieves almost the same thing (even changing devicePixelRatio in Chrome to the same value!).
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.