Live data from Hacker News

Phoenix: A modern X server written from scratch in Zig

git.dec05eba.com

161–170 of 462 posts

Re: Phoenix: A modern X server written from scratch in Zig

#161
post #107

Earlier quoted context omitted.

BS, windows and macos cant even do proper window managing for a start, and then it just goes downwards from there on.. You can perhaps install various weird third party things, but it does not come with it by default. If you took people who absolutely never tried any computing, and gave them macos, windows, and for example Plasma, they would NOT consider windows or macos to be ready for the desktop. If you go 15 year…

> You can perhaps install various weird third party things, but it does not come with it by default. A Window Manager and Window Server don't come by default with Linux... It's always an install-time option on the major distros. > even in the early 2000s, windows was so hilariously crappy that you had to make floppy disks to even get to install the thing. Windows in the early 2000s installed just fine without a flopp…

Unless you needed a SATA driver not included in the installer because you wanted to avoid a legacy IDE emulation for your disks.

Re: Phoenix: A modern X server written from scratch in Zig

#162
post #23

Earlier quoted context omitted.

It depends on whether their reasons for "absolutely having to have X11" hinge on actual compatibility with e.g. old binaries or wanting full remoting without streaming pixels. This project would satisfy people who really actually want Wayland, but were upset by transitional pains or interactions they had around it and want to stick with X11 just-cause while getting some similar benefits. This arguably does describe s…

Wayland made writing WMs needlessly hard, and the benefits of Wayland were frankly not real - most of the reasons given in 2011 were patched in to X11 later. All the Wayland rewrite got us was a situation where Wayland is both bleeding-edge and obsolete simultaneously. Say what you like about X11, but by the time people unironically pushed for mass Wayland adoption, X11 was stable and boringly so. The future of WMs i…

I think the problem is that people wanting to build that and being in position to (being paid for by their employer), are fed up with X11.

It learned no lessons from X11. It made most things harder to write and pushed more things that really every WM needs and doesn't care much to implement differently to WMs making them harder.

For example, stuff like "WM need to manage raw inputs, so they can have more power over them" is cute on paper but in reality most of them don't want to because there is no benefit to reinventing that part. Sure, that part in X11 could be better, maybe it should have better interface for WMs to configure common options in common way without getting into input-driver-specific options, but that just required rework of the idea, not throwing it into the bin and replacing with near entirely worse framework that wastes everyone time.

Re: Phoenix: A modern X server written from scratch in Zig

#163
post #87

Earlier quoted context omitted.

Wayland made writing WMs needlessly hard, and the benefits of Wayland were frankly not real - most of the reasons given in 2011 were patched in to X11 later. All the Wayland rewrite got us was a situation where Wayland is both bleeding-edge and obsolete simultaneously. Say what you like about X11, but by the time people unironically pushed for mass Wayland adoption, X11 was stable and boringly so. The future of WMs i…

> "most of the reasons given in 2011 were patched in to X11 later" This definitely doesn't match my memory, and I was there :) Most of the good reasons remain unavailable in X11 to this day. There definitely were some attempts to advance X11 that post-date Wayland, most notably the proposals by Keith Packard, but they never got much traction.

At around that time X.org worked entirely fine for me, sans some NVIDIA driver config I had to set up in /etc

few years after even that wasn't required.

Yeah it missed some features I could theoretically use in 2025 but I didn't had different DPI/refresh rate displays back then and those could probably be put into X11 protocol just fine

Re: Phoenix: A modern X server written from scratch in Zig

#164

Earlier quoted context omitted.

> This definitely doesn't match my memory, and I was there :) Most of the good reasons remain unavailable in X11 to this day. You two here don't mention any of the reasons. It is hard to discuss this when there are no specifics, so what was needed, and what was not added?

Per-display DPI settings. No snooping on input without permission. Awareness of the lock screen (the compositor can know that the lock screen is active and provide alternate keybindings instead of having to configure the lock application as well). Locking is not blocked by context menus being open. I ran XMonad for 15 years, but recently switched to river and am loving it.

You can do per-display DPI just fine on X11 (through xrandr), it's just the major toolkits don't support it. GTK, for example, reads a single global DPI value from XSETTINGS; there's no reason why it has to be that way.

The annoying thing about the other things you mention is that they honestly are not that difficult to fix.

The X server can throw an error (or just silently ignore it) when one client passes the window of another client and button/key events in the mask to XSelectInput(). And the Xinput2 bits that allow for receiving all key and button events can be changed to only send events destined for windows in the same client. There: input snooping is fixed.

Lock screen awareness can be fixed with new requests/events in the MIT-SCREEN-SCREENSAVER extension (or, if that's fraught, a new extension) that allow an app to create a "special" lock-screen window, which the X server will always stack on top, and send all events to. (That new functionality should probably allow for child windows and popups for input methods as well.) This is honestly not hard!

And yes, some applications will break when you do this. But I cannot see how that's not significantly better than creating an entirely new display protocol that everyone has to port to.

There are other issues with X11, of course, mainly in the graphics pipeline (e.g. the compositor should really be in the X server), but it's hard to believe these things couldn't be fixed. It feels like no one really wanted to do that: building something new from scratch that (in theory) didn't have all of the mistakes of X11 would be more fun, and more rewarding. And I get that, I really do. But Wayland has created so much work, so many thousands (tens of thousands? hundreds of thousands? million+?) of developer-hours of work for people that maybe could have been better spent.

So I think Phoenix is a great idea. It's basically "X12"[0]: removing the old cruft and making breaking changes to fix otherwise-unfixable problems. I imagine most modern, toolkit-using X11 applications would work just fine with it, without modification. Some -- perhaps many -- won't... but that's ok. Run a nested, rootless X11 server inside "X12" if they can't be fixed, or until they're fixed.

[0] Yes, I know that an X12-type thing was considered and rejected (https://www.x.org/wiki/Development/X12/), but I still think it's a better idea, after a decade and a half of Wayland still not being able to support everything we need to port Xfce's components and maintain all of their features.

Re: Phoenix: A modern X server written from scratch in Zig

#165

Earlier quoted context omitted.

My rpi dashboards are gonna love it

Anything special about Raspberry Pi's that require X11? Raspberry Pi OS defaults to Wayland nowadays, and there's specific kiosk Wayland compositors like Cage ( https://github.com/cage-kiosk/cage ). Tho admittedly kiosk-wm ( https://github.com/JOT85/kiosk-wm ) is much more succinct.

less RAM and power usage

Re: Phoenix: A modern X server written from scratch in Zig

#166
post #40

Earlier quoted context omitted.

I don't use any old hardware, and I have argued for a new X server following almost exactly the steps this project outlines.

Good news. The devs of x11 agree and made a replacement called... Way... Oops

and failed to learn any lesson from X11

Re: Phoenix: A modern X server written from scratch in Zig

#167
post #35

Earlier quoted context omitted.

I thought this too and originally thought that’s what Wayland was going to do but it went off and did its own thing. I’m all for an X12.

An X12 was briefly considered by the community before adopting Wayland: https://www.x.org/wiki/Development/X12/ If you take the time to read through that (very partial) list of cruft and footguns in X11 it probably makes it a little easier to understand why a clean-slate approach was able to attract momentum and why many hands-on involved developers were relatively tired of X11. Critics would of course respond that b…

Realistically rewrite would keep X11 compatibility layer and just do same wayland did, make new protocol.

Just... without all that mess that turned out to be at best +/-, at worst outright negative causing problems for everyone involved. And near all of the "advantages" are "the server is built from scratch" not "the protocol was the limitation"

Re: Phoenix: A modern X server written from scratch in Zig

#168
post #107

Earlier quoted context omitted.

BS, windows and macos cant even do proper window managing for a start, and then it just goes downwards from there on.. You can perhaps install various weird third party things, but it does not come with it by default. If you took people who absolutely never tried any computing, and gave them macos, windows, and for example Plasma, they would NOT consider windows or macos to be ready for the desktop. If you go 15 year…

> You can perhaps install various weird third party things, but it does not come with it by default. A Window Manager and Window Server don't come by default with Linux... It's always an install-time option on the major distros. > even in the early 2000s, windows was so hilariously crappy that you had to make floppy disks to even get to install the thing. Windows in the early 2000s installed just fine without a flopp…

Windows in early 2000s didn't even detect your early 2000s SATA drive

Windows in early 2023 didn't even detect the network card it needed to download network card drivers. After changing mobos I needed to boot into linux to download network drivers for windows...

Windows in early 2025 still uses SCSI emulation to talk with NVMe and only now the server part got a proper driver

Windows in early 2025s still need virtio driver injection to boot properly as a VM without IDE emulation

"Drivers working out of the box" were never windows strong part

Re: Phoenix: A modern X server written from scratch in Zig

#169
post #67

Earlier quoted context omitted.

BS, windows and macos cant even do proper window managing for a start, and then it just goes downwards from there on.. You can perhaps install various weird third party things, but it does not come with it by default. If you took people who absolutely never tried any computing, and gave them macos, windows, and for example Plasma, they would NOT consider windows or macos to be ready for the desktop. If you go 15 year…

15 years back people were given Windows macOS and Linux and people voted which OS were ready for the Desktop and which were not. The only BS is your inflammatory contribution to this topic.

Nope, Macs were expensive stuff games did not run on, and linux was just not pushed by near anyone.

It was not a war "which desktop is easier to use", it was "which system can run stuff I need". And if "the need" was "video games and office stuff", your only choice was windows.

Re: Phoenix: A modern X server written from scratch in Zig

#170

Earlier quoted context omitted.

The people who absolutely have to have X11 like myself usually have reasons. It sounds like currently a lot of those reasons for using X11 would prevent using this X server. Like reliable non-fragmented and widely supported screenreader protocol. Or the ability to do keyboard and mouse sharing. >Applications will be isolated from each other by default and can only interact with other applications either through a GUI…

Accessibility? Sure. Everything else? Nah, I'm sorry. There are countless ways to do remoting with Wayland. There are countless ways to do kb+mouse sharing.

> There are countless ways to do kb+mouse sharing.

Wait, what? I tried this last year. I didn't find any way to do this that wasn't dependent on the WM.

Post reply on HN