5 ms·
What exactly is wrong with "scaling" on Linux? I use Qt apps on Plasma and everything just works. Nearly all my displays are HiDPI now.
by dTal 5y ago
What exactly is wrong with "scaling" on Linux? I use Qt apps on Plasma and everything just works. Nearly all my displays are HiDPI now.
- vladvasiliu 5y ago> Nearly all my displays are HiDPI now. Well, that's the whole thing. HiDPI in and of itself works well. I use it with a 24" UHD monitor and I absolutely love the setup. But the main issue with Linux, at least with X11, is that it doesn't handle multiple displays with different DPI settings. As you noted, QT seems to work fine, as do some other toolkits that have dynamic scaling according to the monitor size. Alacritty does this too, for example (don't know what toolkit they use, though). But GTK in particular is terrible. Yes, you can configure it to use scaling, in which case it works well, IF you don't need fractional scaling (though recent versions of Gnome seem to support it somehow). But now, if you're going to use, say, a HiDPI laptop with a "regular", larger external monitor, you're gonna have a bad time. If you enable scaling, the widgets will be huge on the LoDPI display. If you disable it, widgets will be teeny tiny on the HiDPI one.
- badsectoracula 5y agoNote that the problem isn't really with X11 (or at least Xorg) since it does provide the necessary information via RandR to perform per-monitor scaling. The issue is really with window managers and toolkits. What needs to happen is that window managers ask the applications (the top level windows really) to scale themselves -this can be done not just for DPI purposes- and then the applications should apply that scaling. (applications should expose that they can support this - like they expose that they support handling a 'close window' event - so that compositing window managers can do it themselves for applications that do not support it, which is also why this needs to go through the window manager) Qt can do this but AFAIK window managers do not do this because there isn't any standard events for that - i remember an email about this exact topic when i took a look at the Xorg mailing list for WMs some time ago, but it didn't seem to be going anywhere (in that it barely had any replies). So it really is about standardizing how it is to be done. I think the main reason it isn't done is that such setups are comparably rare (i mean hidpi displays themselves are very rare - if you check any desktop resolution stats they often barely are a blip - and having both a hidpi display and a regular dpi one is even less common than that) so developers aren't that interested in implementing such a thing. One way it could be done however is also pushing the idea that this isn't just for multimonitor setups: as i wrote above, you can use that for generic scaling, which is useful even for single monitor regular dpi setups (if anything it can be very useful for low resolution setups - like 1366x768 and similar which are way more common than hidpi - when faced with applications with a lot of padding, etc).
- grishka 5y agoThe issue with Linux is that nothing is part of the system. There's no single standard GUI toolkit. There's no single standard windowing system. There's way too many variations of everything.
- herbst 5y agoSome of us don't call that an issue ;) it just makes discussions about what's possible more complicated
- badsectoracula 5y agoThis isn't really an issue, you just need people to agree around doing some common stuff (even if they do their own stuff elsewhere). And this is really not that dissimilar under Windows: nowadays you have a lot of different GUI toolkits and applications still need to "opt-in" and explicitly support stuff like scaling, so you have a lot of applications that do not do that.
- pjmlp 5y agoThey don't even agree with what they are supposed to support from freedesktops.org. On Windows, Win32 doesn't do that by default because it would break backwards compatibility from those Windows 95 binaries being run on a Windows 10 2021 edition, so it must be a conscious decision to enable it. UWP and WinUI work just fine.
- badsectoracula 5y agoYeah but practically nobody really uses UWP so it doesn't count :-P
- pjmlp 5y agoWindows 11 will change that, as everything gets merged back into Win32 and WinUI takes its place as official UI framework, even for .NET applications.
- danieldk 5y agoWhat exactly is wrong with "scaling" on Linux? I use Qt apps on Plasma and everything just works. Nearly all my displays are HiDPI now. If you use 2x scaling (or other integer scaling), everything is fine. If you need fractional scaling, things break down pretty quickly, at least on GNOME. Once you use fractional scaling (e.g. 1.5), GTK applications will scale correctly, but are slightly slower and consume more mattery. However, all XWayland applications are unusably blurry. Unfortunately, fractional scaling is really needed on 14" 1080p laptops or 4k e.g. 27" screens. With 1x scaling everything is tiny and with 2x scaling gigantic. The only workaround that worked ok for me was using 1x scaling and using font scaling in GNOME. Many controls and icons are tiny that way, but at least text is readable and not blurry. Of course, this only works up to some extend and when both screens need the same amount of scaling (since font scaling cannot be configured per screen). [1] https://gitlab.gnome.org/GNOME/mutter/-/issues/566 https://gitlab.gnome.org/GNOME/mutter/-/issues/566
- hollerith 5y agoOn a non-HiDPI display (I use one that is 1680 by 1050 and one that is 1280 by 1024) fractional scaling works fine on my machine running Gnome 34 with apps that bypass XWayland and talk directly with Wayland (which is true of all the apps I use). (Google Chrome needs to be started with a couple of command-line switches to bypass XWayland.) But your comment makes me hesitate to buy a HiDPI monitor!
- hollerith 5y agoEr, I mean Gnome 40 on Fedora 34.
- dTal 5y agoI guess this is the issue with saying "Linux" supports or doesn't support things. My software stack of Xorg/Qt/Plasma works fine. Your stack of Wayland/GTK/GNOME doesn't. Should we hold it against "Linux"? Is that a fair comparison to MacOS, where everything uses Cocoa? For that matter, how do GTK apps look on MacOS?