While struggling with Pfizer second dose side effects yesterday, with little ability to do anything serious – so surreal to have a fever yet also certainty you’re not actually ill[1] – I thought I’d try building the branch of Emacs with native Wayland support, and try starting up Sway instead of i3. I recently upgraded my laptop to Debian bullseye, as I usually do at this stage of our pre-release freeze, and was wondering whether bullseye would be the release which would enable me to switch to Wayland.

Why might I want to do this? I don’t care about screen tearing and don’t have any fancy monitors with absurd numbers of pixels. Previously, I had been hoping to cling on to my X11 setup for as long as possible, and switch to Wayland only once things I want to use started working worse on X11, because all the developers of those things have stopped using X11. But then after upgrading to bullseye, I found I had to forward-port an old patch to xfce4-session to prevent it from resetting SSH_AUTH_SOCK to the wrong value, and I thought to myself, maybe I could cut out some of the layers here, and maybe it’ll be a bit less annoying. I have a pile of little scripts trying to glue together xfce4 and i3 to get all the functionality I need, but since there have been people who use their computers for similar purposes to me trying to make Sway useful for quite some time now, maybe there are more integrated solutions available.

I have also been getting tired of things which have only ever half-worked under X, like toggling autolock off when there isn’t fullscreen video playing (when I’m video conferencing on another device, I often want to prevent my laptop’s screen from locking, and it works most of the time, but sometimes still locks, sigh). I have a “normalise desktop” keybinding which tries to fix recurrent issues by doing things like restarting ibus, and it would be nice to drop something so hackish.

And indeed, a lot of basic things do work way better under Sway. swayidle is clean and sane, and I was easily able to add a keybinding which inhibits locking the screen when a certain window is visible. I could bind brightness up/down keys without having to invoke xfce4-power-manager – never managed that before – and, excitingly, I could have those keys bound such that they still work when the screen is locked. I still need two old scripts which interact with the i3/sway IPC, but those two are reasonable ways to extend functionality, rather than bad hacks.

The main thing that I could not figure out is IME – various people claim online to have got typing their Asian languages working natively under Sway, not just into Xwayland windows, but I couldn’t, and there is no standard way to do it yet, it would seem. Also, it seems Qt in Debian doesn’t support Wayland natively, so far as I could tell. And there isn’t really a drop-in replacement for dmenu yet, so you have to run that under Xwayland. A lot of this is probably going to be fixed during 2021, but the thing is, I’ll be on Debian bullseye, so how it works now is probably as good as it is going to get for the next two years or so.

So, wanting to get back to doing something more useful today, I reluctantly booted back into X11. I’m really looking forward to switching to Sway, and getting rid of some of my hacks, but I think I am probably going to have to wait for Debian bookworm – unless I completely run out of patience with the various X11 annoyances described above, and start furiously backporting things.

Update, later that afternoon… Newer versions of fcitx5 packages hit Debian testing within the past few days, it turns out, and the IME problem is solved! So looks like I am slowly going to be able to migrate to Sway during the Debian bullseye lifecycle after all. How nice. Many thanks to various upstreams and those who have been working on these packages in Debian.

[1] Okay, I suppose I could have caught the disease a few days ago and it became symptomatic at the same time I was experiencing the side effects.

Web submission of comments is currently disabled.

If you have feedback please mail it to <spwhitton@spwhitton.name> and let me know if I may post your words publically.