Live data from Hacker News

Understanding the working of X11 from the ground up (2017)

magcius.github.io

31–40 of 134 posts

Re: Understanding the working of X11 from the ground up (2017)

#31
post #23
post #2

> I've made a personal decision to leave the Linux, X11, and Wayland worlds mostly behind. I understand X11 has a lot of unfixable problems, but what's wrong with Wayland world?

In one word, nvidia.

Easy to fix - don't use it. Linux users today stay away from it for good reasons.

Re: Understanding the working of X11 from the ground up (2017)

#32

This is a bit of topic but: Every time I see the X11 protocol, I realize that the UNIX philosophy (everything is a file) is dead. It’s a pity that instead of improving the speed of the file system, everyone started to ignore it, hence making it’s speed even less important, and on and on... And now nobody uses the file system for these purposes.

Not disagreeing we've moved on from it a bit in some places, but.. "Everything is a file" never meant "everything is a disk file" - think of std{in,out,err} or network sockets. The implications are more around having a standard set of syscalls for moving data in and out of a program, abstracting away where it actually lives and treating the data itself as something opaque.

Re: Understanding the working of X11 from the ground up (2017)

#33
post #15
post #6

Earlier quoted context omitted.

I think capturing desktop and screenshots should be addressed by standard Wayland extensions with integration with something like Pipewire as far as I know. I didn't follow the progress of that though. Some details here: https://wiki.archlinux.org/index.php/PipeWire Some features though are surely missing. Such as support for adaptive sync. No one really is pushing that forward. See: https://github.com/swaywm/wlroots…

Like I said... I gave up and bought an AMD card. Not everyone is going to do this. It's a step down from my NVIDIA card. I think there is still hope. Obviously today's reality is still bleak with signed blobs and plenty of question marks, but I think open-gpu-doc is a sign that NVIDIA does actually want to square away this problem, maybe they're just not sure how. I do believe NVIDIA is mostly responsible for Wayland…

Personally I’m not the biggest fan of wayland (I haven’t found a compositor I like and using OpenGL for everything including VTEs feels like a mistake.) but I will say it’s common knowledge (as far as I’m aware) that nvidia drivers on Linux are pretty bad and you’re not going to have a good experience with them no matter what kind of display manager you use.

Re: Understanding the working of X11 from the ground up (2017)

#34
post #28

This is a bit of topic but: Every time I see the X11 protocol, I realize that the UNIX philosophy (everything is a file) is dead. It’s a pity that instead of improving the speed of the file system, everyone started to ignore it, hence making it’s speed even less important, and on and on... And now nobody uses the file system for these purposes.

> Every time I see the X11 protocol, I realize that the UNIX philosophy (everything is a file) is dead. Brings back memories of the old days of the late 1990s trying out so many workstations running obscure Linux distros to actual UNIX OSes like IRIX, Solaris and HP-UX. They all ran some variant of X11 which was part of the UNIX philosophy which I found interesting (X11 forwarding, startx, etc) but as the requirement…

The uncomfortable truth today is that, while having to touch an X config file hasn't been a thing in more than 10 years, it will take you some fiddling with your favourite Wayland compositor (of which only three -- two massive DEs and a tiling compositor -- are anywhere near being useful) just to get it to stop crashing on that one application that you need, or to get things like multiple monitors or middle-click copying and pasting between two particularly misbehaved applications to work. Ironically enough, the least pretentious of them, sway, is by far the most solid.

It's basically all the fun we had with X11 back in 2003, just to get an environment that's about as dependable (though admittedly much faster) as X11 back in 1993.

It's one of those cases where the "release early, release often" mantra kindda seems to work against us. I'm sure ten years from now Wayland will be just as solid as X11 was back in 2013, aka "good enough", but there's a different kind of crowd looking at this stuff today.

Unfortunately, the anti-Wayland buzz propagates easily because the community response is inevitably unsympathetic. Mention things like "I tried Wayland for an afternoon, applications kept crashing" and you'll inevitably get a dozen answers, all of them along the lines of nah bro I'm running Gnome Wayland which is the default in Fedora 67 on my ThinkPad X1 Carbon and I'm not getting any crashes. Well, yeah, 90% of the projects that failed to get traction and adoption in the field of graphical systems did so because they couldn't make the transition from "running on its developers' and fans' computers" to "running on everyone's computer". I can run Wayland on my system just fine, too, but I'm the only one in my immediate circle of nerds who can.

Re: Understanding the working of X11 from the ground up (2017)

#35
post #24
post #20

Earlier quoted context omitted.

X11 and its ecosystem of applications isn't abandoned by Wayland, because you can run an X11 server on Wayland. By all means, debate the merits of Wayland itself, but don't lean on inaccuracies and conspiracy theories.

My window manager won't work, my hotkey daemon won't work, my screenshot tool won't work, any X11 program that draws to the root window won't work. Xwayland is obviously not a working solution to fix the ecosystem problem. Who is inaccurate now? > debate the merits Wayland has no merits. That is kind of the problem. It is just a reimplementation of stuff that worked.

Also, even the limited X11 support which there currently is under Wayland will probably go the way of the dodo because it involves about the same amount of code as supporting X11 natively. For example, it requires every Wayland compositor to be a X window manager with all the complexity that implies, plus running a full hardware-accelerated X server and the OpenGL driver support for that. I can't imagine the desktop environments and distros who are so keen on dropping legacy features like X and support for 32-bit apps will keep all that code around for long.

Once the integrated X support is gone you can't just replace it with a standalone X server of the sort that's available on OSes like Windows and Mac OS X either - by design, the standard Wayland API doesn't provide the functionality required to run X (or Windows) apps. In particular, it provides no way to set or get the absolute position of top-level windows, which apps on those platforms need to support things like menus. In a few years time, I can easily see modern Linux becoming the only current desktop OS that cannot run X apps.

Re: Understanding the working of X11 from the ground up (2017)

#36
post #29
post #24

Earlier quoted context omitted.

My window manager won't work, my hotkey daemon won't work, my screenshot tool won't work, any X11 program that draws to the root window won't work. Xwayland is obviously not a working solution to fix the ecosystem problem. Who is inaccurate now? > debate the merits Wayland has no merits. That is kind of the problem. It is just a reimplementation of stuff that worked.

The wayland project exposes what marvelous piece of software X11 really is since Wayland is still not able to compete, otherwise the whole Linux community would use it already. I respect the intention and efforts of the Wayland community to make things better. However, I wished the community would have focused on making X11 better (easier to maintain with modularity etc.) instead of following the mainstream which is…

> I respect the intention and efforts of the Wayland community to make things better.

My understanding is that Wayland was started by a few core developers of Xorg who just couldn't stand maintaining Xorg anymore.

Re: Understanding the working of X11 from the ground up (2017)

#37
post #32

This is a bit of topic but: Every time I see the X11 protocol, I realize that the UNIX philosophy (everything is a file) is dead. It’s a pity that instead of improving the speed of the file system, everyone started to ignore it, hence making it’s speed even less important, and on and on... And now nobody uses the file system for these purposes.

Not disagreeing we've moved on from it a bit in some places, but.. "Everything is a file" never meant "everything is a disk file" - think of std{in,out,err} or network sockets. The implications are more around having a standard set of syscalls for moving data in and out of a program, abstracting away where it actually lives and treating the data itself as something opaque.

> "Everything is a file" never meant "everything is a disk file" - think of std{in,out,err} or network sockets.

Yeah, and shouldn’t that (theoretically) file systems with very small delay? (For example, RAM based file systems for inter-process communication.)

I thought that it isn’t the slow storage that is blocking use of files, but more of a software problem that has significant overhead to use files as a communication method. (I’m not an expert here; please correct if I’m wrong.)

Re: Understanding the working of X11 from the ground up (2017)

#38
post #31
post #23

Earlier quoted context omitted.

In one word, nvidia.

Easy to fix - don't use it. Linux users today stay away from it for good reasons.

That’s fine if you’re already a Linux user and purchased hardware with Linux in mind.

Re: Understanding the working of X11 from the ground up (2017)

#39
post #32

This is a bit of topic but: Every time I see the X11 protocol, I realize that the UNIX philosophy (everything is a file) is dead. It’s a pity that instead of improving the speed of the file system, everyone started to ignore it, hence making it’s speed even less important, and on and on... And now nobody uses the file system for these purposes.

Not disagreeing we've moved on from it a bit in some places, but.. "Everything is a file" never meant "everything is a disk file" - think of std{in,out,err} or network sockets. The implications are more around having a standard set of syscalls for moving data in and out of a program, abstracting away where it actually lives and treating the data itself as something opaque.

> Not disagreeing we've moved on from it a bit in some places, but.. "Everything is a file" never meant "everything is a disk file"

You're right that it never meant 'everything is a disk file', but generally the implication of the unix philosophy was that everything could be accessed from the filesystem.

Have a look at Plan9, which is essentially directly descended from 7th edition UNIX and IIRC was built from what was going to be 8th edition UNIX. It has a HTTP interface from the filesystem -- one can literally do GET requests on documents from the internet just by opening a file on the filesystem.

Re: Understanding the working of X11 from the ground up (2017)

#40

This is a bit of topic but: Every time I see the X11 protocol, I realize that the UNIX philosophy (everything is a file) is dead. It’s a pity that instead of improving the speed of the file system, everyone started to ignore it, hence making it’s speed even less important, and on and on... And now nobody uses the file system for these purposes.

The problem with file systems is that it is extremely difficult to build reliable systems on top of them. It’s shared mutable state with barely any error handling possibilities.

> It’s shared mutable state with barely any error handling possibilities.

And that makes me think about scoped file systems... (gotten the idea from global & scoped variables)

Since the biggest advantage of ‘everything is a file’ is that it allows a consistent API for manipulating data, why didn’t this happen?

Post reply on HN