Remove stuff that does not need to be there. Cannot insmod after DKMS runs because the built module will be incorrect.
Argon ONE UP
This repository contains all data related to the ONE UP laptop by Argon40
Battery
Created a battery driver for the system, so that we can monitor the battery using the standard toolbar plugin. The basis of the driver is from the test_power.c driver that lives in the linux kernel tree. The test code appears to be workng on trixie versions of the OS, with reports of it working on Ubuntu.
Build Instructions
In order to build the driver, make sure you have build tools installed. Depending on the OS version, different package names are required:
Raspberry PI Trixie or Debian Based:
sudo apt install -y build-essential linux-headers-rpi-v8 dkms
Alpine:
sudo apk add build=base linux-dev dkms
Ubuntu:
sudo apt install build-essential linux-headers-generic dkms
To build:
cd battery
./build
./install
To remove it:
./remove
Once the driver is loaded, go to the task bar and add a battery. If there is already a battery plugin loaded, remove it, exit, and re-add.
Working with Argon40 Scripts
If you installed the Argon40 scripts, and wish to disable their battery code for my driver, you will needs to stop a service, and disable it.
The following commands will disable the service, (so it will not start again), and stop the service.
systemctl disable argononeupd.service
systemctl stop argononeupd.service
To restart the service, use enable instead of disable, and start instead of stop.
oneUpPower.conf
In /etc/modprobe.d/, the file oneUpPower,conf is created. This contains the startup options for the driver:
options oneUpPower soc_shutdown=5
This controls the state of charge at which the system will automatically shudown. The value is currently set to 5%, if the battery charge drops below this value, the laptop will shutdown, and you may lose work. However, it will be a graceful shutdown, and the file system will be happy.
Dynamic Kernel Module Support (dkms) support
If you don't want to have to remember to build oneUpPower.ko, you can run
cd battery
./setupdkms
Which will setup dkms support for the driver, so than when a new kernel in installed, the driver will get built automatically. This has been tested, howewever not on many platforms, or upgrade scenarios. As such this shoud be treated as "alpha" quality scripts.
Monitor
Two monitoring applications:
oneUpMon
Monitor the use of system resources, graphically
- Modify code to support multiple Drives for read/write rate and temperature
- Add support for not moitoring some drives. For instance, monitor a raid device for performance, but not temperature
- Add support for additional arguements to the smartctl command
This monitor will automatically pull in all drives for performance and temperature monitoring. In order to ignore some drives, you need to create the file "/etc/sysmon.inilk, as an example:
[performance]
ignore=mmcblk0
[temperature]
ignore=mmcblk0
#
# Modify the smartctl command being used, on a per drive basis. This is for other systems
#
[smartctl]
sda=-d sat
config
This directory contains changes I make to the /boot/firmware/config.txt file
FIOScripts
A growing set of FIO jobs to help test performance on a number of different NVME drives.
monitor1up.py
A hacky little program to monitor nvme,fan and CPU temperature.
Work that needs to be completed
- Get test_power.c code running and simualating a battery for the Raspberry PI.
- Remove all unneeded code from the driver, called oneUpPower.c.
- Fix the naming of all the internerals properly, and makes sure the battery tech, and manuacturer are correct.
- Port python battery code to C.
- Incorprate working C code into driver, and do all the plumbing.
- Add code to support clean shutdown of laptop if system is not charging and hits a minimum SOC (5%).
- Add support for trixie
- Add code to allow user to set a different SOC for shutdown or disable feature.
- Review python code to see if there is anything else that needs to be moved over.
- Create an installer
- Create an uninstaller
Supported Operating Systems
Note
This code is currently only supported on 64 bit Raspberry PI OS. There is not current plan to make it operational on any other OS at this time. Driver does not build under Trixie yet, as the kernel headers are not up to date...

