Why Wayland is better than Xorg?

Why linux is switching to Wayland as Display Server? Why they replace Xorg?

X was designed a long time ago (1984 IIRC), and it puts a lot of layers between your program and the actual pixels on the screen. Wayland slims this down, so it’s faster, shouldn’t have problems with tearing, and can support things like different DPI scaling on different monitors. It’s also more secure, since programs can’t access other programs’ windows’ contents. (With X, any app can essentially copy anything in any other app’s windows.)

Of course there are trade-offs. X’s extra layers are what make viewing windows over the network easy. Without access to other windows’ contents, it’s harder to do things as simple as taking a screenshot. And, unlike with X, Wayland doesn’t have a separate window manager per se, so there are fewer “mix and match” opportunities. Instead each Wayland compositor has to do basically what x11, the window manager, and optional compositor do, although there are libraries they can use, so each compositor doesn’t have to do everything from scratch.

(I should say, I’m not an expert, but this is what I’ve picked up from reading over the years.)

3 Likes

What stuck with me is in the Wikipedia page. I’m glad it was there so I don’t have to paraphrase.

...His stated goal was a system in which "every frame is perfect, by which I mean that applications will be able to control the rendering enough that we'll never see tearing, lag, redrawing or flicker.

Will it deliver this? Time will tell. It’s gotta be a bit of a performance trade-off.

2 Likes

It might be worth to emphasize that Xorg design choices were made long time ago. So Wayland was brought by the very same Xorg developers as they found that retrofitting Xorg is becoming increasingly cumbersome.
Also bear in mind, Xorg based applications will still run for a very long time as XWayland will happily provide Xorg server under Wayland.

3 Likes