12 ms·
Phoenix: A modern X server written from scratch in Zig
- superb_dev 10mo ago> The compositor will get disabled … if the client runs a fullscreen application and disabled vsync in the application. This is interesting to me, why would vsync being enabled mean that the desktop compositor needs to stick around for a full screen app?
- amiga-workbench 10mo agoI imagine because vsync and triple buffering introduce latency. There are cases like games where you don't want all that lag.
- superb_dev 10mo agoIf the goal was to reduce latency, wouldn’t you want the desktop compositor out of the way when vsync is on?
- amiga-workbench 10mo agoThat's very true, and I believe Wayland has a DRM leasing extension just for this use case. SteamVR uses it to punch through the compositor and draw straight to the screen.
- sergiotapia 10mo agoThis is a really really bad name. There's already a Phoenix that is well known in tech. https://phoenixframework.org/ https://phoenixframework.org/ OP if you're the author I suggest you rename to avoid confusion. Don't name it Rails either haha!
- manytimesaway 10mo agoThis is a really really bad comment. I've never heard of the framework you're talking about and I thought you were talking about the Firefox prototype.
- viccis 10mo agoPhoenix is a well known web app framework regardless of your ignorance of it.
- sho_hn 10mo agoIt's still a silly comment. The Phoenix web framework is a little over a decade old, and there are many other tech things named Phoenix that pre-date it, even just within the web application space. I assume Apache Phoenix and the web framework have a lot more to be annoyed at each other for.
- killthebuddha 10mo agoI don't have an opinion on the matter, but it's pretty popular. According to [1], Phoenix "was used extensively over the past year" by 2.4% of responders. [1] https://survey.stackoverflow.co/2025/technology https://survey.stackoverflow.co/2025/technology
- cpursley 10mo agoIf you’re in software dev or frequent hn, how have you not heard of Phoenix? It is consistently voted as most loved web framework.
- MobiusHorizons 10mo agoI’ve been on hn for almost 10 years, and have been doing mostly frontend development for the whole time. As far as I know I have never seen it mentioned. But then I have no interest in elixir, so I might just not have remembered the name even if I saw it.
- mhd 10mo agoI'm also pretty sure that there was an "Elixir" in IT before there was the language said framework is written in… I mean, given that the letter "X" is in both Unix and X11, I'm pretty sure most words containing it have already been used once or twice. (I still think they should've stuck with "Firebird", little danger of confusing a browser with a database system mostly used by Delphi devs)
- hu3 10mo agoYour link is about a nice web framework written in Elixir. But I don't see how a X server implementation should avoid name collision with web frameworks.
- kombine 10mo agoAre different DPIs for different monitors supported too?
- snvzz 10mo agoComplements XLibre[0], an active fork of the X11 server from Xorg. XLibre is trying to advance the existing implementation which Xorg abandoned, whereas Phoenix is writing a new, compatible server from scratch. 0. https://github.com/X11Libre/xserver https://github.com/X11Libre/xserver
- wizzwizz4 10mo agoXLibre is a joke. They're making changes for the sake of changes: for example, commit aefde9 strips out vendoring in an ad-hoc, incomplete fashion (introducing a minor spacing bug in the process); and commit aafd986 replaces `int` with `unsigned int` (instead of `size_t`), failing to properly fix the bug that the compiler warnings identified (albeit, also removing an unrelated C footgun along the way, so this does look like a bug fix). The main author has a history of cowboy commits: 533c45e (which made it into mainline Xorg before he got kicked out) straight-up prevents hw/xfree86/os-support/bsd/arm_video.c from compiling, so it's clear there's no actual testing taking place. I doubt the XLibre authors understand the X security model, either – they never do, in forks like this – and they've alienated most of the security researchers who might otherwise clean up after them. Phoenix and Wayback are much more interesting projects, in my book. Wayback's designed to actually work, and I expect it to be production-ready much sooner; but I expect Phoenix to be the more technically interesting project, since it's deliberately breaking from the X11 spec.
- nixosbestos 10mo ago[flagged]
- msla 10mo agoOK, you can't have your preferred environment because someone else has a different use-case. Moreover, people will condescend to you and insist your setup never worked, nobody ever used it, and nobody cares that it's going away. Plus, they state that you are just being difficult, if not delusional, when you say that you are quite happy with how things are. I mean, your way never worked, so how could it have been your way at all? You must be a troll, troll. Stop trolling.
- s08148692 10mo agoFirst my mind went to Phoenix (elixir framework), then to X (twitter) before it clicked what this was actually about. Some very overloaded names
- gldrk 10mo agoThe meaning of 'X server' has been well-established for 30+ years.
- quesera 10mo ago(tangent) This is true, although entertainingly, the "server" part has always been easily confused. In X11, the "server" runs on your local machine, and the "client" frequently runs on a remote system.
- mananaysiempre 10mo agoYes, it’s simultaneously logical if you look at how it works and immensely strange if you don’t understand the architecture. (As has been noted all the way back to the UNIX-HATERS Handbook[1], although, pace 'DonHopkins, the NeWS Book uses the same terminology—possibly because it was written late enough to contain promises of X11/NeWS.) [1] https://www.donhopkins.com/home/catalog/unix-haters/x-windows/disaster.html https://www.donhopkins.com/home/catalog/unix-haters/x-window...
- the_why_of_y 10mo agoThere is nothing at all strange about the terminology. Go run ps on macOS and marvel at the "WindowServer" process. The generic architectural term is "display server". https://en.wikipedia.org/wiki/Windowing_system#Display_server https://en.wikipedia.org/wiki/Windowing_system#Display_serve...
- hitex 10mo agoThe server runs on the machine that allows clients to connect to it. What is the confusing part about this?
- gldrk 10mo agoIf you are not going to implement X11 drawing ops and XRender (which I, and many others, still use heavily), what's even the point? Any 'modern' program that only does client-side rendering already supports Wayland. AFAIK GTK 3 doesn't even support DRI on X11 unless you somehow trick it into using the abandoned OpenGL Cairo backend, but that's not modern enough apparently.
- drpixie 10mo agoWhere do they say they're omitting drawing and xrender?
- gldrk 10mo agoIt talks about trimming 'legacy' features and specifically says they are omitting 'font-related' operations. That obviously means no useful core X11 application will work (unless you count xlogo and xeyes). Whether the XRender glyph cache mechanism is included is unclear. It also says only DRI is *currently* supported, but maybe that's incidental?
- gooberman 10mo agoXRender isn't part of the core protocol so it should be implemented in the future. There is already some xrender code in there. Almost no applications use x11 core protocol font, except for cursor. Since the x11 core protocol font (on xorg server at least) is rendered without anti aliasing and doesn't really support unicode.
- gsnedders 10mo agoIs there anything at a protocol level that prevents using a modern font rendering stack for it?
- gldrk 10mo agoCore fonts absolutely support Unicode. My (non-Xft) xterm windows are full of Unicode characters right now. It is true that anti-aliasing is not supported by the X.Org server, although scalable fonts have been for a while (https://www.x.org/archive/X11R7.5/doc/fonts/fonts.html#AEN497 https://www.x.org/archive/X11R7.5/doc/fonts/fonts.html#AEN49...). But you don't need anti-aliasing on a high-DPI display, and on a low-DPI display you can use any of the many beautiful bitmap fonts, unlike a lot of ‘modern apps’ these days.
- sho_hn 10mo agoPretty interesting approach to make an X server that is essentially "Wayland-like" (merging display server/compositor by default, isolated apps by default, no remoting of GLX, dropping legacy protocol features to the point of breaking compat with the core protocol, etc.). Not sure who this is for, but by itself it looks like a fairly reasonable set of choices.
- wmf 10mo agoFor people who absolutely have to have X11 this looks like a better plan than XLibre.
- sho_hn 10mo agoIt 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 some people but not sure it's a whole lot in the long run. But who knows, maybe this could also make an easier to maintain XWayland some day, or a nice basis for implementing more esoteric X11 bits down the road vs. the older Xorg codebase.
- vidarh 10mo agoI don't "actually want Wayland" because I want the simplicity of X and the ability to run my own wm, but I have no need for legacy X11 requests, for some values of "legacy". Whether this will become viable for me remains to be seen, but I need very little from my X11 server.
- sho_hn 10mo agoFair! Though I'm actually not sure I understand what you mean with simplicity. X11 is so vastly more complicated than Wayland.
- ccakes 10mo agoThis is a great project! I like and use Wayland but the portal protocols and extension mechanism does leave a lot to be desired. Wayland is still quite a way behind Windows and macOS in terms of what productivity users need An X11 rewrite with some security baked in is an awesome approach. Will be watching!
- drpixie 10mo agoI thought for a long time that rather than move to Wayland, we could come up with a tidied-up version of X. Sounds like a good and useful project, I hope it progresses.
- reactordev 10mo agoI 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.
- sho_hn 10mo agoAn X12 was briefly considered by the community before adopting Wayland: https://www.x.org/wiki/Development/X12/ 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 backwards compatibility is worth the effort and rewrites are often the wrong call, etc. It's the Python 2/3 debate and many others.
- glzone1 10mo agoPython 3 was actively antagonistic to Python 2 code for no reason other than to lecture us about how we were doing things wrong, writing code to support 2 and 3 to help transition was dumb etc etc. For example, in python 2 you could explicitly mark unicode text with u"...". That was actively BLOCKED with python 3.0 which supposedly was about unicode support! The irony was insane, they could of just no-oped the u"". I got totally sick of the "expert" language designers with no real world code shipping responsibilities lecturing me. Every post about this stuff was met by comments from pedantic idiots. So every string had to have a helper function around it. Total and absolute garbage. They still haven't explained to my satisifaction why not support u"..." to allow a transition more easily to 3. Luckily sanity started prevailing around 3.5 and we started to see a progression - whoever was behind this should be thanked. The clueless unicode everything was walked back and we got % for bytes so you could work with network protocols again (where unicode would be STUPID to force given the installed base). We got u"" back. By 3.6 we got back to reasonable path handling on windows and the 3 benefits started to come without antagonistic approaches / regressions from 2. But that was about 8 years? So that burnt a lot of the initial excitement.
- vzaliva 10mo agoMultiple screens support is listed as non-goal. Would that prevent its usage with window managers which support virtiaul desktops? I am i3 user and it is a critical feature for me.
- sho_hn 10mo agoIn short: No. In X11 "screen" has a particular meaning, and only supporting a single screen doesn't preclude multi-monitor support or virtual desktops.
- ddtaylor 10mo agoIs this why back in the day sometimes a Linux distro would have a multi-monitor setup where each monitor was an actual different desktop cube for example. There was a time when each window for an Nvidia graphics card in that type of configuration could not be moved from one screen to another, etc.
- sho_hn 10mo agoYep!
- ndiddy 10mo agoGiven that they're fine with adding breaking changes to the protocol, I think it's a shame that they're not supporting multi-screen. This will lead to the same problem with Xrandr based multi-monitor where you get screen tearing with mixed refresh rate displays. I would prefer to see "traditional X11 multihead but you can move programs between screens" as the solution for multiple monitors. Even if it worked like Mac OS X where you can't have a single window span across multiple monitors, it would still be better than the current state of X11.
- esjeon 10mo agoAs others have already mentioned, the continuous multi-monitor(Xinerama) was an afterthought. A good news is that, by design, it’s actually pretty easy to add in the later steps.
- vitalnodo 10mo agoAnother potentially interesting project is zigx, an X11 client library for Zig applications: https://github.com/marler8997/zigx https://github.com/marler8997/zigx https://www.youtube.com/watch?v=aPWFLkHRIAQ https://www.youtube.com/watch?v=aPWFLkHRIAQ Compared to libX11, it avoids dynamic dependencies, uses less memory, and provides better error messages.
- iamnothere 10mo agoThis is the kind of initiative I’d prefer to see from X preservationists. Great job, I hope it succeeds. I prefer Wayland, but there’s still a place in the world for X; it just needs new dev teams to shoulder the burden.
- grim_io 10mo agoI disagree. The choices in the Linux ecosystem lead to unnecessary fragmentation and development/packaging nightmares. I say let X11 die, bury it, and never let it rise again. Then we can all focus on making just one display server as good as possible.
- nish__ 10mo agoThis is the worst argument ever. The choices in the Linux community is what's made it the best OS in the world today.
- grim_io 10mo agoLinux on the desktop only took of because Ubuntu, with mixed results and a lot of controversy, decided to standardize and polish the experience for "normies". The distribution sprawl I largely see as a detriment to the ecosystem.
- kesor 10mo agoI would argue that Desktop Linux finally took off because of Steam Proton, and because of Windows 10/11 and macOS starting version fartascular or whatever their versions are named.
- uecker 10mo agoI remember seeing Linux gaining some traction 15 year ago, and Ubuntu focusing on polishing the user experience (with initiatives such as fixing "One hundred paper cuts"), but then this changed instead of keeping this stable the great rewriting began. Seeing Wayland (which is just one example) users having a problem with screen sharing just convinces me how much of a self-own this was from the Linux community.
- bnolsen 10mo agoIt's christmas and not april fools!
- nine_k 10mo agoBut this is a treat, not a silly joke!
- deleted 10mo ago[deleted]
- AndyKelley 10mo agoAs the application author you can set the release mode in the build script so that the release flag looks like `zig build --release` instead, and the user doesn't choose the optimization mode. As a user you can pass `--release` to `zig build` to request release mode. If the application doesn't want to pick for you, you'll get an error and then you can pick for yourself. In this case, it looks like the author of Phoenix wants to choose ReleaseSafe as the official release mode of the application. Phoenix is the name of my hometown, btw.
- smj-edison 10mo agoBit of an observation, but I've noticed that there's been quite a few pragmatic projects started in Zig. Bun vs Deno comes to mind (one focused on DX, the other on security), and now this vs Wayland. Not to say that designing something properly is wrong, just that it tends to throw away a lot of important interoperability.
- grumps 10mo agoI finally caved and switched to Wayland 6 months ago or so. Things just work so much more smoothly.
- ilvez 10mo agoSome things do but for some details I'm amazed what I need to do to make it work, like going to sleep with multiple displays. Maybe it's a sway thing and I'm not complaining at all, crafting a solid minimal configuration has its charms. I'm just thinking why did it take me so long to do the switch. I still keep X around, but not sure how long. Like keeping vim around after switching to nvim few years back..
- gooberman 10mo agoWhat are the things specifically that work better? because most of the case people dont have issues because of the x11 (the protocol), but because of how the xorg server works
- shmerl 10mo agoSo this can be an interesting option for XWayland?
- Levitating 10mo agoNo active development in the last 4 months?
- dismalaf 10mo agoCool project I guess, don't see the point but technically interesting. Will be cool to have another modern display protocol/server. I personally would have rewritten Wlroots in Zig or something, but I guess this is more interesting.
- __d 10mo agoSo … does xterm work? emacs? xfig? ghostview? xload? xev? oclock? xmodmap? xpilot?
- esjeon 10mo agoIt’s possible that most of old X11 toys would not work properly, because many of them rely on X11 drawing APIs, but they are pretty simple to implement anyway.
- donio 10mo agoI gave it a quick go and very few things work at the moment. None of the programs you listed do. From the README: At the moment it can render simple applications that do GLX, EGL or Vulkan graphics (fully hardware accelerated) nested in an existing X server. And that sounds about right. As far as I can tell it doesn't yet have a lot of the core X11 stuff that "normal" clients expect. For example xterm doesn't start because requests like X_AllocColor, X_OpenFont, X_PutImage (a few picked at random from the error output) are not implemented yet. glxgears on the other hand does work :)
- CerryuDu 10mo agomotif apps? xmag? xfontsel? forwarding over ssh? ~/.XCompose? "links2 -g"?
- shevy-java 10mo agoI have no idea how well this one works, but I am all up for more projects that can compete against the singularization that corporations currently try (see paid developers for wayland, GNOME and now also KDE). I wonder how much money would be needed to make the xorg server adapt to the modern era; I don't even know the featureset that is missing for this either. But I also know that wayland, after 20 years (!!!), will never cover those requests users had over tohse 20 years, simply because it tries to cater to a narrow specification wanted by corporations rather than the people - so much is now clear (wayland protocol was released in 2008, so it is soon 20 years actually; in a few days we have 2026, so it will be 18 years).
- immibis 10mo agoNice! We do need more X servers, since Wayland refuses to incorporate essential protocol elements due to religion.
- esjeon 10mo agoYeah, we should introduce competition. It doesn’t feel like Wayland is improving these days. Missing features force me to hit X11 regularly, and I still get Wayland session crashes etc, while X11 could happily run over a year without crash and run all applications I need without issues.
- socketcluster 10mo agoThe name Phoenix is overused. There is an Elixir framework called Phoenix. I think I also heard of other projects with that same name before. It's a bit like the name 'Apollo'; besides the moon landing project, I know like 2 dev projects called that and also there is a sales SaaS platform with that name. Surely people should run a search first before choosing a name...
- wewewedxfgdf 10mo agoFrom the ashes of some previous project is born some new project. It's symbolic. I remember people naming new software projects this back in the 1980s for the same reason.
- socketcluster 10mo agoIt's a great name but way overused. I guess everything these days rose from ashes of past failures. Sector is highly competitive.
- bloppe 10mo agoYa, and that's the same reason all those other projects picked this name too
- sodapopcan 10mo agoNot in the case of Elixir. It’s a play on BEAM processes being revived.
- thiht 10mo agoWe get the symbolic reason. It’s still overused and lazy because it doesn’t even relate to the project itself except for its origin in the most generic way. They could at least use PhoenX or FenX to link it with X
- wakawaka28 10mo agoFirefox tried to use it and was sued for trademark infringement. wxPython also has a Phoenix project. It's definitely a catchy, but overused, name.
- PixelForg 10mo agoSame author behind https://git.dec05eba.com/gpu-screen-recorder/about/ https://git.dec05eba.com/gpu-screen-recorder/about/ , the best screen recorder for wayland imo (I had tried other alternatives but none of them helped in recording at 4k 60fps, this worked out of the box).
- ori_b 10mo agoSeems interesting that they're not using the XML protocol specs for code gen, the way the Xorg server does.
- fithisux 10mo agoThis is very good. We can see innovation in this space. Next I suppose is porting Motif to Windows.
- uecker 10mo agoThis is cool. What X is really missing though is a little bit of love from the toolkit side, e.g. proper latency hiding using XCB, support for dis- and reconnect or support for moving windows to display on different devices.
- nialv7 10mo agothe xserver implementation itself is only part of the problem. the other part is the X11 protocol is just bad, and IMHO can't be solved by subsetting. this might make a good alternative to Xwayland though, which can be exciting.
- isopede 10mo agoLook, my setup works for me. Just add an option to reenable spacebar heating.
- Shekelphile 10mo agoDoes this mean we can finally be done with the farce of pretending that Wayland is a serious contender for replacing X11?
- paulryanrogers 10mo agoWhy is it not? I get the impression Wayland has been built by former X devs
- liampulles 10mo agoThe issue (to my understanding) is that it is a very different protocol, which makes it quite onerous for application and desktop environment developers to transition to. Also, since some desktop environments have really grown opposed to Wayland (e.g. XFCE) it puts the application developer in the position of having to wait.
- fleroviumna 10mo ago[dead]
- webprofusion 10mo agoNice but 2008 called and want their git web UI back. I can't take anything "modern" seriously if it seems firmly archaic, my problem I get it.
- lloydatkinson 10mo agoVery much your problem.
- deleted 10mo ago[deleted]
- Zambyte 10mo agohttps://git.kernel.org https://git.kernel.org
- cardanome 10mo agoPlease prioritize to keep accessibility features working. This is really the main issue with wayland. Yes, it might be more stable these days and work fine for you. We can talk how how it makes writing you own WM needlessly complicated and all that but the one thing that makes wayland unacceptable is its lacking accessibility story. After so many years. Accessibility is not something you can worry about adding later. It is the first thing you should think about when designing new software.
- hambes 10mo agoAs someone who is not deep into linux desktop history: Can you please elaborate on the missing accessibility features in wayland or direct me to resources on that? I've been using wayland for a while now and am very happy with it, but my accessibility needs are pretty basic.
- cardanome 10mo agoSee this comment for example: https://news.ycombinator.com/item?id=46380075#46381858 https://news.ycombinator.com/item?id=46380075#46381858 Here is a slightly-hopeful article: https://fireborn.mataroa.blog/blog/i-want-to-love-linux-it-doesnt-love-me-back-post-4-wayland-is-growing-up-and-now-we-dont-have-a-choice/ https://fireborn.mataroa.blog/blog/i-want-to-love-linux-it-d...
- hambes 10mo agothank you!
- bigyabai 10mo ago> Accessibility is not something you can worry about adding later. I don't think there's any concrete proof of this. Ideally I think people want accessibility handled by their WM/DE; you're not getting Windows or macOS-quality a11y "for free" unless your desktop embraces it. At which point you might as well make it a separate, aftermarket protocol and slap it into d-bus. If the Linux ecosystem is going to be fragmented and move past single-point-of-failure, polishing Xorg's accessibility works against the goal of standardized a11y.
- maximgeorge 10mo ago[dead]
- coretx 10mo ago[flagged]
- mkoubaa 10mo agoThe Wayland people were right about everything
- morshu9001 10mo agoFunny that this shows up now. I just started trying to write an entire window server + DE combined in Rust, for educational purposes.
- HolyFenrir 10mo agoBetween this and zigx zig can become the whole x11 stack https://github.com/marler8997/zigx https://github.com/marler8997/zigx