Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

67 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Argon ONE UP CM5 Dashboard

Battery Β· Fan Β· Brightness Β· Temperature monitor and controller for the Argon ONE UP CM5 Raspberry Pi laptop running Kali Linux / XFCE.

License: MIT Platform OS Python


One-command install

git clone https://github.com/Zenovs/argon-1-dashboard.git
cd argon-1-dashboard
sudo bash install.sh

Or without cloning:

curl -fsSL https://raw.githubusercontent.com/Zenovs/argon-1-dashboard/main/update.sh | sudo bash

What it does

A lightweight XFCE panel applet + GTK3 control panel that monitors and controls the Argon ONE UP CM5 laptop hardware:

Feature Details
πŸ”‹ Battery Percentage, charge/discharge status, time remaining (via CW2217 chip)
🌑 CPU Temperature Live reading with color-coded warnings
πŸŒ€ Fan RPM display, auto/manual mode, configurable temperature curve
β˜€οΈ Screen Brightness Slider + Fn+F2/F3 hotkeys (via DDC/CI on I2C bus 14)
πŸ”” Battery Warning Desktop notification when battery drops below a configurable threshold
πŸ–₯ Panel Applet XFCE Genmon plugin showing all values in the taskbar

Screenshots

Panel applet (XFCE taskbar):

β–  72%  ⬆  |  1:23h  |  β–² 44Β°C  |  β†Ί 40%

Control panel (GTK3, dark theme):

  • Status overview (battery, temperature, fan, charge state, remaining time)
  • Brightness slider (10–100%, synced with Fn keys)
  • Fan control (Auto / Manual + configurable curve)
  • Battery warning notification (enable/disable, threshold 5–50%)
  • Critical battery auto-suspend (enable/disable, threshold 1–15%, 10s cancel window)
  • Lid action selector (suspend / hibernate / ignore)
  • Screen lock on resume toggle
  • One-click update button

Requirements

  • Hardware: Raspberry Pi CM5 in an Argon ONE UP enclosure
  • OS: Kali Linux (or any Debian-based distro) with XFCE desktop
  • I2C: Enabled via raspi-config β†’ Interface Options β†’ I2C
  • Packages (installed automatically):
    • python3-smbus2 / smbus2
    • xfce4-genmon-plugin
    • python3-gi (GTK3 bindings)
    • evdev (hotkey daemon)
    • i2c-tools
    • libnotify-bin (battery warning notifications)

Installation

git clone https://github.com/Zenovs/argon-1-dashboard.git
cd argon-1-dashboard
sudo bash install.sh

The install script automatically:

  1. Installs all dependencies (smbus2, evdev, xfce4-genmon-plugin)
  2. Copies scripts to /usr/local/bin/
  3. Creates fan config at /etc/argon/fan_config.json
  4. Sets up and starts the systemd root service (argon-dashboard)
  5. Sets up the systemd user service for Fn hotkeys (argonhotkeys)
  6. Adds the Genmon panel applet to the XFCE taskbar automatically

Update

sudo bash update.sh
# or remotely:
curl -fsSL https://raw.githubusercontent.com/Zenovs/argon-1-dashboard/main/update.sh | sudo bash

Uninstall

sudo bash uninstall.sh

Fan curve configuration

Edit /etc/argon/fan_config.json or use the control panel UI:

{
    "fan_curve": [
        {"temp": 40, "speed": 0},
        {"temp": 50, "speed": 40},
        {"temp": 60, "speed": 70},
        {"temp": 70, "speed": 100}
    ]
}

The daemon reloads this file automatically β€” no restart needed.


Battery warning notifications

Enable in the control panel ("Benachrichtigungen" section) or edit ~/.config/argon/notifications.json directly:

{
    "battery_warning": true,
    "battery_threshold": 10,
    "battery_critical": true,
    "battery_critical_threshold": 3
}

When the battery drops to or below battery_threshold percent while not charging, the panel applet sends a desktop notification via notify-send. The alert fires once per discharge cycle β€” it resets automatically once the battery recovers above threshold + 5%.

Critical auto-suspend: when battery_critical is enabled and the battery reaches battery_critical_threshold percent (default 3%) while not charging, the system suspends automatically to prevent data loss from a dead battery. You get a 10-second warning notification first β€” plugging in the charger within that window cancels the suspend. Fires once per discharge cycle.


Architecture

argon_daemon.py  (systemd root service)
    β”‚
    β”œβ”€β”€ I2C bus 1, address 0x64  β†’  CW2217 battery chip
    β”‚       register 0x04  β†’  battery percent
    β”‚       register 0x0E  β†’  charge status (< 0x80 = charging)
    β”‚       registers 0x10–0x59  β†’  76-byte battery profile (required for accurate SOC)
    β”‚
    β”œβ”€β”€ I2C bus 14, address 0x37  β†’  DDC/CI display brightness (VCP 0x10)
    β”‚
    β”œβ”€β”€ /sys/class/thermal/thermal_zone0/temp  β†’  CPU temperature
    β”œβ”€β”€ /sys/class/hwmon/hwmonX/fan1_input      β†’  fan RPM (hwmon path auto-detected)
    β”œβ”€β”€ /sys/class/hwmon/hwmonX/pwm1            β†’  fan PWM control
    β”‚
    β”œβ”€β”€ writes  β†’  /tmp/argon_dashboard_status   (JSON, every 2s)
    └── reads   ←  /tmp/argon_dashboard_control  (JSON, commands from UI)

argon_panel.sh      (XFCE Genmon plugin, reads status every 2s)
    └── click  β†’  argon_control.py  (GTK3 control panel)

argon_hotkeys.py    (systemd user service, evdev)
    └── Fn+F2 / KEY_BRIGHTNESSDOWN  β†’  brightness -10%
    └── Fn+F3 / KEY_BRIGHTNESSUP    β†’  brightness +10%

IPC files

/tmp/argon_dashboard_status (written by daemon):

{
    "battery_percent": 85,
    "is_charging": true,
    "battery_rate": -2.1,
    "time_remaining": 210,
    "cpu_temp": 42.5,
    "fan_rpm": 1200,
    "fan_speed": 30,
    "fan_mode": "auto",
    "brightness": 80,
    "timestamp": 1711929600.0
}

/tmp/argon_dashboard_control (written by UI/hotkeys, read by daemon):

{
    "fan_mode": "auto",
    "fan_speed": 50,
    "brightness": 80
}

Troubleshooting

Daemon not running

sudo systemctl status argon-dashboard
sudo journalctl -u argon-dashboard -f

I2C errors

ls /dev/i2c-*
i2cdetect -y 1          # should show 0x64 (CW2217 battery)
i2cdetect -y 14         # should show 0x37 (DDC display)
i2cget -y 1 0x64 0x04   # battery percent
i2cget -y 1 0x64 0x0e   # charge status

Panel applet not showing

sudo apt install xfce4-genmon-plugin
# Then add manually: right-click taskbar β†’ Panel β†’ Add Items β†’ Generic Monitor
# Command: /usr/local/bin/argon_panel.sh  |  Interval: 2000ms

Brightness not changing

# Check service permissions (DeviceAllow=/dev/i2c-14 must be present)
sudo systemctl cat argon-dashboard | grep DeviceAllow
# Restart service after any service file change:
sudo systemctl daemon-reload && sudo systemctl restart argon-dashboard

Control panel won't open

python3 /usr/local/bin/argon_control.py
# Requires: python3-gi, gir1.2-gtk-3.0
sudo apt install python3-gi gir1.2-gtk-3.0

File structure

argon-1-dashboard/
β”œβ”€β”€ install.sh                    # Installation script
β”œβ”€β”€ update.sh                     # Update script
β”œβ”€β”€ uninstall.sh                  # Uninstall script
└── src/
    β”œβ”€β”€ argon_daemon.py           # Root daemon (I2C + DDC + fan + battery)
    β”œβ”€β”€ argon_panel.sh            # XFCE Genmon panel applet
    β”œβ”€β”€ argon_control.py          # GTK3 control panel (dark theme)
    β”œβ”€β”€ argon_hotkeys.py          # Fn key brightness hotkeys (user service)
    β”œβ”€β”€ argon-dashboard.service   # systemd root service
    β”œβ”€β”€ argonhotkeys.service      # systemd user service
    └── fan_config.json           # Default fan curve

Tested on

  • Raspberry Pi CM5 8GB / 32GB eMMC
  • Argon ONE UP enclosure (v1)
  • Kali Linux 2024.x XFCE (64-bit ARM)

Contributing

Issues and pull requests are welcome.

  1. Fork the repo
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit: git commit -m 'Add my feature'
  4. Push and open a pull request

License

MIT β€” free to use and adapt.


Keywords

argon-one-up argon-one-up-cm5 raspberry-pi-cm5 raspberry-pi-laptop kali-linux xfce xfce-panel dashboard battery-monitor fan-control brightness-control ddc-ci cw2217 i2c genmon gtk3 systemd python3