Update broke battery monitoring

I ran an apt upgrade this morning, and now battery monitoring seems broken.

upower doesn’t even list the battery anymore:

 ~ upower --dump
Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         no
  updated:              Mon 01 Dec 2025 10:50:15 AM CET (47 seconds ago)
  has history:          no
  has statistics:       no
  unknown
    warning-level:       none
    percentage:          0%
    icon-name:          'battery-missing-symbolic'

Daemon:
  daemon-version:  1.90.9
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  no
  critical-action: PowerOff

You were on rk3588 pocket reform with Debian unstable, right?

Instead of telling you to run some commands I’d like you to try out some improvements to reform-check which might uncover what’s going on (and then maybe this can also help others automatically in the future). I created this MR:

Could you download and run the version of reform_check from this MR? That should be this file: https://source.mnt.re/reform/reform-tools/-/raw/8cb9dcc1e17153e19d8d834ad1767343be5db5e6/bin/reform-check

Other than that, could you share the last entry of /var/log/apt/history.log to see what got upgraded? Thank you!

I’m on rk3588 and Debian stable.

Here’s my /var/log/apt/history.log from today:

Start-Date: 2025-12-01  09:14:59
Commandline: apt upgrade
Requested-By: esther (1000)
Install: linux-headers-6.17.8+1-common:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z, automatic), linux-headers-6.17.8+1-mnt-reform-arm64:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z, automatic), linux-kbuild-6.17.8+1:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z, automatic), linux-image-6.17.8+1-mnt-reform-arm64:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z, automatic)
Upgrade: ezurio-qcacld-2.0-dkms:arm64 (0.0~git20240408.aa96a9f+dfsg-7+reform20250623T081239Z~bpo13+1, 0.0~git20240408.aa96a9f+dfsg-8~bpo13+1), linux-cpupower:arm64 (6.16.3-1~bpo13+1+reform20250826T191649Z, 6.17.8-1~bpo13+1+reform20251126T085426Z), libcpupower1:arm64 (6.16.3-1~bpo13+1+reform20250826T191649Z, 6.17.8-1~bpo13+1+reform20251126T085426Z), linux-image-mnt-reform-arm64:arm64 (6.16.3-1~bpo13+1+reform20250826T191649Z, 6.17.8-1~bpo13+1+reform20251126T085426Z), linux-headers-mnt-reform-arm64:arm64 (6.16.3-1~bpo13+1+reform20250826T191649Z, 6.17.8-1~bpo13+1+reform20251126T085426Z), linux-libc-dev:arm64 (6.16.3-1~bpo13+1+reform20250826T191649Z, 6.17.8-1~bpo13+1+reform20251126T085426Z)

Start-Date: 2025-12-01  09:44:01
Commandline: apt upgrade
Requested-By: esther (1000)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-12-01  09:44:15

Start-Date: 2025-12-01  09:44:41
Commandline: apt autoremove
Requested-By: esther (1000)
Remove: linux-headers-6.16.1-common:arm64 (6.16.1-1~exp1+reform20250823T232542Z), linux-headers-6.16.1-mnt-reform-arm64:arm64 (6.16.1-1~exp1+reform20250823T232542Z), linux-image-6.16.1-mnt-reform-arm64:arm64 (6.16.1-1~exp1+reform20250823T232542Z), linux-kbuild-6.16.1:arm64 (6.16.1-1~exp1+reform20250823T232542Z)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-12-01  09:45:02

Start-Date: 2025-12-01  09:45:32
Commandline: apt autoremove
Requested-By: esther (1000)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-12-01  09:45:46

Start-Date: 2025-12-01  09:46:16
Commandline: apt upgrade
Requested-By: esther (1000)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2025-12-01  09:46:30

Start-Date: 2025-12-01  09:47:34
Commandline: apt remove linux-image-6.17.8+1-mnt-reform-arm64
Requested-By: esther (1000)
Remove: linux-headers-6.17.8+1-mnt-reform-arm64:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z), linux-image-mnt-reform-arm64:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z), linux-headers-mnt-reform-arm64:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z), linux-image-6.17.8+1-mnt-reform-arm64:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z)
End-Date: 2025-12-01  09:47:41

Start-Date: 2025-12-01  09:48:10
Commandline: apt install linux-image-mnt-reform-arm64
Requested-By: esther (1000)
Install: linux-image-mnt-reform-arm64:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z), linux-image-6.17.8+1-mnt-reform-arm64:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z, automatic)
End-Date: 2025-12-01  09:48:56

Start-Date: 2025-12-01  09:49:30
Commandline: apt autoremove
Requested-By: esther (1000)
Remove: linux-headers-6.17.8+1-common:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z), linux-kbuild-6.17.8+1:arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z)
End-Date: 2025-12-01  09:49:32

Context: I encountered an issue during an apt upgrade this morning which left apt in a broken state. I tried to resolve this by uninstalling and reinstalling the latest kernel package. At least the inconsistent apt state was resolved after that.

I see the Sub-process /usr/bin/dpkg returned an error code in your log but I assume this is due to errors with the dkms module which is incompatible with kernel 6.17 from backports? Or was there a different problem? If you already closed the terminal, you can find the answers in /var/log/apt/term.log.

I think this is the one:

Log started: 2025-12-01  09:14:59
Selecting previously unselected package linux-image-6.17.8+1-mnt-reform-arm64.
(Reading database ... 741205 files and directories currently installed.)
Preparing to unpack .../0-linux-image-6.17.8+1-mnt-reform-arm64_6.17.8-1~bpo13+1+reform20251126T085426Z_arm64.deb ...
Unpacking linux-image-6.17.8+1-mnt-reform-arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Preparing to unpack .../1-ezurio-qcacld-2.0-dkms_0.0~git20240408.aa96a9f+dfsg-8~bpo13+1_all.deb ...
Module ezurio-qcacld-2.0/0.0~git20240408.aa96a9f+dfsg for kernel 6.16.1-mnt-reform-arm64 (aarch64):
Before uninstall, this module version was ACTIVE on this kernel.
Deleting /lib/modules/6.16.1-mnt-reform-arm64/updates/dkms/qcacld2.ko.xz
Running depmod...... done.

Module ezurio-qcacld-2.0/0.0~git20240408.aa96a9f+dfsg for kernel 6.16.3+1-mnt-reform-arm64 (aarch64):
Before uninstall, this module version was ACTIVE on this kernel.
Deleting /lib/modules/6.16.3+1-mnt-reform-arm64/updates/dkms/qcacld2.ko.xz
Running depmod....... done.

Deleting module ezurio-qcacld-2.0/0.0~git20240408.aa96a9f+dfsg completely from the DKMS tree.
Unpacking ezurio-qcacld-2.0-dkms (0.0~git20240408.aa96a9f+dfsg-8~bpo13+1) over (0.0~git20240408.aa96a9f+dfsg-7+reform20250623T081239Z~bpo13+1) ...
Preparing to unpack .../2-libcpupower1_6.17.8-1~bpo13+1+reform20251126T085426Z_arm64.deb ...
Unpacking libcpupower1 (6.17.8-1~bpo13+1+reform20251126T085426Z) over (6.16.3-1~bpo13+1+reform20250826T191649Z) ...
Preparing to unpack .../3-linux-cpupower_6.17.8-1~bpo13+1+reform20251126T085426Z_arm64.deb ...
Unpacking linux-cpupower (6.17.8-1~bpo13+1+reform20251126T085426Z) over (6.16.3-1~bpo13+1+reform20250826T191649Z) ...
Selecting previously unselected package linux-headers-6.17.8+1-common.
Preparing to unpack .../4-linux-headers-6.17.8+1-common_6.17.8-1~bpo13+1+reform20251126T085426Z_all.deb ...
Unpacking linux-headers-6.17.8+1-common (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Selecting previously unselected package linux-kbuild-6.17.8+1.
Preparing to unpack .../5-linux-kbuild-6.17.8+1_6.17.8-1~bpo13+1+reform20251126T085426Z_arm64.deb ...
Unpacking linux-kbuild-6.17.8+1 (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Selecting previously unselected package linux-headers-6.17.8+1-mnt-reform-arm64.
Preparing to unpack .../6-linux-headers-6.17.8+1-mnt-reform-arm64_6.17.8-1~bpo13+1+reform20251126T085426Z_arm64.deb ...
Unpacking linux-headers-6.17.8+1-mnt-reform-arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Preparing to unpack .../7-linux-headers-mnt-reform-arm64_6.17.8-1~bpo13+1+reform20251126T085426Z_arm64.deb ...
Unpacking linux-headers-mnt-reform-arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z) over (6.16.3-1~bpo13+1+reform20250826T191649Z) ...
Preparing to unpack .../8-linux-image-mnt-reform-arm64_6.17.8-1~bpo13+1+reform20251126T085426Z_arm64.deb ...
Unpacking linux-image-mnt-reform-arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z) over (6.16.3-1~bpo13+1+reform20250826T191649Z) ...
Preparing to unpack .../9-linux-libc-dev_6.17.8-1~bpo13+1+reform20251126T085426Z_all.deb ...
Unpacking linux-libc-dev (6.17.8-1~bpo13+1+reform20251126T085426Z) over (6.16.3-1~bpo13+1+reform20250826T191649Z) ...
Setting up linux-libc-dev (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Setting up libcpupower1 (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Setting up linux-headers-6.17.8+1-common (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Setting up linux-cpupower (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Setting up linux-kbuild-6.17.8+1 (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
Setting up linux-image-6.17.8+1-mnt-reform-arm64 (6.17.8-1~bpo13+1+reform20251126T085426Z) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.16.3+1-mnt-reform-arm64
I: /initrd.img.old is now a symlink to boot/initrd.img-6.16.3+1-mnt-reform-arm64
I: /vmlinuz is now a symlink to boot/vmlinuz-6.17.8+1-mnt-reform-arm64
I: /initrd.img is now a symlink to boot/initrd.img-6.17.8+1-mnt-reform-arm64
/etc/kernel/postinst.d/dkms:
Sign command: /lib/modules/6.17.8+1-mnt-reform-arm64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Autoinstall of module reform2_lpc/1.76 for kernel 6.17.8+1-mnt-reform-arm64 (aarch64)
Building module(s)....(bad exit status: 2)
Failed command:
make -j8 KERNELRELEASE=6.17.8+1-mnt-reform-arm64 -C /lib/modules/6.17.8+1-mnt-reform-arm64/build M=/var/lib/dkms/reform2_lpc/1.76/build

Error! Bad return status for module build on kernel: 6.17.8+1-mnt-reform-arm64 (aarch64)
Consult /var/lib/dkms/reform2_lpc/1.76/build/make.log for more information.

Autoinstall on 6.17.8+1-mnt-reform-arm64 failed for module(s) reform2_lpc(10).

Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
dpkg: error processing package linux-image-6.17.8+1-mnt-reform-arm64 (--configure):
 installed linux-image-6.17.8+1-mnt-reform-arm64 package post-installation script subprocess returned error exit status 1
Setting up ezurio-qcacld-2.0-dkms (0.0~git20240408.aa96a9f+dfsg-8~bpo13+1) ...
Loading new ezurio-qcacld-2.0/0.0~git20240408.aa96a9f+dfsg DKMS files...
Building for 6.16.1-mnt-reform-arm64, 6.16.3+1-mnt-reform-arm64 and 6.17.8+1-mnt-reform-arm64

Building initial module ezurio-qcacld-2.0/0.0~git20240408.aa96a9f+dfsg for 6.16.1-mnt-reform-arm64
Sign command: /lib/modules/6.16.1-mnt-reform-arm64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module(s)........................................

Indeed, this problem will be fixed in the reform-tools version scheduled for upload to trixie-backports. Running reform-check would’ve also told you that this is the problem. Or you tell me if it does not because then I have to fix it. :slight_smile:

reform-check (excerpt)

E: linux-headers-mnt-reform-arm64 is not installed -- cannot compile reform2_lpc module
E: reform2_lpc is not loaded (battery status information will be missing)
E: /usr/lib/modules/6.17.8+1-mnt-reform-arm64/updates/dkms/reform2_lpc.ko{.xz} does not exist
E: the linux header package linux-headers-6.17.8+1-mnt-reform-arm64 for the currently running kernel is not installed

looks like what you said