5 ms·
Great! I recently set up desktop Linux, and was disappointed to find poor support for fractional scaling on HiDPI screens, which I’m used to coming from retina
by jitl 8y ago
Great! I recently set up desktop Linux, and was disappointed to find poor support for fractional scaling on HiDPI screens, which I’m used to coming from retina MacBook Pro. Gnome under X11 only has 1x, 2x and 3x scaling. In Wayland, Gnome has experimental support for fractional scaling - including 1.75x, the size I’m used to. However, Xwayland apps like Firefox stable (and chrome) render blurry with fractional scaling. So, very cool to see this major program get Wayland support and thus high quality HiDPI support.
- JonathonW 8y agoDoes Gnome under X11 allow you to set the desktop's size higher than the screen resolution and scale that down? Because that's all Apple's "fractional" scaling does-- macOS only supports integer scaling (specifically, 1x and 2x; iOS does 3x but not macOS); the "more space" scaling settings just render the screen at a resolution higher than the physical size of the panel and scale it to fit (for example, current 15" MacBook Pro panels are physically 2880x1800; the default screen resolution on the current machines is 3360x2100 with 2x scaling).
- CyberShadow 8y ago> Does Gnome under X11 allow you to set the desktop's size higher than the screen resolution and scale that down? FWIW, this is possible under X11 directly. Try running: xrandr --scale 2x2
- anticensor 8y agoI tried that and it said you need to specify an output.
- gnomewascool 8y agoxrandr --scale 2x2 --output OUTPUT where OUTPUT will vary depending on what screens you actually have, but will usually be something like LVDS1 or VGA1. You can get the possible values with auto-completion in Bash (on Debian at least) or by running just xrandr.
- kuschku 8y agoGnome does exactly that. While Android, Windows, Qt/KDE and the web went with real fractional scaling, GTK/Gnome, macOS and iOS went with just increasing the framebuffer size and scaling it down. As result, when rendering a GTK app (be it a video player or a game like Minecraft) on a 4K screen at 1.5x scale, you're actually rendering it at 6K resolution, which utterly destroys performance.
- vetinari 8y agoGnome seems to do that per window, not per framebuffer like macOS does. The framebuffer size seems to be exactly the display resolution, plus you need GPU to do window scaling, you cannot let the output encoder to do the job. The Windows and Qt approach has it's own issues with fractional pixel positions, and the resulting problem with mapping integer input coordinates to these. And of course, it doesn't work nice with legacy apps (Gnome has to handle X11 apps, that won't tell anything about the scale they work with. See also: Gimp).
- backenddev 8y agoHey, how do you set this and what version of gnome are you using?
- TaylorAlexander 8y agoI recently ran in to these bumps with Gnome on a new Thinkpad Carbon X1 and the 2560x1440 screen. I love Gnome but Firefox in particular was unusable and it wasn’t the only app with issues. I begrudgingly installed Cinnamon and things are better. But I prefer gnome. Glad to see I can update my Firefox on gnome to this. I can switch back any time so maybe that will make gnome usable for me.
- hoppelhase 8y agoYou can set the scaling to 1x, but the font size to 1.5x in tweak tools. That's what I'm using.
- floatboth 8y agoNo quality HiDPI support just yet. Not with GL acceleration, anyway. There is a patch on the bugzilla (in the 'wayland' tracking issue) but it's very buggy.
- lima 8y agoPSA: there's fractional scaling for text even with Xorg, and most applications scale their UI accordingly. I like to set Gnome's full scaling to 1 and text scaling to 1.5. gsettings set org.gnome.desktop.interface scaling-factor 1 gsettings set org.gnome.desktop.interface text-scaling-factor 1.5 Some applications also depend on Xft and X root window DPI. .Xresources: Xft.dpi: 144 Xft.hinting: 1 Xft.hintstyle: hintslight Xft.antialias: 1 Xft.rgba: none Xcursor.size: 48 Xcursor.theme: Adwaita xrandr dpi (in my i3 startup config): $ xrandr --dpi 144 I have a smaller secondary monitor. I just render it at 1.5x resolution and scale down: $ xrandr --output DP-2-2 --scale 1.5x1.5 --pos 0x0 At least for me, the result is perfect HiDPI support (Chrome, GTK, Qt and IntelliJ respect it).
- denormalfloat 8y agoDo you happen to know by chance what scaling algorithm is used?
- lima 8y agoThe GPU does the downscaling, I think it's bicubic by default. Looks decent enough. With the latest xrandr master, you can set nearest-neighbor using "--filter nearest", which should provide better results.
- vetinari 8y agoAt least on macOS and X11/xrandr --scale, the output encoder does the scaling, not the GPU. It need less energy to do that, than spinning up the GPU, and the all GPU resources are available to the applications (scaling entire framebuffer at 60 Hz would take significant memory bandwidth from GPU at least).
- lima 8y agoThanks, I stand corrected!
- andromedavision 8y agoWayland has been a nightmare for me since upgrading to ubuntu 18.04 I had to disable it because videos would not play for long without freezing either on the browser or vlc. Only a hard restart of the machine would resolve this.
- bkor 8y agoI'm using mpv to play videos. It has a very minimal OSD, not all distributions enable this OSD. Mpv works good enough under Wayland. It also makes use of hardware acceleration, this I need because my CPU is too slow to play most things without it (Intel nuc5ppyh).
- AsyncAwait 8y agoI have exactly the opposite experience. Whereas with Xorg, transitions would be choppy, not so with Wayland.
- andrewaylett 8y agoMy FHD screen is just a touch too small to be comfortable at native resolution, while 1.5x makes things too big. Also, I find Firefox's built-in scaling to be much better quality than scaling using Gnome. It could be better exposed; the `layout.css.devPixelsPerPx` property in about:config is what you need to tweak. So I keep Gnome at 1.0x, and Firefox at 1.25x, which as an extra bonus means that "80%" scaling takes Firefox back to native scale again.
- eptcyka 8y agoIn these cases, what I've found to work quite well is to not bother with scaling at all for Gnome, but rather up the font sizes in the tweak tool and scale Firefox individually :) Seems to work out rather well.
- y7 8y agoWhile it's not as conveninent as desktop-wide fractional scaling, note that in particular Firefox has already had HiDPI support via the layout.css.devPixelsPerPx config variable, which you can set through about:config.
- UI_at_80x24 8y agoThis tip saved me a lot of headache. I'm currently running KDEv5 and while I got 'most' of the scaling adjusted properly, this setting fixed the size of the tabs, and other annoyances I was experiencing on FireFox. Thank-you.
- y7 8y agoYou're welcome! It also works in Thunderbird, if you're using that.
- ktpsns 8y agoTo be honest, I just turn the resolution down at the graphics card level. Gives me slightly more blurry pixels at my Thinkpad X1 13" HiDPI display, but I am not able to tell apart pixels at that insane resolution anyway. Side effect: It is computationally cheap and of course no compatibility problems with GTK/Qt/X11 to expect.