How to install Sway to the uConsole on CM5?

Hey guys! I’m trying to setup Sway WM on my uConsole. AFAIK Rex’s images are the only images that supports CM5 (tell me if I wrong). So I decide to install the lite version (without DM) of Debain Trixie from here. Currently I have configured and functional Debian OS only with bare tty. Then I installed sway package via apt-get and tried to run it. Unfortunately I’m getting errors:

[ERROR] [wlr] [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: “eglQueryDeviceStringEXT”

[ERROR] [wlr] [backend/drm/util.c:65] Failed to parse EDID

[main.c:571] wl_display_roundtrip failed

The last lines of full logs:

How to fix this error and start Sway? Maybe I should change the Linux distro?

I tried installing Sway with the same distro by Rex, Debian Trixie, and got the same errors. It may be a problem with the distro. :frowning: I don’t have anything to lose by installing a new distro so I may try Bookworm instead and see if that works.

I’m not alone! I will wait news from you :folded_hands:

Yep, it works on Bookworm!

Yep, works for me too!

1 Like

@HazeSystem I’ve got config from this repo. But it doesn’t rotate my screen. Do you have this problem?

P.S. Fixed by changing screen ID from DSI-1 to DSI-2 in .config/sway/config

Took me a bit to figure out how to use Sway mode bindings. The guide says Fn + Alt_L but it’s actually Fn + Alt_R, just in case you have a hard time too.

1 Like

For posterity, I responded to this in Rex’s trixie thread.

1 Like

Thank you for information! This info will be very useful for others. I’ve already switched to Bookworm and I’ll stay here for a while.

1 Like

Some assembly required, but I use sway(1) on this (albeit on a CM4). It’s something like:

# pacman -S sway
$ sway
1 Like

Has anyone got an application launcher working? The one from the github repo doesn’t work for me, nothing happens when I press Super + d.

fn + super + d ???

`fn + right_alt, d` to be specific, which is what works for me with every other command.

1 Like

My application launcher is not the default but is working fine. How have you got it configured? The relevant parts from my sway config (~/config/sway/config) are

set $mod Mod4
set $menu swaymsg exec fuzzel
bindsym $mod+d exec $menu

Which means that hitting Mod4 (the cmd key on my devterm) and d causes swaymsg exec fuzzel to be run, which runs fuzzel.

So what have you got configured for sway to launch? And perhaps more importantly, what happens when you try to run the same thing from a terminal? I’m able to run swaymsg exec fuzzel in a terminal and still get my menu.

do you know how to change Fn+RAlt to Start button? Not very convenient to press three buttons instead of two…

As launchers themselves are just programs that exec(3) programs, if you can spawn a program, you can spawn a launcher. If a launcher doesn’t work but other programs do, try a different launcher. I’m using wofi(1) with a Gtk frontend right now myself but often if I’m in an X session without a window manager (for what must be the last remaining Xwayland-incompatible program at this point) I’ll use the two xterm(1)s it spawns to run graphical programs without a launcher. There are multiple rofi forks I’ve tried from the AUR that didn’t work at all.

You might find Alt to be an easier modifier than Super on a keyboard where Super, itself, is a chord. It is likely possible to remap game controller inputs (such as Start) to be interpreted as keyboard inputs (such as Super) but I don’t know that the functionality is built into sway(1). This thread has me scratching my head a little because I can’t really see why someone would prefer Super in this specific application (though there is much historical precedent for dedication of Super to the window manager in general).

1 Like

modifying and recompiling keyboard firmware will do!

1 Like

If you look in my guide, you’ll see I’ve remapped the left alt to be super. It’s done via a custom xkb file. The game controller can’t be bound to directly, as it’s not a keyboard device, and sway doesn’t support binding to a game input device. I did explore that possibility, but what I settled on instead was:

  • bind left alt as windows (super) key (no need to hold fn)
  • make all the modifiers “sticky” so they don’t need to be chorded. especially important since you only have the right alt key now.
  • my sway config uses modes, so even without the xkb file, the super key acts in a quasi-sticky way. And for this at least, there’s feedback in the waybar.

I got all that working. One downside: I’m not sure how to provide modifier a key state indicator, which would be nice. There’s some support in waybar for e.g. numlock state, but not ctrl, alt, super, etc. That would be one advantage to making this change in the keyboard firmware rather than at the xkb level.

1 Like