logoalt Hacker News

raggitoday at 1:59 AM1 replyview on HN

> But, at the same time. A design that requires everyone to implement their own protocols and everyone to refix the same bugs in their own compositor is inherintly bad.

Consider that if every DE wrote their own Xorg implementation the story would be the same.

A key question is why everyone is writing their own compositor, this is not about the protocol design, it's about the state of collaboration.

I spent some time in the last week fixing lowdpi font rendering in cosmic, enabling me to switch to it. I then discovered that cosmic-comp's VRR had a terrible feedback path causing conformant applications to stutter badly, so I have large patch stack rewiring full screen feedback, tranche compatibility, fence timing and so on (it's fucking buttery now though, which is nice). That then showed up some input processing bugs becoming visible via playing videos in firefox, leading further to me discovering that cross-plane locking was causing frame drops too. Now I've got a giant stack of shit I need to cleanup and upstream - but the end result (along with the freetype render patches I got into Firefox a while back) is a better DE than I've had on Linux in decades. Maybe if upstreaming goes well I'll do MPO for an encore.

> In X, if the WM crashes, X is still running, and you can just restart the WM. In Wayland, if you hit a bug it takes everything down with it.

See above, the WM did not need to embed the compositor. That's not a protocol requirement, it's and implementer choice. I actually really wish it didn't. Of all the aforementioned patches only two are in Smithay. As I was actually fixing compositing for the workflow I just had to suffer through I would have had to restart pretty much the whole session anyway - though in fact the later stages of my workflow I was only directly killing cosmic-comp and cosmic-session was automatically restarting it all. No really good way to recover the surfaces though, so apps still need to restart.

This is not unlike the _another_ bug stream I tracked down this evening, where cosmic-applets would fail to display tray icons on both displays correctly - that turned out to be a bug where one icon provider was unresponsive to part of the protocol, coupled with a synchronous dispatch from the event handle into that blocking return call. Perhaps more interestingly though that manifest during diagnosis something I've seen a lot in other DE chains where tray icons for auto-started electron apps were highly sketchy - well a common electron wrapper gives up entirely on the first whiff of an error with the dbus interface and doesn't retry.

Years ago I gave up on Linux DE's because reconfiguring xft, gnome, etc was too much of a time sink. How far I've come, now I'm back :'(


Replies

rjzzleeptoday at 2:44 AM

> A key question is why everyone is writing their own compositor, this is not about the protocol design, it's about the state of collaboration.

Dude, because that is how wayland is designed. X is a display server. Wayland is a protocol with implementation. If you want tiling, you have to roll your own, with ALL the protocols that are needed. It's up to clients to render. It was one of the fundamental critiques people had of the whole thing. 15 years in, and it's still the same. Need Vulkan rendering? See you in two years. And then every single WM has to implement it. Not even the basic premise of fractional scaling is solved properly, except in the one use case which is single monitor usage.

It's not about collaboration. wlroots was an attempt at having a standardized layer, and many protocols made it back into upstream actually. But even there, no two wlroots compositors are the same. We used to call these WMs, because the compositor layer could be separate on X. Anyway, bugs persist for years, some parts are never fixed, lots of basic features that existed in X for decades needed people to implement in their own compositor report back and then create a standardized protocol. So KDE has their own, gnome has their own, Hyprland recently rolled their own, etc.

And then there is of course gnome, which seems to want to break random basic functionality for no good reason(hello tray icons). Gnome of course didn't use to be like that.

But a plug, the absolute best wlroots based compositor I have used is mangowm[1][2]. You report a bug in the morning and in the afternoon dreammaomao has a solution for it. Of course I'm exaggerating a bit, but I think I've used pretty much every major Wayland compositor extensively so far.

[1] https://mangowm.github.io/

[2] https://github.com/mangowm/mango