[ cd ../ ]
7 min read

After Years With i3 and X11, I Finally Cheated On Them With Sway

#linux #arch #i3 #sway #wayland #x11 #wm

After Years With i3 and X11, I Finally Cheated On Them With Sway

Or: How a single Zed bug ended a four-year relationship with X11


I’ve been a Linux user for close to four years now. The first two of those years were not really about ricing or curiosity, they were just hardware war survival. My machine could not run Windows comfortably and my React apps at the same time, so I jumped to Linux. I tinkered with a bunch of stuff without really knowing what I was doing, and I talked about most of that mess in a previous article.

Out of all four years, the heaviest setup I’ve used is the one from the last two: a fresh Arch install running X11 and i3. The first time I booted into it, I genuinely thought, “oh, this is paradise.”

i3 and X11: the sweet combo

I did try a bunch of different desktop environments, but I was never a fan of most of them. They mostly just ate my hardware alive for the sake of an extra jelly animation on an opened tab. i3 and X11, on the other hand, were a really nice combo.

If you don’t know what i3 is, it’s basically a tiling window manager. It’s the hard worker responsible for organizing your open windows, deciding how much space they take on screen and where, letting you jump between workspaces fast, and letting you set up keybindings for pretty much anything you’d ever need.

Standing behind i3 was a much older buddy: X11. If you’re wondering what X11 is, it’s basically the service that handles the GUI on most Linux distros, the thing responsible for actually printing those pixels on your screen. The hardworking guy behind the scenes.

Like I said, it’s been more than two years since I fully switched to Arch with i3 and X11, and honestly I never paid much attention to X11 itself, beyond seeing its name on my LightDM login screen. The reason I never got curious enough to dig deeper is simple: I never had any problems with my setup.

Days went by, I kept tweaking my i3 config to fit my needs, and I genuinely enjoyed it. My laptop stopped feeling like a machine and started feeling like an instrument, one I knew exactly how to tune and how to get the most out of.

The cracks in my lovely setup

As this blog has made pretty clear by now, I’m a developer, which means I get to spend way too much time inside my editor. One of the tools I use is Zed, and I genuinely think it’s a masterpiece from the open source community. As long as you’re avoiding Electron for your desktop apps, you’re golden in my book.

So I used Zed a lot, and I really liked it. Then, one day, just one single day, it started acting up. I didn’t think much of it at first. I ran a full system update with pacman -Syu, but that didn’t fix anything. The actual issue was this: “Zed Window Disappears When Switching i3 Workspaces.”

I posted about it on the Zed subreddit, and luckily one of Zed’s core contributors, mgsloan, replied to my post. I really appreciated his time and guidance through the issue. He even pushed a branch with some fixes I tried out. They didn’t fully solve it for me, but that’s not on him, open source is hard and time consuming, and I genuinely appreciate the help.

At first this issue didn’t really bother me. But over time it got annoying, because my Zed window would either lag behind or get stuck rendering on top of some other window from a workspace I had already switched away from.

The “aha” moment

Like I said, I made my peace with the bug for a while. Until one day it clicked: this issue is only ever reported on X11, never on other display servers like Wayland. So… why not just try Wayland out?

Why Sway and Wayland

Once I decided to make the jump to Wayland, there were a bunch of options on the table, but two really stood out: Hyprland and Sway. Sway is basically a drop-in replacement for i3, except it talks to Wayland instead of X11. Hyprland, on the other hand, is a more modern window manager, the one that a lot of the recent famous open source projects (yes, Omarchy included) are built on top of. Its biggest selling point is customization and the kind of buttery animations that let people build genuinely amazing rices.

But for me, even though my laptop is “okay at best,” I don’t have the luxury of running smooth animations all day. I just want my setup to function the way it’s supposed to. So I skipped Hyprland, because I knew it comes with a hardware cost, and nothing is free, dude. That left me with Sway. Since I was already familiar with i3, Sway felt like the natural pick: similar config, similar structure. Hell yeah.

What is Wayland, and what’s even the difference?

Wayland is also a protocol, just like X11. Same goal, same general functionality, but a different approach. With Wayland, the app basically renders its own pixels and hands them directly to the compositor, which then decides where on the screen they should go before the GPU handles the rest.

X11 is a bit more complex. An app draws its pixels, then the X server receives the request, possibly passes it through a compositor like Picom for effects (blur, rounded corners, whatever), and only then does it reach the GPU and the screen.

If that’s still a bit confusing, let’s think of it like food:

X11 is like calling a restaurant, telling them what you want, they cook it, hand it to a decorator who plates it nicely, and then it finally reaches you.

Wayland is like a chef cooking your food and putting it directly on your plate.

I’ll be honest, I didn’t fully get this until I looked it up myself. But I can confirm it’s noticeably more resource friendly, and I didn’t really appreciate that until I had fully switched over.

The switching process

At least in my short and humble experience with Linux, I’ve built up the confidence to mess with things more openly without being scared of breaking them. Not because I don’t break stuff, because trust me, I do, often. But because I know that no matter what I break, I can fix it with the right research. It might take days (and yes, I have to admit I once fried a hard drive during my very first Linux install attempt, so I’m honestly proud I didn’t get traumatized by that).

The actual switch went really smoothly. Installing the packages and setting up the config was basically just porting my i3 config over to Sway, since they’re so similar. Then I edited my bash profile to default into Sway instead of rebooting back into X11 or a TTY, and boom, fresh Wayland and Sway setup. I even managed to swap out a few things along the way: on i3 and X11 I was running eww for my top bar, but on Sway and Wayland I switched to Waybar, which felt so much simpler than eww, to be honest. Just JSON and CSS. Yeah, I lied, I do like simple things.

So, to this day, that Zed bug on i3 and X11 is still not fixed, but it simply doesn’t happen on my new Sway and Wayland setup. On top of that, I noticeably saw my resource usage drop compared to how things were on i3 and X11. So yeah, I’m really happy I made the jump and tried something new.

I think Sway and Wayland are going to be my lovely setup for the coming months, maybe even years. Who knows.