Separating the Wayland Compositor and Window Manager
River's 0.4.0 release introduces a crucial architectural shift for Wayland, decoupling the compositor from the window manager through a stable protocol. This move significantly lowers the barrier to entry for developing new Wayland window managers, making customization more accessible. Hacker News appreciates this development as it directly addresses a long-standing criticism of Wayland's monolithic design and complexity.
The Lowdown
The latest 0.4.0 release of River, a non-monolithic Wayland compositor, presents a significant architectural change by separating the window manager into a distinct program. This innovation aims to simplify the development of Wayland window managers, which traditionally have required developers to implement an entire Wayland compositor.
- Monolithic vs. Separate: The traditional Wayland architecture combines the display server, compositor, and window manager into a single process. River's new design splits the window manager, allowing it to focus solely on policy without the low-level complexities.
- X11 Comparison: The article details how X11's separate components (display server, compositor, WM) led to latency issues. Wayland resolved this by combining the display server and compositor, but often also bundled the window manager, creating a new bottleneck for WM development.
- River's Protocol (
river-window-management-v1): This stable protocol ensures that window managers have full control over window placement and behavior. It's designed to avoid latency penalties and uphold 'frame perfection' by batching state changes into atomic 'manage sequences' and 'render sequences'. - Benefits: The separation dramatically lowers the barrier for writing Wayland window managers, making it feasible for 'weekend projects.' It also improves developer experience (e.g., WM crashes don't take down the whole session) and allows WMs to be written in high-level, garbage-collected languages without impacting compositor performance.
- Limitations & Future: Currently, River focuses on 2D desktop paradigms, without VR or complex visual effects. The protocol is stable, with future efforts aimed at improving the user experience for starting and switching between River-compatible window managers.
- Call for Support: The author, Isaac Freund, requests financial support to ensure the sustainable development of River.
River's innovative approach promises to foster greater diversity and accessibility in the Wayland ecosystem by tackling one of its core architectural challenges head-on.
The Gossip
Wayland's WM Woes and River's Relief
Many commenters expressed frustration with Wayland's monolithic nature making custom window manager development difficult, often referring to it as a 'critical weakness.' They widely lauded River's approach to separating the compositor and window manager as 'god's work,' significantly lowering the barrier to entry and enabling more flexible, custom desktop experiences. Personal anecdotes highlighted how this change allows for tailored window management policies that were previously impossible or too complex to implement.
The Ever-Enduring X11 vs. Wayland Rumble
The discussion inevitably devolved into the perennial debate between X11 and Wayland. X11 loyalists voiced skepticism about Wayland's complexity, stating they'd stick with X11 due to its perceived flexibility and ease of customization, despite its 'warts.' Conversely, Wayland proponents highlighted its advantages in areas like modern display features (e.g., mixed DPI, high refresh rates) and security, arguing that projects like Sway already offer an i3-like experience on Wayland with minimal friction.
Architectural Analysis and AI Allegations
Commenters delved into the technical diagrams and architectural differences between X11 and Wayland, particularly regarding how each interacts with the kernel. One user provided an extensive explanation of Wayland compositors leveraging kernel facilities versus X's older, more self-contained approach. This led to a pointed (and somewhat rude) exchange where another commenter questioned if the first was an 'AI bot' for discussing X11 in the '90s context, despite the original point being about Xorg's legacy codebase structure.
River's Revolutionary Road Ahead
There was significant optimism for River's potential impact on the Wayland ecosystem. Users saw the project as a vital step towards fostering innovation and experimentation, enabling a 'pluggable desktop' that was previously difficult to achieve. Many emphasized that River's solution directly addresses the need for 'pluggable WMs' in Wayland, a feature often cited as missing compared to X11, even if some initial comments indicated a misunderstanding of what the article was proposing.