A lightweight system monitor written in Go, specifically designed for the Framework Laptop 16 equipped with the LED Matrix module and an NVIDIA GPU.
This tool utilizes the side-mounted LED matrices to display real-time system metrics, providing a visual at-a-glance dashboard of your laptop's performance.
- Laptop: Framework Laptop 16
- Module: LED Matrix (Expansion Bay)
- GPU: NVIDIA (Requires NVML/NVIDIA drivers installed)
- OS: Linux (Tested on Fedora/Ubuntu)
- Real-time Monitoring: Displays three vertical bars on the LED matrix:
- CPU Usage (Left bar)
- RAM Usage (Middle bar)
- VRAM Usage (Right bar - NVIDIA only)
- Auto-Brightness: Uses the laptop's built-in Ambient Light Sensor (ALS) to automatically adjust matrix brightness based on your environment.
- Daemon Mode: Can run in the background as a systemd service or a detached daemon.
- Low Overhead: Written in Go with minimal resource footprint.
- Go 1.21 or later.
- NVIDIA drivers and
libnvidia-ml.so(NVML) for GPU monitoring. - Permission to access
/dev/ttyACM*(usually part of thedialoutoruucpgroup).
- Clone the repository:
git clone git@github.com:jtl5770/ledmatrix.git cd ledmatrix - Build the project:
go build -o ledmatrix
Run the monitor directly:
./ledmatrixCommand-line Options:
-d: Run as a daemon (logs to syslog).-a: Enable auto-brightness (default: true).-b <1-255>: Set a static brightness and disable auto-brightness.
To run this automatically on login, you can use the provided service file:
- Copy the binary to your local bin:
mkdir -p ~/bin cp ledmatrix ~/bin/
- Copy and enable the service:
mkdir -p ~/.config/systemd/user/ cp ledmatrix.service ~/.config/systemd/user/ systemctl --user daemon-reload systemctl --user enable --now ledmatrix.service
Note: You may need to adjust the paths in ledmatrix.service if your home directory is different.
- Communication: Communicates with the LED Matrix via Serial over USB (
/dev/ttyACM?). - Sensors:
- CPU/RAM via
gopsutil. - VRAM via
go-nvml. - Brightness via IIO (
/sys/bus/iio/devices/iio:device*).
- CPU/RAM via
GPL-3.0-or-later