But really almost all the tech exists (aside from server side scaling, but this can be ignored for an initial implementation) and toolkits (or at least Qt and perhaps Gtk) should already support this as Windows scaling works in a similar way, it is largely getting a bunch of different projects to play nice together.
QT_DPI="192;128"
via envvars. But it only means that when moving window to another monitor the window will get suddenly re-scaled/re-sized, instead of being smoothly drawn using different scaling factor.
The window manager is at the best position to support something like this since it handles window placement. It is possible to have a separate program that can keep track of window placement and support the relevant events too (for window managers that wont support this) but it can be tricky to get it work smoothly.
The sudden scale/resize is something that can't really be avoided without support from the compositor (be it the window manager, a separate compositor or server-side composition), assuming there is one of course (this should work without a compositor too, you'd just wont get the scaled fallback unless the server-side scaling patch is also added to Xorg). Again, can be done and the tech is there, it just needs wiring all these things up.
"One app window, two monitors, two DPIs" https://kde.org/announcements/plasma/5/5.11.0/#wayland
I don't plan on getting one since i find even 1440p/27" too much for my taste (i only got it because it was the only high refresh rate monitor with a flat VA panel i could find available when i decided to get a new monitor) but if i ever have to get a hidpi monitor (e.g. someone finally released an OLED monitor but does the annoying thing and only makes it available in a single configuration that happens to be 4K because bigger numbers are better, all other concerns be damned), i'll try to go through everything to get it working on my PC (assuming noone else does it before).
I just mentioned GNOME because I actually really dislike it, and was forced to use it for good tablet support with wayland, they broke those plugins I used.
Also personally I think integer (if any) coordinate scaling, and fractional font-only scaling (or fractional blurry server-side scaling) is the only way to support fractional DPI scaling without breaking the fundamental assumption that integer-aligned pixel rectangles don't overlap or partially cover pixels. Qt's fractional coordinate scaling breaks much of current theming and app painting algorithms.
Gaming can crash the session so I doubt that is a worthy tradeoff.
My work laptop is 4k 13" while my second monitor is 1440p 27". I had to enable some gnome custom scaling flag to unlock fractional custom scaling (as you probably also had to do) - not because I want to run my laptop at e.g. 175%, but because setting the laptop scaling to 200% without fractional scaling turned on would mess up all scaling on the external display too (many elements also 200% etc).
So with fractional scaling on, laptop at 200% scaling and external monitor at default 100% everything does work mostly right... except for all the programs that didn't get the memo and seem to scale properly but show up all blurred. I know it's a big Electron issue (so affects Slack, Chrome and VSCode... my 3 most-used programs) - unsure if it's a problem with other stuff.
But all in all has been kind of annoying.
I know they are working on fixes from the Electron angle but last I checked none of it was very stable.
Your "This Linux tech is pretty shit isn't it" posturing you've shown all over this thread and other Linux posts is _insufferable_.
We don't need novelty accounts to repeat the same trite cynicisms everywhere, there's Reddit for that.
1). Xorg + gnome-flashback or Xorg + other non-compositing WM
or
2). Non-gnome compositor under wayland
As for 1). Xorg b/c it can provide pointer movements at ~native speed via xnput vs Gnome/Wayland 60-240Hz. And gnome-flashback b/c it's a non-compositing WM, so there's no frame buffering (unless you enable it in nvidia's panel, or via TearFree in amdgpu).
As for 2). Sway, I suppose, doesn't aggregate mouse movements, but looking at https://zamundaaa.github.io/wayland/2021/12/14/about-gaming-... the author used some hack to enable "immediate" "drawing" under KWin. I'm not sure what's the default behavior of e.g. Sway - does it buffer frames?
Some list of Wayland compositors: https://wiki.archlinux.org/title/Wayland#Compositors
Personal recommendation goes for sway, once you understand it, there is no going back!
On Gnome, you must use Mutter I guess.
That is FUD.
Screen tearing is subjective issue, personally i never cared for it and my biggest annoyance with Windows is that its forced compositor also adds vsync which forces input lag across the desktop. X allowing me to not use that garbage is a big plus. With a fast refresh rate monitor tearing is practically invisible anyway. Also X11 applications can avoid screen tearing, if some do not then this is a bug in the application.
Security bugs is overblown and Wayland security features are akin to keeping your computer turned off to get the best security. In practice if you do not trust an application you can isolate it, though it is really futile since applications can simply use other means than X to "spy" you. X already provide functionality for doing that but if you are really paranoid (why are you running untrusted applications in that case?) you can run a nested X... or even X under Wayland under X. Then once you notice the onionwrapped application launch your browser or any other application, you'll realize the futility of said onionwrapping but hey, until that moment you'll feel safe.
> end of its life
Xorg is an open source program, you can't "end of line" an open source program, it isn't Visual Basic 6 that died because Microsoft decided it should die. As long as someone wants to improve it, it will get improvements.
Also a new version was released just a few weeks ago with a new maintainer that offered to make new releases.
> being too complicated
Have you actually checked the source code? If you ignore the drivers and all the satellite libraries (like Xt, Xaw, etc) the X server itself isn't really that big or complicated.
> not well designed project
This is irrelevant, it does what it is supposed to do.
This exactly is the point. Wouldn’t it be nice to just use apps without extra steps? It would make Linux better for non-experts.
You can’t even isolate X applications without running other X.org because there is no permission control once the application has access into socket, and with socket it can see everything. And you can’t really rework that. Sometimes you need to rewrite whole thing.
Applications cannot normally spy on you unless you run everything in root. It is X.org which provides access for keystrokes and windows.
> Xorg is an open source program, you can't "end of line" an open source program, it isn't Visual Basic 6 that died because Microsoft decided it should die. As long as someone wants to improve it, it will get improvements.
Because the design is bad, it gets harder and harder to add new features. Fixing bug introduces two new ones. Complexity makes it hard to approach project and control everything. Red Hat has maintained it so many years with proper funding, otherwise who knows what would have happened.
non-experts won't use desktop linux regardless, give me back my power tools
I don't run untrusted apps, at the cost of crashing, and less overall functionality? Its cutting the nose to spite the face.
>You can’t even isolate X applications without running other X.org because there is no permission control once the application has access into socket, and with socket it can see everything. And you can’t really rework that. Sometimes you need to rewrite whole thing.
Not a real world scenario problem.
>Because the design is bad, it gets harder and harder to add new features. Fixing bug introduces two new ones. Complexity makes it hard to approach project and control everything. Red Hat has maintained it so many years with proper funding, otherwise who knows what would have happened.
Wayland design is... good? So it's taken over a decade to add a fraction of x.org features, and it still crashes? If it so simple and it still sucks, are you calling the programmers incompetent for not making the simple compositor functional?
The best practice is zero-trust; handle everything equally. You can't fully say by yourself which is really trustable, and if you are, then you are 0,01% of the actual population, and decision cannot be based on that.
> Not a real world scenario problem. Of course it is, it is the biggest attack surface for normal application.
What real cases have had this happen?
This type of thing is pretty common in old applications like this with a lot of hand-rolled networking code written in C.
Thank you for your expertise in the thread.
Linux is said to be safer in the public, but if x.org is that bad, is windows actually safer since it doesn't use x?
I think its useful to mitigate problems, without real world examples its hard to care about invisible hypotheticals, especially at the cost of lost functionality.
The attack vector for a trojan or ransomware can be a GUI system. It can be anything really, the malware just needs a way to get into the network and then it can cause more trouble and spread to more nodes.
Yes. If deployment is difficult and not applicable in real world settings it isn't really a threat, its like reading about the TouchID since the first iPhone 5S being tricked by copying fingerprints, or needing a bust of a person to trick FaceID. Do people still usually use it? Its a recipe, maybe even its cooked, but if nobody eats the poisoned food because it smells bad, I am not worried I might eat it.
>then significant money is at risk from security vulnerabilities then I'd usually expect security to win out.
In practice it sadly isn't true like the leaks of other people's data that constantly happens.
I think updating browsers is a good idea, I think sandboxing apps can be safer, using a VM for some functionality could be useful too (if you run XP and malware detects its a VM, it doesn't even infect it). Basically I see most security issues as paranoia when its academics publishing hypothetical attacks that have never been seen in the wild, if they made super ebola in a lab or anthrax, I am not too worried about breathing it in.
I would like it patched if the cost is worth it. Intel's was not, I disabled it, and religiously update my browser, my computer is faster, I have safety despite it never existing as an attack because it was easy to defeat.
That's not really comparable, these are trivial exploits that can probably be targeted with a 100-line program, or less.
>In practice it sadly isn't true like the leaks of other people's data that constantly happens.
I've known many security people who take their jobs very seriously. If they weren't doing their jobs, you'd see quite a lot more data breaches than you do now :)
I feel like it would be newsworthy if they were trivial, or we'd see more of them. Today there was a story on malware on Pinephone, a device almost nobody has that didn't cost any money to anyone. If they were trivial, it would be utilized more and we wouldn't need to care about the wayland issues as much since the alternative is worst.
I tried wayland just because of this thread, and I got 2 crashes within minutes.
Actually you can, the X server can run applications in an untrusted state where they cannot see other resources. It is not straightforward to setup though so running a nested X server is much simpler - at least until you realize that the same "untrusted" app has access to the rest of your system anyway.
> It is X.org which provides access for keystrokes and windows.
You can avoid that if you want but as others have mentioned you are way more likely to need that functionality for legitimate purposes.
X11 is 37 years old. Even taking at face value the rumors of its death, I'd say it was shockingly well designed if it's finally - maybe - starting to hit its limits.