One Up Battery driver update

Hello! I have made changes to my battery driver, so that it will be loaded properly into the system when the battery is detected at startup.

The current version basically just takes over the I2C bus. Not really playing nice in the environment.

Anyway, its available on github under the branch “overylay_driver_possible”. if you know how to use git, and want to pull it down and help me test, I’d appreciate it.

Thanks!

https://github.com/JeffCurless/argon-oneup

Jeff

2 Likes

Hi Jeff, the latest update isn’t working for me. The battery status is stuck at 100% and ‘plugged in’, even when it’s not. Rolling back to the main version fixed the issue.

Thanks… I did forget to mention that you need to remove the old driver first… very odd as I’m watching the battery percentage drop here…

What OS were you running

And … Can I get a copy:

 dmesg -T | grep oneUpPower


If you try it again…

Hi,
I believe the issue arose because the previous DKMS module wasn’t uninstalled before the new version was installed. It’s working fine now.

I’m running RPI OS Lite, with Gnome Descktop.

pablo@ArgonONEUp:~ $ dmesg -T | grep oneUpPower
[dom mar 1 09:00:43 2026] oneUpPower: loading out-of-tree module taints kernel.
[dom mar 1 09:00:43 2026] oneUpPower: Changing automatic shutdown when battery is below 5%
[dom mar 1 09:00:43 2026] oneUpPower: Checking battery profile…
[dom mar 1 09:00:43 2026] oneUpPower: Battery profile is valid.
[dom mar 1 09:00:43 2026] oneUpPower: Probe successful (v1.0.3)
[dom mar 1 09:00:43 2026] oneUpPower: AC Power is disconnected.
[dom mar 1 09:00:43 2026] oneUpPower: Battery State of charge is 74%
[dom mar 1 09:04:51 2026] oneUpPower: Battery State of charge is 73%
[dom mar 1 09:11:11 2026] oneUpPower: Battery State of charge is 72%
[dom mar 1 09:19:51 2026] oneUpPower: Battery State of charge is 71%
[dom mar 1 09:28:47 2026] oneUpPower: Battery State of charge is 70%
[dom mar 1 09:37:31 2026] oneUpPower: Battery State of charge is 69%
[dom mar 1 09:46:09 2026] oneUpPower: Battery State of charge is 68%
[dom mar 1 09:55:03 2026] oneUpPower: Battery State of charge is 67%
[dom mar 1 10:04:45 2026] oneUpPower: Battery State of charge is 66%
[dom mar 1 10:14:25 2026] oneUpPower: Battery State of charge is 65%
[dom mar 1 10:23:27 2026] oneUpPower: Battery State of charge is 64%
[dom mar 1 10:32:00 2026] oneUpPower: Battery State of charge is 63%
[dom mar 1 10:39:41 2026] oneUpPower: Battery State of charge is 62%
[dom mar 1 10:46:44 2026] oneUpPower: Battery State of charge is 61%
[dom mar 1 10:53:39 2026] oneUpPower: Battery State of charge is 60%
[dom mar 1 11:00:38 2026] oneUpPower: Battery State of charge is 59%
[dom mar 1 11:08:06 2026] oneUpPower: Battery State of charge is 58%
[dom mar 1 11:16:10 2026] oneUpPower: Battery State of charge is 57%
[dom mar 1 11:24:42 2026] oneUpPower: Battery State of charge is 56%
[dom mar 1 11:33:31 2026] oneUpPower: Battery State of charge is 55%
[dom mar 1 11:42:30 2026] oneUpPower: Battery State of charge is 54%
[dom mar 1 11:51:40 2026] oneUpPower: Battery State of charge is 53%
[dom mar 1 11:56:43 2026] oneUpPower: Battery State of charge is 52%

Thanks!

@NHHiker thank for work you do on this . so far it ok , run on Arch based EndeavourOS . testing it on sway community Edition

eos@OneUp~ $ sudo dmesg -w | grep oneUpPower
[    5.249099] oneUpPower: loading out-of-tree module taints kernel.
[    5.253962] oneUpPower: Changing automatic shutdown when battery is below 5%
[   10.783678] oneUpPower: Checking battery profile...
[   10.862357] oneUpPower: Battery profile is valid.
[   10.862614] oneUpPower: Probe successful (v1.0.3)
[   10.874036] oneUpPower: AC Power is disconnected.
[   10.883569] oneUpPower: Battery State of charge is 82%
[  333.595798] oneUpPower: Battery State of charge is 81%
[  345.882886] oneUpPower: AC Power is connected.
[  349.979161] oneUpPower: Battery State of charge is 82%
[  375.577794] oneUpPower: AC Power is disconnected.
[  386.841435] oneUpPower: AC Power is connected.
[  438.040149] oneUpPower: Battery State of charge is 83%
[  510.741941] oneUpPower: Battery State of charge is 84%
[  581.395804] oneUpPower: Battery State of charge is 85%
[  653.073688] oneUpPower: Battery State of charge is 86%
[  723.727605] oneUpPower: Battery State of charge is 87%
[  745.230550] oneUpPower: AC Power is disconnected.
[  881.423022] oneUpPower: Battery State of charge is 86%
[ 1177.360047] oneUpPower: Battery State of charge is 85%
[ 1333.012066] oneUpPower: AC Power is connected.
[ 1376.021077] oneUpPower: Battery State of charge is 86%
[ 1447.701653] oneUpPower: Battery State of charge is 87%
[ 1519.381780] oneUpPower: Battery State of charge is 88%
[ 1593.109605] oneUpPower: Battery State of charge is 89%

Edit (AC Power disconnected + connected ) that me unplug / plug power back in .

Thanks guys! I’ll add some code to the install to automatically remove the old stuff… prior to moving new files over.

Jeff

1 Like

This maybe a really stupid question, but to remove the file and dkms for the prior version of the battery driver, do I use the ./remove script provided?

Hi Jeff,

just installed your driver and since it was a first run (before your older versions), I can say it works as intended. I did, however, play with it on having the argon script running/disabled to see if they interfere. So far, works well on both counts. The system is rpi legacy (for now I am not moving on to Trixie since there are some known issues when running Asterisk on it).

Hi Jeff. I have been using the “overylay_driver_possible” branch for a few days now. It looks good so far. No difference for me when running from charger or battery from the “main” branch. Thanks for all your work on the driver. A real game changer from the provided script that puts the battery status on the desktop.

1 Like

I had a few issues installing dkms modules on my system, so only now that I’ve solved them can I rule out that this is related to a signing error. Even though I can successfully load the module, the device does not appear. Maybe it is a conflict with other overlays in config.txt. Can someone from whom the driver works send me their config.txt for comparison?

Hi Jeff,
Since the latest kernel update, the module hasn’t been working correctly for me. Could you take a look att these logs?

pablo@ArgonONEUp:~ $ sudo modprobe oneUpPower
modprobe: ERROR: could not insert ‘oneUpPower’: Invalid argument

pablo@ArgonONEUp:~ $ sudo dmesg | tail -n 20
[ 696.838731] oneUpPower: disagrees about version of symbol i2c_register_driver
[ 696.838742] oneUpPower: Unknown symbol i2c_register_driver (err -22)
[ 696.838749] oneUpPower: disagrees about version of symbol _dev_warn
[ 696.838750] oneUpPower: Unknown symbol _dev_warn (err -22)
[ 696.838761] oneUpPower: disagrees about version of symbol i2c_smbus_write_byte_data
[ 696.838763] oneUpPower: Unknown symbol i2c_smbus_write_byte_data (err -22)
[ 696.838768] oneUpPower: disagrees about version of symbol dev_err_probe
[ 696.838769] oneUpPower: Unknown symbol dev_err_probe (err -22)
[ 696.838774] oneUpPower: disagrees about version of symbol i2c_del_driver
[ 696.838775] oneUpPower: Unknown symbol i2c_del_driver (err -22)
[ 696.838779] oneUpPower: disagrees about version of symbol i2c_smbus_read_byte_data
[ 696.838783] oneUpPower: Unknown symbol i2c_smbus_read_byte_data (err -22)
[ 696.838786] oneUpPower: disagrees about version of symbol __dev_fwnode
[ 696.838787] oneUpPower: Unknown symbol __dev_fwnode (err -22)
pablo@ArgonONEUp:~ $

Any ideas to fix it? Let me know if you need more logs.

Many thanks in advance.

This is the workaround I used to get it working again:

pablo@ArgonONEUp:~ $ sudo apt update
sudo apt install --reinstall linux-headers-$(uname -r)
Obj:1 Index of /debian trixie InRelease
Obj:2 Index of /debian trixie-updates InRelease
Obj:3 http://deb.debian.org/debian-security trixie-security InRelease
Obj:4 Index of /debian trixie InRelease
Todos los paquetes están actualizados.
Summary:
Upgrading: 0, Installing: 0, Reinstalling: 1, Removing: 0, Not Upgrading: 0
Download size: 1.385 kB
Space needed: 0 B / 1.875 GB available

Des:1 Index of /debian trixie/main arm64 linux-headers-6.12.75+rpt-rpi-2712 arm64 1:6.12.75-1+rpt1 [1.385 kB]
Descargados 1.385 kB en 0s (3.991 kB/s)
(Leyendo la base de datos … 211761 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar …/linux-headers-6.12.75+rpt-rpi-2712_1%3a6.12.75-1+rpt1_arm64.deb …
Desempaquetando linux-headers-6.12.75+rpt-rpi-2712 (1:6.12.75-1+rpt1) sobre (1:6.12.75-1+rpt1) …
Configurando linux-headers-6.12.75+rpt-rpi-2712 (1:6.12.75-1+rpt1) …
pablo@ArgonONEUp:~ $ sudo dkms remove oneUpPower/1.0 --all
Module oneUpPower/1.0 for kernel 6.12.62+rpt-rpi-2712 (aarch64):
Before uninstall, this module version was ACTIVE on this kernel.
Deleting /lib/modules/6.12.62+rpt-rpi-2712/updates/dkms/oneUpPower.ko.xz
Restoring archived original module /lib/modules/6.12.62+rpt-rpi-2712/kernel/drivers/power/supply/oneUpPower.ko
Running depmod… done.

Module oneUpPower/1.0 for kernel 6.12.62+rpt-rpi-v8 (aarch64):
Before uninstall, this module version was ACTIVE on this kernel.
Deleting /lib/modules/6.12.62+rpt-rpi-v8/updates/dkms/oneUpPower.ko.xz
Running depmod… done.

Module oneUpPower/1.0 for kernel 6.12.75+rpt-rpi-2712 (aarch64):
Before uninstall, this module version was ACTIVE on this kernel.
Deleting /lib/modules/6.12.75+rpt-rpi-2712/updates/dkms/oneUpPower.ko.xz
Running depmod… done.

Module oneUpPower/1.0 for kernel 6.12.75+rpt-rpi-v8 (aarch64):
Before uninstall, this module version was ACTIVE on this kernel.
Deleting /lib/modules/6.12.75+rpt-rpi-v8/updates/dkms/oneUpPower.ko.xz
Running depmod… done.

Deleting module oneUpPower/1.0 completely from the DKMS tree.
pablo@ArgonONEUp:~ $ sudo rm -rf /var/lib/dkms/oneUpPower
pablo@ArgonONEUp:~ $ sudo dkms add -m oneUpPower -v 1.0
Creating symlink /var/lib/dkms/oneUpPower/1.0/source → /usr/src/oneUpPower-1.0
pablo@ArgonONEUp:~ $ sudo dkms build -m oneUpPower -v 1.0
The kernel is built without module signing facility, modules won’t be signed

Building module(s)… done.
pablo@ArgonONEUp:~ $ sudo dkms install -m oneUpPower -v 1.0
Installing /lib/modules/6.12.75+rpt-rpi-2712/updates/dkms/oneUpPower.ko.xz
Running the post_install script:
Running depmod… done.
pablo@ArgonONEUp:~ $ sudo modprobe oneUpPower
pablo@ArgonONEUp:~ $ lsmod | grep oneUpPower
oneUpPower 49152 0
pablo@ArgonONEUp:~ $ cat /etc/modules | grep oneUpPower
oneUpPower

Sorry for the delay in getting back to folks. Merged the overlay into mainline, and am looking into the DKMS support issue. One of the issues i see is that there is no “install linux-kernel-headers” option that will keep the current headers installed. This is done of other platforms, but not on debian as far as I can tell.

thanks, for the update. how do we have to move to main from previous installation?

BTW: your driver also works on Arch derivatives such as EndeavourOS.
I’ve reported this as asked by the setup script.

1 Like

Care to share how did you made it work on your distro?

I did:

  • skip the install script (as it is not recognizing my distro)
  • manually install the necessary deps my self
    (you need ther kernel’s headers if not already installed, the package for dkms, and the package containing the device-tree compiler. For arch derivatives, that would be:
    paman -S dkms linux-headers dtc
    
    Where linux-headers is a meta-package that will pull the exact headers corresponding to your kernel (e.g.: the rpi-16k variant)
    though most are likely to at least already have the headers).
  • ran the setupdmks script (as on older versions).
  • I already had the .dtbo compiled and copied from an older install, otherwise you can just run:
    dtc -I dts -O dtb -o argon-oneup-battery.dtbo dts/argon-oneup-battery.dts 
    sudo cp argon-oneup-battery.dtbo /boot/firmware/overlays/
    
    and then include in your config.txt:
    dtoverlay=argon-oneup-battery
    
1 Like

Thanks for sharing! I’ll give it a try. :smiley: