Not fully shutting down after switching to Trixie

After migrating (instead of a fresh install) my Pocket over to Debian Trixie with a lot of @josch’s help, most things work just fine except for one little issue:

When shutting down (e.g. with sudo shutdown -h now or via the Waybar menu), the device no longer goes into it’s normal standby state on it’s own. The keyboard light remains on and power usage remains at the same level as when running. I just do a HYPER+Enter -> 0 to finish the shutdown after the screen turns off but it feels a bit wrong to do that.

Any ideas?

If shutdown does not work, then that sounds like a problem with the reform-lpc driver maybe? Your battery percentage shows correctly? Shutdown works fine (both with systemctl poweroff as well as via the waybar menu, which ends up calling the same thing) with my rk3588 pocket which is also on kernel 6.12 with Trixie.

I didn’t even notice at first but yeah, I’m no longer getting battery levels in my waybar or btop.

Is this useful information?

 $ apt list --installed | grep lpc

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

reform2-lpc-dkms/now 1.72-2+reform20250520T090524Z1 all [installed,local]

I also noticed that a whole bunch of reform packages are now only installed “local” and aren’t present in the reform.debian.net package sources ans so can’t be reinstalled or upgraded:

$ apt list --installed | grep reform | grep local

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

fonts-reform-iosevka-term/now 2.3.0-1 all [installed,local]
libcpupower1/now 6.14.6-1~exp1+reform20250520T090524Z arm64 [installed,local]
linux-cpupower/now 6.14.6-1~exp1+reform20250520T090524Z arm64 [installed,local]
linux-libc-dev/now 6.14.6-1~exp1+reform20250520T090524Z all [installed,local]
reform-branding/now 1 all [installed,local]
reform-desktop-full/now 1.72-2+reform20250520T090524Z1 all [installed,local]
reform-desktop-minimal/now 1.72-2+reform20250520T090524Z1 all [installed,local]
reform-tools/now 1.72-2+reform20250520T090524Z1 all [installed,local]
reform2-lpc-dkms/now 1.72-2+reform20250520T090524Z1 all [installed,local]

And reform-check has several complaints after the Trixie migration:

$ sudo reform-check
I: Contents of /proc/device-tree/model: MNT Pocket Reform with RCORE RK3588 Module
I: `uname -a` output: Linux io 6.12.27-mnt-reform-arm64 #1 SMP Debian 6.12.27-1+reform20250524T044902Z (2025-05-24) aarch64 GNU/Linux
I: Version of linux-image-mnt-reform-arm64: 6.12.27-1+reform20250524T044902Z
I: Version of reform-tools: 1.72-2+reform20250520T090524Z1
I: Mount source of /: /dev/reformvg/root (LVM vg 'reformvg' on LUKS device 'reform_crypt' on SSD)
I: Mount source of /boot: /dev/mmcblk0p1 (eMMC)
W: unexpected content in /etc/apt/preferences.d/reform.pref:
--- -	2025-05-26 02:14:56.396705911 +0200
+++ /etc/apt/preferences.d/reform.pref	2025-05-26 02:13:45.416307660 +0200
@@ -1,3 +1,4 @@
 Package: *
-Pin: release n=reform, l=reform
-Pin-Priority: 990
+Pin: origin "reform.debian.net"
+Pin-Priority: 999
+
W: you should not install packages on this system unless you know what you are doing
W: Recommends of reform-desktop-minimal is not installed: reform-qcacld2
I: the following files differ from how they are shipped by reform-tools (ignore /var/lib/alsa/asound.state):
??5??????   /var/lib/alsa/asound.state
??5?????? c /etc/skel/.config/wayfire.ini
??5?????? c /etc/skel/.config/sway/config.d/input
E: the linux-image-mnt-reform-arm64 package cannot come from the MNT repos
E: reform2_lpc is not loaded (battery status information will be missing)
E: /usr/lib/modules/6.12.27-mnt-reform-arm64/updates/dkms/reform2_lpc.ko{.xz} does not exist
E: the reform repository is not known to apt
E: add the following line to your /etc/apt/sources.list to fix this
deb [arch=arm64 trusted=yes] https://mntre.com/reform-debian-repo reform main

Battery indicator works again now, so does fully shutting down.

I had to downgrade most of those packages in order to pull them from reform.debian.net (should have remembered that earlier).

Except these two that have no candidates in the package sources:

# 02:42:38 0 520 esther@io $ apt-cache policy fonts-reform-iosevka-term
fonts-reform-iosevka-term:
  Installed: 2.3.0-1
  Candidate: 2.3.0-1
  Version table:
 *** 2.3.0-1 100
        100 /var/lib/dpkg/status
# 02:42:44 0 521 esther@io $ apt-cache policy reform-branding
reform-branding:
  Installed: 1
  Candidate: 1
  Version table:
 *** 1 100
        100 /var/lib/dpkg/status

Probably the only package that you needed to downgrade as well was “linux-headers-mnt-reform-arm64”, no? reform2-lpc-dkms is stil from the MNT repositories but should work just fine with kernel 6.12 from Trixie. Did you run reform-check before or after you started trying to fix this? It would’ve been interesting to see its output right at the beginning because it has several checks for the situation surrounding linux-headers and the dkms packages. So I’m surprised that none of that is printed in your output.

Abount reform-check: you can run it with --mirror=reform.debian.net and then it will not complain about those settings on your system which are due to you not using the MNT sources.

That a bunch of your packages (those that came from the MNT repo) are now local is okay. You didn’t have to downgrade them but could’ve waited for higher versions to be available in trixie-backports. The reform-branding package will always be local unless you add “non-free” to your package sources. The license of the package is not fit for “main”. If you are not using the iosevka font, you can just remove it. It is a package specific to reform-tools from the MNT repositories. The reform-tools version in Debian does not Depend on it (the font was never in Debian).

Maybe the advice for the more general audience should be: you can convert your apt sources.list from unstable to Trixie now but keep the MNT repository until after the release and only switch out the MNT repo once trixie-backports becomes available. Otherwise, downgrades will be necessary as the packages in the MNT repository today are already far ahead those in Trixie.

I don’t think it is:

$ apt-cache policy reform2-lpc-dkms
reform2-lpc-dkms:
  Installed: 1.71-2+reform20250520T090524Z1
  Candidate: 1.71-2+reform20250520T090524Z1
  Version table:
 *** 1.71-2+reform20250520T090524Z1 999
        999 https://reform.debian.net/debian trixie/main arm64 Packages
        100 /var/lib/dpkg/status
     1.71-2 500
        500 http://deb.debian.org/debian trixie/main arm64 Packages

Did you run reform-check before or after you started trying to fix this?

yes, I ran it before downgrading the packages. but here’s the current output afterwards:

$ sudo reform-check
I: Contents of /proc/device-tree/model: MNT Pocket Reform with RCORE RK3588 Module
I: `uname -a` output: Linux io 6.12.27-mnt-reform-arm64 #1 SMP Debian 6.12.27-1+reform20250524T044902Z (2025-05-24) aarch64 GNU/Linux
I: Version of linux-image-mnt-reform-arm64: 6.12.27-1+reform20250524T044902Z
I: Version of reform-tools: 1.71-2+reform20250520T090524Z1
I: Mount source of /: /dev/reformvg/root (LVM vg 'reformvg' on LUKS device 'reform_crypt' on SSD)
I: Mount source of /boot: /dev/mmcblk0p1 (eMMC)
W: unexpected content in /etc/apt/preferences.d/reform.pref:
--- -	2025-05-26 10:45:11.880296786 +0200
+++ /etc/apt/preferences.d/reform.pref	2025-05-26 02:13:45.416307660 +0200
@@ -1,3 +1,4 @@
 Package: *
-Pin: release n=reform, l=reform
-Pin-Priority: 990
+Pin: origin "reform.debian.net"
+Pin-Priority: 999
+
W: you should not install packages on this system unless you know what you are doing
I: the following files differ from how they are shipped by reform-tools (ignore /var/lib/alsa/asound.state):
??5??????   /var/lib/alsa/asound.state
??5?????? c /etc/skel/.config/sway/config.d/input
??5?????? c /etc/skel/.config/wayfire.ini
E: the linux-image-mnt-reform-arm64 package cannot come from the MNT repos
E: the reform repository is not known to apt
E: add the following line to your /etc/apt/sources.list to fix this
deb [arch=arm64 trusted=yes] https://mntre.com/reform-debian-repo reform main

Yes, you downgraded it to 1.71 from Trixie but in your earlier post you had:

reform2-lpc-dkms/now 1.72-2+reform20250520T090524Z1 all [installed,local]

And version 1.72 is only in the MNT repos. In any case, the lpc-dkms module version should not’ve been the problem. Missing the linux-header package of the correct version was likely the problem. When you apt upgraded, you might’ve seen a message in the installation output telling you that dkms failed to run because the headers were missing. You can check this after the fact in /var/log/apt/term.log which collects the terminal output of past apt invocations.

Try running it like this:

sudo reform-check --mirror=reform.debian.net

That will avoid showing all the warnings for things which are only relevant for the MNT repository.

$ sudo reform-check --mirror=reform.debian.net
I: Contents of /proc/device-tree/model: MNT Pocket Reform with RCORE RK3588 Module
I: `uname -a` output: Linux io 6.12.27-mnt-reform-arm64 #1 SMP Debian 6.12.27-1+reform20250524T044902Z (2025-05-24) aarch64 GNU/Linux
I: Version of linux-image-mnt-reform-arm64: 6.12.27-1+reform20250524T044902Z
I: Version of reform-tools: 1.71-2+reform20250520T090524Z1
I: Mount source of /: /dev/reformvg/root (LVM vg 'reformvg' on LUKS device 'reform_crypt' on SSD)
I: Mount source of /boot: /dev/mmcblk0p1 (eMMC)
W: unexpected content in /etc/apt/preferences.d/reform.pref:
--- -   2025-05-26 11:35:41.649507569 +0200
+++ /etc/apt/preferences.d/reform.pref  2025-05-26 02:13:45.416307660 +0200
@@ -1,3 +1,4 @@
 Package: *
 Pin: origin "reform.debian.net"
 Pin-Priority: 999
+
W: you should not install packages on this system unless you know what you are doing
I: the following files differ from how they are shipped by reform-tools (ignore /var/lib/alsa/asound.state):
??5??????   /var/lib/alsa/asound.state
??5?????? c /etc/skel/.config/sway/config.d/input
??5?????? c /etc/skel/.config/wayfire.ini
E: the reform.debian.net repository is not known to apt

That last line seems wrong. Because:

$ cat /etc/apt/sources.list.d/reform_trixie.sources 
Types: deb
URIs: https://reform.debian.net/debian
Suites: trixie
Components: main
Architectures: arm64
Signed-By:
 -----BEGIN PGP PUBLIC KEY BLOCK-----

Indeed. I have this patch locally:

--- a/bin/reform-check
+++ b/bin/reform-check
@@ -49,7 +49,7 @@ nth_arg() {
 }
 
 OFFLINE=
-MIRROR="mntre.com"
+MIRROR=
 
 while getopts :h-: OPTCHAR; do
   case "$OPTCHAR" in
@@ -102,7 +102,7 @@ if [ "$#" -gt 0 ]; then
   exit 1
 fi
 
-if [ "$MIRROR" != "mntre.com" ] && [ "$MIRROR" != "reform.debian.net" ]; then
+if [ -n "$MIRROR" ] && [ "$MIRROR" != "mntre.com" ] && [ "$MIRROR" != "reform.debian.net" ]; then
   echo "E: invalid value for --mirror: $MIRROR -- only mntre.com and reform.debian.net are supported" >&2
   exit 1
 fi
@@ -606,14 +606,17 @@ else
       echo "E: add the following line to your /etc/apt/sources.list to fix this" >&2
       echo "deb [arch=arm64 trusted=yes] https://mntre.com/reform-debian-repo reform main" >&2
     fi
-    case "$(apt-get indextargets 'Created-By: Packages' 'Repo-URI: https://reform.debian.net/debian/' --format '$(RELEASE)')" in
-      bookworm*) echo "E: you have the reform.debian.net repository enabled while also using the mntre.com mirror. Consider choosing one or the other but not both." >&2 ;;
-    esac
+    if [ -n "$(apt-get indextargets 'Created-By: Packages' 'Repo-URI: https://reform.debian.net/debian/' --format '$(RELEASE)')" ]; then
+      echo "E: you have the reform.debian.net repository enabled while also using the mntre.com mirror. Consider choosing one or the other but not both." >&2 ;;
+    fi
     ;;
   reform.debian.net)
-    case "$(apt-get indextargets 'Created-By: Packages' 'Repo-URI: https://reform.debian.net/debian/' --format '$(RELEASE)')" in
+    release="$(apt-get indextargets 'Created-By: Packages' 'Repo-URI: https://reform.debian.net/debian/' --format '$(RELEASE)')"
+    case "$release" in
+      "") echo "E: unable to obtain release name for reform.debian.net repository" >&2 ;;
       bookworm*) : ;;
-      *) echo "E: the reform.debian.net repository is not known to apt" >&2 ;;
+      trixie*) : ;;
+      *) echo "E: unknown reform.debian.net repository release name: $release" >&2 ;;
     esac
     if [ "$(apt-get indextargets 'Created-By: Packages' 'Repo-URI: https://mntre.com/reform-debian-repo/' --format '$(RELEASE)')" = reform ]; then
       echo "E: you have the mntre.com repository enabled while also using the reform.debian.net mirror. Consider choosing one or the other but not both." >&2

Essentially, the script is only aware of bookworm and not trixie.

I should probably backport this change to reform-tools in Trixie…