| |
| ▲ | secure 4 days ago | parent | next [-] | | No, the lesson of “separate display server from window manager” was very clear when Wayland was started. People have been discussing this over the years ever since. (See also “client-side decorations” for another part of this issue that was heavily discussed.) | | |
| ▲ | mananaysiempre 4 days ago | parent [-] | | I seem to remember reading in an old paper (1990s?) that the asynchronous nature of the connection between the X server and the window manager results in essentially unfixable protocol-level races. | | |
| ▲ | ptx 4 days ago | parent | next [-] | | Maybe this one [1] from 1987? It says: > There are many race conditions that must be dealt with in input and window management because of the asynchronous nature of event handling. [...] However, not all race conditions have acceptable solutions within the current X design. For a general solution it must be possible for the manager to synchronize operations explicitly with event processing in the server. For example, a manager might specify that, at the press of a button, event processing in the server should cease until an explicit acknowledgment is received from the manager. [1] https://web.mit.edu/6.033/2006/wwwdocs/papers/protected/xwin... | | | |
| ▲ | immibis 4 days ago | parent | prev | next [-] | | Wayland has a philosophy of "every frame is perfect", which means fixing every race condition. However, X11 doesn't have this philosophy. If the window manager is slow and doesn't respond to a notification that a window has been resized, drawing the new window content over the old borders is the correct thing to do. What sense does it make to freeze the whole display just for a window border? Similarly, tearing gets pixels to the screen faster. | | |
| ▲ | silon42 4 days ago | parent | next [-] | | Reacting somehow to user input, even if not perfect, is more important for me...
That's why we have HW cursors, and frame interpolation in games, etc... | | |
| ▲ | gf000 3 days ago | parent [-] | | HW cursor is an implementation detail, and are used by basically every wayland implementation. And reacting is one thing, big black rectangles blinking on screen is another. |
| |
| ▲ | speed_spread 4 days ago | parent | prev | next [-] | | Perfect frames is what Mac and Windows provide and what Linux should also aim for. Border tearing is a display bug, correctness should come first, Wayland's approach is right. X was designed for CPU and IO constraints that no longer apply. _Graceful_ degradation of slow UI should lower the frame rate, not compromise rendering of individual frames. | | |
| ▲ | hulitu 3 days ago | parent [-] | | > Perfect frames is what ... Windows provide Citation needed.
Windows has its own share of graphics bugs, even on "corporate" hardware (HP). | | |
| ▲ | speed_spread 3 days ago | parent [-] | | Well, exactly. Windows does try to provide perfect frames. If the display glitches, it's considered as bug rather than the momentarily acceptable degradation that OP was praising X for. |
|
| |
| ▲ | Maskawanian 4 days ago | parent | prev | next [-] | | Tearing and hidpi is why I left Linux for Windows between 2012 ans 2022. Once wayland was good enough I returned. Tearing is awful, and should be opt in (which wayland provides), not opt out. | | |
| ▲ | jcelerier 4 days ago | parent [-] | | Conversely, I much prefer lowest latency at the cost tearing; when I'm forced to use windows I generally disabled the compositor there too whenever i could (I certainly don't use one under Linux and that's one of my reasons for being there). I find macOS unuseable, even on brand new top-end mac studios the input lag and slow reaction of the OS to... any user input, is frightening when you're used to your computer reacting instantly. |
| |
| ▲ | mananaysiempre 4 days ago | parent | prev [-] | | The races I recall being described were substantially worse, but that’s largely beside my point. My point is that, now that bare fillrate and framebuffer memory haven’t been a limiting factor for 15 to 20 years, it is a reasonable choice to build a desktop graphics system with the invariant of every frame being perfect—not even because of the user experience, but because that allows the developer to unequivocally classify every imperfect frame as a bug. Invariants are nice like that. And once that decision has been made, you cannot have asynchronous out-of-process window management. (I’m not convinced that out-of-process but synchronous is useful.) A reasonable choice is not necessarily the right choice, but neither is it moronic, and I’ve yet to see a discussion of that choice that doesn’t start with calling (formerly-X11) Wayland designers morons for not doing the thing that X11 did (if in not so many words). To be clear, I’m still low-key pissed that a crash in my desktop shell, which was deliberately designed as a dynamic-language extensibility free-for-all in the vein of Emacs or TeX, crashes my entire graphical session, also as a result of deliberate design. The combination of those two reasonable decisions is, in fact, moronic. But it didn’t need to be done that way even on Wayland. | | |
| ▲ | gf000 3 days ago | parent [-] | | > To be clear, I’m still low-key pissed that a crash in my desktop shell, which was deliberately designed as a dynamic-language extensibility free-for-all in the vein of Emacs or TeX, crashes my entire graphical session, also as a result of deliberate design. The combination of those two reasonable decisions is, in fact, moronic. But it didn’t need to be done that way even on Wayland. This is not a given, though. It's entirely feasible to have a stable "display manager/server" with an extension/plugin system where your WM of choice would sit. Crashing the latter should not bring down the former. |
|
| |
| ▲ | DonHopkins 3 days ago | parent | prev | next [-] | | I covered that in the X-Windows Disaster chapter of the Unix Haters handbook, and many HN posts, and other articles. So it's quite disappointing and underwhelming that Wayland failed to learn or apply any of these lessons. All this stuff was widely discussed long before Wayland was designed in reaction to X11, without considering any alternatives than Windows and Mac. https://donhopkins.medium.com/the-x-windows-disaster-128d398... https://news.ycombinator.com/item?id=22491561 https://news.ycombinator.com/item?id=15035419 https://news.ycombinator.com/item?id=28522534 https://news.ycombinator.com/item?id=44045304 https://news.ycombinator.com/item?id=29964737 https://news.ycombinator.com/item?id=15327339 https://www.donhopkins.com/home/catalog/unix-haters/x-window... https://blog.dshr.org/2024/07/x-window-system-at-40.html David Rosenthal wrote: >There is a certain justice in The UNIX-HATERS Handbook's description of my efforts: Ice Cube: The Lethal Weapon One of the fundamental design goals of X was to separate the window manager from the window server. “Mechanism, not policy” was the mantra. That is, the X server provided a mechanism for drawing on the screen and managing windows, but did not implement a particular policy for human-computer interaction. While this might have seemed like a good idea at the time (especially if you are in a research community, experimenting with different approaches for solving the human-computer interaction problem), it can create a veritable user interface Tower of Babel. If you sit down at a friend’s Macintosh, with its single mouse button, you can use it with no problems. If you sit down at a friend’s Windows box, with two buttons, you can use it, again with no problems. But just try making sense of a friend’s X terminal: three buttons, each one programmed a different way to perform a different function on each different day of the week — and that’s before you consider combinations like control-left-button, shift-right-button, control-shift-meta-middle-button, and so on. Things are not much better from the programmer’s point of view. As a result, one of the most amazing pieces of literature to come out of the X Consortium is the “Inter Client Communication Conventions Manual,” more fondly known as the “ICCCM”, “Ice Cubed,” or “I39L” (short for “I, 39 letters, L”). It describes protocols that X clients must use to communicate with each other via the X server, including diverse topics like window management, selections, keyboard and colormap focus, and session management. In short, it tries to cover everything the X designers forgot and tries to fix everything they got wrong. But it was too late — by the time ICCCM was published, people were already writing window managers and toolkits, so each new version of the ICCCM was forced to bend over backwards to be backward compatible with the mistakes of the past. The ICCCM is unbelievably dense, it must be followed to the last letter, and it still doesn’t work. ICCCM compliance is one of the most complex ordeals of implementing X toolkits, window managers, and even simple applications. It’s so difficult, that many of the benefits just aren’t worth the hassle of compliance. And when one program doesn’t comply, it screws up other programs. This is the reason cut-and-paste never works properly with X (unless you are cutting and pasting straight ASCII text), drag-and-drop locks up the system, colormaps flash wildly and are never installed at the right time, keyboard focus lags behind the cursor, keys go to the wrong window, and deleting a popup window can quit the whole application. If you want to write an interoperable ICCCM compliant application, you have to crossbar test it with every other application, and with all possible window managers, and then plead with the vendors to fix their problems in the next release. In summary, ICCCM is a technological disaster: a toxic waste dump of broken protocols, backward compatibility nightmares, complex nonsolutions to obsolete nonproblems, a twisted mass of scabs and scar tissue intended to cover up the moral and intellectual depravity of the industry’s standard naked emperor. | | |
| ▲ | antisol a day ago | parent [-] | | I just wanted to say thanks - I read the unix-hater's handbook about 15 years ago and it taught me a LOT, maybe even changed my life. The chapter on X was particularly memorable and entertaining. Thanks! |
| |
| ▲ | someguyiguess 4 days ago | parent | prev [-] | | Your memory is insanely impressive to remember such an obscure article from so long ago. |
|
| |
| ▲ | charcircuit 4 days ago | parent | prev | next [-] | | >That's easy to say in hindsight That's an easy way to excuse bad design. Look at the designs of other operating systems designed by professionals and you won't see windows managers having to handle raw inputs or being in the same process as the compositor. | | |
| ▲ | the_why_of_y 4 days ago | parent [-] | | Examples of other operating systems allegedly not designed by professionals: https://en.wikipedia.org/wiki/Desktop_Window_Manager The Desktop Window Manager is a compositing window manager, meaning that each program has a buffer that it writes data to; DWM then composites each program's buffer into a final image. https://web.archive.org/web/20040925095929/http://developer.... The Quartz Compositor layer of Mac OS X comprises the window server and the (private) system programming interfaces (SPI) implemented by the window server. In this layer are the facilities responsible for rudimentary screen displays, window compositing and management, event routing, and cursor management. The window server is a single system-wide process that coordinates low-level windowing behavior and enforces a fundamental uniformity in what appears on the screen. It is a lightweight server in that it does not do any rendering itself, but instead communicates with the client graphics libraries layered on top of it. It is “agnostic” in terms of a drawing model. The window server has few dependencies on other system services and libraries. It relies on the kernel environment’s I/O Kit (specifically, device drivers built with the I/O Kit) in order to communicate with the frame buffer, the input infrastructure, and input and output devices. | | |
| ▲ | charcircuit 4 days ago | parent [-] | | Window management on Windows is done by Explore which talks to DWM where the underlying windows live. Window management on MacOS is done by Dock which talks to Quartz Compositor where the underlying windows live. | | |
| ▲ | abhinavk 4 days ago | parent [-] | | You are conflating Window Manager with Task Switcher programs. | | |
| ▲ | charcircuit 4 days ago | parent [-] | | No, I'm not. Explore and Dock are responsible for more than just that. | | |
| ▲ | simondotau 4 days ago | parent [-] | | Sorry but you’re just wrong. Explore.exe and Dock.app are nere user interfaces and are not involved in the render pipeline of other apps. | | |
| ▲ | charcircuit 4 days ago | parent [-] | | I am talking about window management. Window management is about controling windows, windows managers should not care about how windows are rendered. | | |
| ▲ | dagmx 4 days ago | parent | next [-] | | 1. Nobody else is talking about managing windows as a user. They’re talking about the system that manages windows for drawing and interaction. 2. You’re provably wrong even if someone followed your description because you can kill the dock or explorer process and still be able to switch between windows and move them around. Killing explorer is a little more heavy handed than killing the dock but it doesn’t take down the window manager. | | |
| ▲ | jasomill 2 days ago | parent [-] | | You're not wrong about Explorer, but the parent is also partially right. While you can move, resize, minimize, maximize, and switch between windows without Explorer running, other window management features are limited or nonfunctional without it: 1. Explorer is responsible for the taskbar, and thus the only useful way to view minimized windows. 2. Alt+Tab still switches between windows without Explorer, but the window switching UI does not appear. 3. Virtual desktops still exist without Explorer, but there's no obvious way to switch between or otherwise interact with them. 4. Snapped windows retain their positions without Explorer, but window snapping functionality is not available, and resizing snapped windows does not resize adjacent windows as it normally does. 5. Without Explorer, desktop backgrounds and desktop icons do not appear. 5. Explorer is responsible for handling many system level keyboard shortcuts, including shortcuts for features not obviously related to Explorer or missing window management functionality (e.g., game bar, snipping tool, emoji panel). | | |
| ▲ | simondotau 2 hours ago | parent [-] | | As a reminder, the topic is Wayland, and the great great great great grandparents post was referring to rendering/compositing systems DWM and Quartz as architectural equivalents to Wayland in the major closed source operating systems. The parent, misunderstanding the discussion on compositors, diverted to a discussion about user interfaces. It's an understandable point of confusion given that Microsoft chose to name their compositor “Desktop Window Manager”, when the term “window manager” is typically scoped to user interface. |
|
| |
| ▲ | simondotau 3 days ago | parent | prev [-] | | Explorer.exe and Dock.app have nothing to do with anything anyone is talking about here. |
|
|
|
|
|
|
| |
| ▲ | exe34 4 days ago | parent | prev | next [-] | | No, this was a major point of discussion right at the start. They chose to ignore it. | | |
| ▲ | naikrovek 4 days ago | parent [-] | | They should have looked at Plan9 and the Rio window manager there. I don’t know how GPU acceleration would have fit in, but I bet it would have been trivial provided the drivers were sufficient. All of Rio in Plan9 is 6K lines of code and it’s a more powerful display protocol and window manager (all of the fundamentals are there but none of the niceties) than anything else I’ve ever seen. The defacto way to remote into a Plan9 system from any OS even today is to use a client side program which implements it all the same way Plan9 does. | | |
| ▲ | tuna74 3 days ago | parent [-] | | The beauty with Free Software and Linux distros is that "they" don't have to do it, anyone who wants to (including you!) can do it. | | |
| ▲ | Oxodao 3 days ago | parent [-] | | In theory. In practice, every app is designed for X11 or Wayland, building your own means you need to follow what most people use anyway if you want to have any working app on your system, or rewrite every app yourself | | |
| ▲ | tuna74 2 days ago | parent [-] | | 5-10 years ago there were no apps designed for Wayland. If you build it they (app developers) might actually come! |
|
|
|
| |
| ▲ | StopDisinfo910 3 days ago | parent | prev | next [-] | | Disagree. You need this amount of control to be able to properly filter and secure things. Wayland actually learnt that from X security extensions failure. To me, Wayland failures are more on the organisational and change management part. In inside, it would probably have been better to provide a core library rather a reference implementation. Also, a lot of pieces needed to fall into place once the ball started rolling and some of them like PipeWire took quite some time to be ready. The sorry fragmentation and complete unwillingness to work together of the various Linux DE also didn't help. I think Gnome constant NIH syndrome and overall capture of Freedesktop has a lot to do with where we are. | |
| ▲ | hsbauauvhabzb 4 days ago | parent | prev | next [-] | | I think the lack of base abstraction layer was pretty obvious from the start. | | |
| ▲ | the_why_of_y 4 days ago | parent [-] | | Since this is a Wayland thread, obviously the problem is a lack of a common implementation, which deviates from UNIX tradition. For those who want to complain how lack of choice between multiple implementations is an obvious problem and deviates from UNIX tradition, please wait until the next systemd thread. | | |
| |
| ▲ | DonHopkins 3 days ago | parent | prev [-] | | It also failed to learn the lessons it should have learned from NeWS. |
|