Mastodon.world and Lemmy.world July 2023 blog post
orangeboats @ orangeboats @lemmy.world Posts 0Comments 209Joined 2 yr. ago
Nothing is set automatically I run a window manager and it starts what I tell it to start. I observed that at present fewer env variables are now required to obtain proper scaling.
Fun fact: zero envvars are needed for HiDPI support on Wayland.
You do possibly need envvars to enable Wayland support though, but the latest releases of Qt6, GTK4, SDL3 etc. are enabling Wayland by default these days so in the future everything will work out of the box. By default.
X actually exposes both the resolution and physical size of displays. This gives you the DPI if you happen to have mastered basic math. I've no idea if this is in fact used but your statement NOTHING provides that is trivially disprovable by runing xrandr --verbose.
Did I say XRandR and mixed DPI in my previous comments? Yeah, I think I did. What the Qt applications currently do is choosing the max DPI and sticking with it. There are some nasty side effects, as I will explain below.
You don't in fact actually even need apps to be aware of different DPI or dynamically adjust you may scale everything up to the exact same DPI and let X scale it down to the physical resolution.
Don't forget the side effect: GPU demands and/or CPU demands (depending on the renderer) increase... a lot, nearly 2x in some cases. This might not be acceptable in applications like laptops - have you used projectors in college?
Anecdotally speaking, I gained 1 to 2 hours of battery life just by ditching X11, it's impressive considering my battery life was like 4 to 5 hours back then. Now it's actually competitive with Windows which usually gets 6 to 7 hours of battery life.
Furthermore, scaling up and down in multiple passes, instead of letting the clients doing it in "one go" and have the compositor scan it directly onto your screen, leads to problems in font rendering because of some antialiasing shenanigans in addition to the power consumption increase. It's the very reason why Wayland added a fractional_scaling protocol.
Why would I need to develop another X11 I believe I shall go on using this one which already supported high and mixed DPI just fine when Wayland was a steaming pile of shit nobody in their right mind would use.
Apparently the "nobody" includes GTK, Qt, SDL, and all the mainstream DEs (Xfce and Cinnamon included - even they are preparing to add Wayland support). 90% of the programs I use actually support Wayland pretty well. Good job lad, you managed to invalidate your own argument.
Besides that, you still haven't properly answered the question of mixed DPI: have you seen a properly-scaled-up LoDPI X11 application? It's a big problem for XWayland developers. See it here. And yes... those developers are (were?) X11 developers. I think they know how unworkable X11 is, more than you do.
On the other hand... if you are primarily gaming on your PC, then the moment Wine supports Wayland 90% of your programs will be Wayland-native.
So you simply thought the deficiencies I listed before are not problematic. Got it, have a nice day.
They pick up "automatically" because of how your DE sets up the relevant envvars for you, there is nothing in the protocol that actually tells the applications "hey, this monitor needs X% DPI scaling!".
The side effect of this deficiency in the protocol is very obvious, you can't mix DPIs, because the envvars or Xft.dpi are global and not per-application. Have you seen a blurry LoDPI X11 window sitting right beside a HiDPI X11 window? Or an X11 window changing its DPI dynamically as you move it across monitors with different DPIs?
The fact that SDL2 still doesn't support HiDPI on X11 when it already does on Macs, Windows, and Linux Wayland should tell you something.
Don't throw the "it works for me" excuse on me. Because I can throw it back on you too: "Wayland works on my machine". X11 is utterly broken, just admit it. You are welcome to develop another X11 if you want.
I have been daily-driving Linux for years, but I do boot into Windows from time to time. Even then, I recognize that the out-of-the-box experience of Linux desktop isn't as good as it can be, although it's been rapidly improving.
FYI you need pipewire, xdg-desktop-portal and xdg-desktop-portal-$COMPOSITOR for OBS to work on Wayland. No configuration needed other than installing the packages and relogging in.
Wayland is X12. The people who worked on Wayland were X11 developers too.
It's really not "working" per se. VRR was breaking on X11, sandboxing was breaking on X11, fractional scaling and mixed DPI were breaking on X11.
How did we achieve HiDPI on X11? By changing Xft.dpi (breaking old things) or adding random environment variables (terrible UX - do you want to worsen Linux desktop's reputation even more?). Changing XRandR? May your battery life be long lasting.
There's genuinely no good way to mix different DPIs on the same X server, even with only one screen! On Windows and Mac, the old LoDPI applications are scaled up automatically by the compositor, but this just doesn't exist on X11.
I focus on DPI because this is a huge weakness of X11 and there is a foreseeable trend of people using HiDPI monitors more and more, there are tons of other weaknesses, but people tend to sweep them under the rug as being exotic. And please don't call HiDPI setups exotic. For all the jokes we see on the eternal 768p screens that laptop manufacturers like to use, the mainstream laptops are moving onto 1080p. On a 13" screen, shit looks tiny if you don't scale it up by 150%.
You can hate on Wayland, you may work on an alternative called Delaware for all I care, but let's admit that X11 doesn't really work anymore and is not the future of Linux desktop.
...What? The root window was supposed to mean "the whole screen". It no longer does - that's the lie. Then people created XRandR to help work around it - that's the hack.
It's the fact that the root window is a lie.
Most programs you use (provided they are FOSS) probably already support Wayland, they just don't do it by default. The following list of environment variables can go a long way in making your system largely Wayland-native.
GDK_BACKEND=wayland QT_QPA_PLATFORM=wayland MOZ_ENABLE_WAYLAND=1 #SDL_VIDEODRIVER=wayland # this one is dangerous if you play games
I feel that the biggest mistake of X11's protocol design is the idea of a "root window" that is supposed to cover the whole screen.
Perhaps that worked greatly in the 1990s, but it's just completely incompatible with multi-displays that we commonly see in modern setups. Hacks upon hacks were involved to make multi-displays a possibility on X11. The root window no longer corresponded to a single display. In heterogenous display setups, part of the root window is actually invisible.
Later on we decided to stack compositing on top of the already-hacky mess, and it was so bad that many opted to disable the compositor (no Martha, compositors are more than wobbly windows!).
And then there's the problem of sandboxing programs... Which is completely unmappable to X11 even with hacks.
I never liked those FMVs. They age so badly too, those FMVs looked like a blurry mess when I was playing PS1 games on my PC using an emulator
FYI, X.org (the organization) legally speaking is responsible for Wayland too.
Tell me you know nothing about Chinese EVs without telling me you know nothing about Chinese EVs. BYD's best sellers are actually plug-in hybrids, which is in no way "stolen" from Tesla.
Awesome! I don't have a Discord account (well, I had) so this will be very useful.
If you have IPv6 connection and the address starts with "2", then your public address is the IPv6 address.
Lots of social medias require a phone number nowadays. If you don't add a phone number, at best they annoy you everyday to "secure your account", at worst you can't even login.
It sucks.
Most likely we are never going to be 100% renewable. All (except maybe hydro...) current exploitable renewables are inherently unstable. Take solar for example, it's only available during the day. Or wind power, where it is difficult to predict how much energy will be produced at any given time.
Using nuclear as a supplement to renewables is probably the cleanest solution we have. If the renewables aren't producing enough power, let nuclear fill in the deficit.
The other choice is to build lots and lots of grid energy storage.
It's the fear of centralization, I believe (correct me if I'm wrong!).
Seeing that the whole point of federation is to decentralize the web, putting everything under the Cloudflare umbrella goes against this philosophy.