Debian/bookworm (stable)

These are notes to run Debian/stable on a Pocket.

Currently it covers:

  • Copy manually wireless firmware files (needed until package is available on the repositories, see notes below).
  • Use tuigreet and allow it to shutdown/reboot.
  • Do not show p2p wireless interface in NetworkManager.
  • The command swaymsg "output * dpms on" sometimes does not resume display.
# Copy firmware files
## Point url to the current reform-qcacld2 package:
url="https://mntre.com/reform-debian-repo/pool/main/r/reform-qcacld2/reform-qcacld2_20241025T223532Z_arm64.deb"

mkdir /tmp/wireless_firmware
cd /tmp/wireless_firmware

curl "${url}" > reform-qcacld2_arm64.deb
ar x reform-qcacld2_arm64.deb
tar -xJpf data.tar.xz
mv etc/modprobe.d/reform-qcacld2.conf /etc/modprobe.d/
mv usr/lib/firmware/qcacld2/bdwlan30.bin      /usr/lib/firmware/bdwlan30.bin
mv usr/lib/firmware/qcacld2/otp30.bin         /usr/lib/firmware/otp30.bin
mv usr/lib/firmware/qcacld2/qwlan30.bin       /usr/lib/firmware/qwlan30.bin
mv usr/lib/firmware/wlan/qcacld2/cfg.dat      /usr/lib/firmware/wlan/cfg.dat
mv usr/lib/firmware/wlan/qcacld2/qcom_cfg.ini /usr/lib/firmware/wlan/qcom_cfg.ini
cd -

# Make greetd use tuigreet
## substitute command = "/usr/sbin/agreety --cmd /bin/sh"
## for             command = "/usr/bin/tuigreet --window-padding 4 --remember --asterisks --cmd /usr/bin/sway --power-shutdown 'systemctl poweroff' --power-reboot 'systemctl reboot'"
sed -i "s;^command = \"/usr/sbin/agreety --cmd /bin/sh\"$;command = \"/usr/bin/tuigreet --window-padding 4 --remember --asterisks --cmd /usr/bin/sway --power-shutdown 'systemctl poweroff' --power-reboot 'systemctl reboot'\";" /etc/greetd/config.toml

# Disable p2p0 wlan interface on NetworkManager:
printf '[keyfile]\nunmanaged-devices=interface-name:p2p0\n' > /etc/NetworkManager/conf.d/99-unmanaged-device-p2p0.conf

Turning off the display on sway with swaymsg output dpms commands works but sometimes it does not turn it back on. One workaround is setting the brightness to zero and restore it back. Use something like:

swayidle timeout 600 'brightnessctl -s && brightnessctl s 0' resume 'brightnessctl -r'

Notes:

2 Likes

I fail to recall the reason for this but why are you installing ezurio-qcacld-2.0-dkms with version 0.0~git20230623.2cd31b6-4 instead of using version 0.0~git20240408.aa96a9f+dfsg-1~bpo12+1 from bookworm-backports?
See Debian -- Details of source package ezurio-qcacld-2.0-dkms in bookworm-backports

The firmware workaround is still necessary because my package ezurio-qca-firmware has been in NEW since the beginning of July: ezurio-qca-firmware - Debian NEW package overview

Thanks!

2 Likes

Right, that is not needed. I replayed what I needed in July, but currently that package is already available.

Added:

  • Use tuigreet and allow it to shutdown/reboot.
  • NetworkManager does not show p2p wireless interface.

Can you file an issue here so that this feature can be picked up by the reform-setup wizard? Especially the entry in /etc/sudoers is of interest: Issues · Reform / MNT Reform Setup Wizard · GitLab

This is no longer necessary since Install firmware-atheros for qca9377 bluetooth (94cfe634) · Commits · Reform / reform-system-image · GitLab and Install wireless regulatory database (9d0e169a) · Commits · Reform / reform-system-image · GitLab

That’s this issue: pocket imx8mp: qcacld_wlan exposes p2p0 interface (#4) · Issues · Reform Team / reform-debian-packages · GitLab

I appreciate that you are making a script to work around current issues, but what do you think about:

  • maintaining this information as a wiki article so that it can be collaboratively improved
  • filing issues about (or merge requests fixing) the problems so that the issues get ultimately solved instead of increasing the tooling necessary to work around them :slight_smile:
1 Like

Sure! These are a better place to keep these things.

Nevermind, please ignore this post.

You sure? I can turn your original post into a wiki post if you like.

Ok, do it a wiki, thank you.

Done. I tried editing it (updating the url). Does something show up for you or do I automatically edit it instantly because I’m a mod?

Thank you! Yes, I actually see the updated url now :slight_smile:

Added: workaround to blank the screen using brightnessctl instead of “swaymsg output dpms on”. The later sometimes does not resume the display.

@amospalla it’s interesting that you seem to run into trouble with “dpms on/off” on your pocket. There is an open issue by @michals: No display off in idle (in Sway) (#29) · Issues · Reform / reform-system-image · GitLab where this configuration:

exec swayidle -w \
                timeout 600 'swaylock -f -c 000000' \
                timeout 600 'swaymsg "output * dpms off"' \
                     resume 'swaymsg "output * dpms on"' \
                before-sleep 'swaylock -f -c 000000'

Apparently is causing no problem. When I was still on imx8mq I saw random lock-ups with dpms/on off which went away when I used brightnessctl instead. Motivated by @michals I now tested the dpms on/off method for over a month and I might be observing what you see. Sometimes (around once per week), the display does not come back and I have to log in via ssh to turn it on again. So this is not a lock-up anymore but nevertheless a nasty downside of the dpms on/off method. I’m now wondering whether this issue is due to my setup and what the status on the Pocket Reform is because @michals sees no problem with dpms on/off while you, @amospalla, seem to be observing a similar effect on your pocket as I do on my a311d classic reform. I wonder whether we can somehow get to the bottom of this?

Thank you, I added my experience to the issue.