Live data from Hacker News

Separating the Wayland compositor and window manager

isaacfreund.com

221–228 of 228 posts

Re: Separating the Wayland compositor and window manager

#221
post #219

Earlier quoted context omitted.

https://github.com/KDE/krdp Works great. Ya'll are exhausting. Wayland is the one thing where nerds on the internet will not even bother grabbing a livecd of a linux distro just to try it out and then complain about things that have been implemented for years.

>The server starts at session login Okay so I STILL have to log in locally before I can log in remotely. Also the list of known issues is pretty concerning. This is in not even close to a remote login solution. You are not accomplishing anything by pretending Wayland is anything more than a half-baked toy at present.

It's actually far superior. X11 only provides frames of the display so you can't do h.264 encoding on RDP streams. With Wayland the compositor provides a stream of the window whether it's video or a game. The RDP protocol encodes it in h264 and you get much lower latency and frame loss. X11 can forward a socket but you get no clipboard, no audio, nothing except key strokes and frames. It's not encrypted. Doesn't scale. Have to use SSH tunneling. And good luck having any influence on what the physical displays are showing. You can only do a virtual display or a physical one but not both.

This RDP implementation has clipboard sharing and audio integration. It spawns in a user session but it actually locks the real screens and creates a virtual display. You can make as many virtual displays as you want. In theory you can attach to a single window or rectangular area of the screen. Also it works perfectly fine with SDDM Autologin so you can spawn a display on your server and just auto unlock it.

The project is actually awesome. It's a holistic and far superior RDP solution to anything in the Linux space before.

Re: Separating the Wayland compositor and window manager

#222

Earlier quoted context omitted.

Works fine for me with 144/120 with the second as 60.

What's happening is you are running both screens at 144/120 and your 60 is gonna have vsync and screen tearing issues.

What vsync issues?

Couldn't you stop tearing with a couple lines of code? Don't swap out buffers mid-frame, very simple.

The simple solution doesn't make 144+60 look super smooth, but 120+60 should be almost perfect.

Re: Separating the Wayland compositor and window manager

#223
post #185

Earlier quoted context omitted.

First they said we couldn’t have screenshots because they were insecure. Then they added them back in. Next, it was accessibility APIs and I guess copy paste is still flaky. Now, it’s window managers. What’s next, Remote Desktop? The whole reason given for wayland’s replacement of x11 was that those things are all fundamentally bad ideas. It’s been 15 years. Linux desktops are more fragmented than ever, and they’re s…

> like HDR And variable refresh rate, better fractional scaling (and per-monitor scaling), atomic updates, native touch & gestures. And the isolation/sandboxing is important. The problem is Wayland didn't have portals in the beginning (hence the screenshot issue). Wayland isn't the problem. The pace at which distros (and GNOME, lets be real who is behind the push here) started stripping out X11 was too fast, and too…

At least for amdgpu, variable refresh rate is at feature parity for x11 and wayland. They use the same kernel drivers for that stuff.

Touch has been working under x11 for 20+ years (even before the iPhone). I have no idea what you are referring to.

Fractional scaling is a bad idea, and much worse than x11’s native DPI support, which works on multiple monitors.

As for multi-monitor, “forbidden secrets of ancient X11 scaling technology revealed” is a good read. (Offline today?)

https://web.archive.org/web/20250625055403/https://flak.tedu...

Re: Separating the Wayland compositor and window manager

#224
post #132

I don't get the frustration with wayland (the protocol) in the comments. This project shows that having a separate window manager was always possible. First we got wlroots as a library that did most of the heavy lifting, and now we got river as an even higher level abstraction. Sure I agree that wayland (the project) could have provided these abstractions much earlier. But anyone else could have done it, too. We get…

> First we got wlroots as a library that did most of the heavy lifting

wlroots is a library for a complete display server + window manager.

It does not separate the two.

Re: Separating the Wayland compositor and window manager

#226
post #70

Earlier quoted context omitted.

My reason for switching from i3 to sway (about 8 years ago) is DPI support. High DPI is a pain in Xorg, and essentially impossible with heterogeneous monitors. The migration was a one way thing. Lots of things are smoother and simpler, and not having to ever again touch Xorg.conf has improved my quality of life. To this day, I still have different monitors with different scale factors.

> not having to ever again touch Xorg.conf has improved my quality of life I haven't touched xorg.conf in decades. I suppose you might have to do it to configure some unique setup, but for me this hasn't been an issue in a long time. Now with Wayland, instead of having to touch a single config file, we have to learn how each compositor/WM is configured, and do it there instead. It hardly seems like an improvement in…

> Now with Wayland, instead of having to touch a single config file, we have to learn how each compositor/WM is configured, and do it there instead.

Not really. I only need to know how to configure the compositor which I use. I don't need to know how to configure all the other compositors, in the same way I didn't know how to configure all the existing Xorg window managers.

Re: Separating the Wayland compositor and window manager

#228
So far this is one of the most interesting approaches to Wayland compositor implementation. I always felt that the "monolithic design" (compositor + window manager) is a step backwards, and that many compositors neglected features like server side decorations (which make easier to have a consistent look & feel).

The NeWS book at page 35 has a picture explaining the structure of the CMU Andrew Window System: the window manager on top of the "base window system" (assuming protocol and logic), which sat on the graphic library, and applications connected to it through sockets. A limit was that the window manager was fixed, so you couldn't change its policy/look and feel without having the sources and recompiling it (and here I wish the source code was available).

Wayland it's kinda similar, but most of the graphic layer is moved from the server into each application (where each one use its own). Unless you have a compositor that is designed to be extensible out of the box, a set of widgets will be needed if you don't ship a desktop environment, and each one is a separate system process (for example: toolbar, clipboard manager, status bar, wallpaper). Another limitation is its "static" protocol, in the sense that you cannot extend the compositor at runtime loading extensions (you have the XML which is used to generate the stubs for the implementation in the compositor AFAIK). This can prevent applications that use them to run on compositors that don't implement them.

On the other hand, systems like NeWS, GMW (a window system from Kyoto University, ASTEC and Omron) and the one described by Rob Pike in "A concurrent window system" are interesting for these reasons:

- runtime extension loading code: new functionalities to the server can be added when needed

- code as a protocol: instead of sending "raw data" and requests, equivalent pieces of code are sent, allowing for compression and to offload a portion of the logic to the server (or even have applications that run inside the server). This can also allow to have applications that run on remote machines, which download the code for the interface to the server.

- concurrency: their programming model is structured around "lightweight processes" (or equivalent), which allow to decompose the interaction in independent tasks, which can eventually interact by sending messages/events or sharing resources.

I think it's worth re-investigating this kind of design, considering also the technological advancement (like the evolution of graphic hardware, multicore CPUs, touchscreens, ecc) and challenges (including security). It would be interesting something like NeWS but a bit more abstract and capable of supporting whatever graphic model you wish.

Post reply on HN