[TRACKING] Sway / i3 WM on Framework

I love Sway! Thanks!

1 Like

It should work if you install Xwayland (you’ll have to restart sway afterwards to have it recognize that xwayland is installed).

I am curious to know why using sway with XWayland is better than sway without XWayland.

1 Like

I updated my sway-and-i3-related config files on Framework Laptop to the latest ones at https://github.com/junaruga/framework-laptop-config. It’s for someone who is interested in it.


It allows you to run applications that are made for Xorg and not Wayland. If that is something you want to do (and the majority of Linux software is written for Xorg) then you have no choice but to run XWayland.

1 Like

I see. Thanks for the explanation!

1 Like

This is a rather long (and old!) thread and I’m not sure I can answer all the (unanswered?) questions, but considering I have fought with this quite a bit, I figured I could offer my comments…

I switched to Wayland (from i3 to Sway) after buying a Framework 12th gen, because I was having too much graphics issues in Xorg. I documented my migration in this post, but basically, I had to rewrite a few bits I was using in i3 to make them work in Sway. I have, in particular, the following tools now:

  • i3-pa-mixer.py: works in sway or i3, considering the @DEFAULT_SINK@ trick…
  • sway-focus: to get a more “normal” alt-tab (across containers), had to rewrite from my i3-focus, rather annoyingly
  • sway-power-menu: rewritten to use fuzzel instead of rofi
  • dmenu-bash-history: runner that taps into my bash history (and adds to it), to improve on the default dmenu completion, yet another fuzzel/rofi rewrite
  • dmenu-ssh.py: rofi-like SSH completion for dmenu/fuzzel

The wayland section of my migration guide has more info, including a link to the full configuration.

I’m using swayidle to automatically lock the screen. It generally works on suspend, but I’ve seen it fail to lock the screen once, which was disturbing.

My Framework review post also has more information on the trouble I had running Debian on the Framework and which might provide you more information.

I hope that helps!


Thanks for sharing the great tips! The migration guide looks very nice.

1 Like

Just note I asked about XWayland and Wayland on the Ask Fedora forum. Here is one tip on Fedora.

1 Like

wow, thank you for this tip! somehow I had missed that in the pactl manpage, it will make my mixer script much simpler. :slight_smile:

1 Like

Thanks! I have been wanting to move back to Sway again, BUT I never did because I had all these issues with integrating gnome session stuff, authentication, etc.

Are you having any issues with these kind of things? Have you tried running the Steam client or done any gaming with it?

I love Sway, and would love to move to it, instead of forcing Gnome to function like Sway. Which is what I have been doing.

1 Like

… hmm… well not with Sway specifically I’d say. Running things like sway or i3, you often run into weird issues because you don’t run a “normal desktop”, but so far so good, I’d say: sway isn’t better or worse than other alternatives in that regard. I did have touble running it under systemd, but that has somewhat stabilized…

Not really.


I know it is possible, because on the MNT Reform I have I am using Sway and everything just works. No issues whatsoever. For example, i can open gnome-control-center (settings) with no issues. On the Framework running Sway I got all kinds of issues with that, in that the settings from it weren’t being saved and taking affect on the session I was currently in.

If I could get Sway in the same situation as the Reform, I’d know I could use it for everything at that point. Then I would use Sway again. Probably just need to dig a little deeper and compare the config files between the two.

Still I remapped mod + 1-9 to move between workspaces just like sway, and then I just manually put everything on a grid in the workspaces. It is kind of what I would recommend if you prefer tilers but need no quirks in your desktops functionality.

1 Like

For example, i can open gnome-control-center (settings) with no issues.

I’ve experienced the same for the most part, however I’ve never managed to be able to manage Bluetooth (when in Sway) works in Gnome.
Have you found the same?

1 Like

I am not sure how many people are interested in the i3 window manager. But I just want to share that the i3 recently released the latest version 4.22, and the latest version has the gaps feature finally! It works in my environment. The i3 version 4.22 is already available as RPM packages in Fedora.

1 Like

Yeah I3 is awesome. I love Sway though because it is built specifically for Wayland and I feel that is the best option right now. Sway is super energy efficient.

Thanks for the tip though @junaruga!


Can I ask why you’ve gone for a scale factor of 1.2?
According to my calculations, the scale factor should be 2.1, and I want to check if my logic is right:

The screen is roughly double the pixel-density of regular monitors, so it makes sense that the scale wants to be around 2, right?

Because the “1.2” is the best size for the Firefox menu bar and sway’s bar (waybar) for me. screenshot


output eDP-1 scale 1.2

I tried the sway with the scale 2.1 now, and the menu bar is too big for me.

output eDP-1 scale 2.1
1 Like

Is this still the case today? I may have to try this myself when time allows.


Honestly not sure. I have since learned that one big flaw in the way I tried to use sway before was that I did not have a polkit service running. Because of this no escalation requests to root could be actioned, and in general the shell was unaware of a lot of things being triggered. I wouldn’t be surprised if the lid sensor was just not being utilized because it wasn’t getting routed to the correct service.

That said, I REALLY like Sway, and I think I am going to try to set it up again. I’ll report back here when I manage to find time for that. I’m interested in your results, but I’ll share mine as well.

1 Like

logind.conf works fine with Sway and has more options than swayidle for triggering suspend on events like lid closing, or special timeouts that depend on specific conditions like being plugged in to power. For lid closing behavior, for example, set a value for HandleLidSwitch=:


If you use a display manager, your system should already be tracking your session’s idle time when you log in. If you don’t use a display manager, you can kick it off manually in your Sway config with swayidle idlehint (just set it to one minute, then set your actual idle time for an event in logind.conf):

exec swayidle idlehint 1

If you’d like, you can trigger a screen lock before a suspend event (such as timeout or lid closing) with swaylock:

exec swayidle before-sleep 'swaylock -p --config ~/.config/swaylock/config'

If you don’t use a Swaylock config, just substitute your Swaylock command in that part.