LED Matrix Monitoring
LED Matrix Monitoring (led_matrix_monitoring) is a system metrics visualization service for the Framework Laptop 16 LED Matrix Input Module, developed by community member Igor (GitHub: night-crawler). Written in Rust, it collects system metrics — CPU usage, memory, disk I/O, network, temperature, and battery — renders them as PNG images, and sends them to the companion LED Matrix Daemon for display on the 9x34 LED matrix1.
The project consists of two components: the monitoring service (led_matrix_monitoring) that collects and renders metrics, and the daemon (led_matrix_daemon) that manages serial communication with the LED matrix hardware and accepts images via Unix socket or TCP12.
Features
Metric Collectors
| Metric | Description |
|---|---|
| CPU usage | Per-core and average CPU utilization |
| Memory usage | Percentage of RAM used |
| Disk I/O | Disk read/write activity |
| Network | Network throughput |
| CPU Temperature | Processor temperature readings |
| Battery Level | Current battery charge percentage |
Widgets
The monitoring service renders several widget types onto the 9x34 pixel LED matrix1:
| Widget | Description |
|---|---|
| CPU bar | Per-core usage bar with average |
| Memory bar | RAM usage as a horizontal bar |
| Network/disk plot | Time-series plot of network and disk activity |
| Temperature bar | CPU temperature as a bar graph |
| Battery bar | Battery charge level indicator |
Widget layout is fully configurable — position, size, and scaling factor (k) can be set per-widget for each side (left and right matrix)1.
Daemon Features
The LED Matrix Daemon provides2:
- Background daemon service with systemd integration
- Unix socket and TCP listeners for receiving images
- Dual-port support (left and right LED matrix) with automatic even/odd distribution
- Persistent serial port connection with configurable timeout and retry on failure
- Base64-encoded and multipart form data endpoints
- Port swap configuration for correct left/right mapping
Architecture
The system uses a two-process architecture: the monitoring service collects metrics at a configurable interval (default 170ms), renders them into a 9x34 pixel grayscale PNG, and transmits the image to the daemon via Unix socket. The daemon then sends the image data over serial to the LED Matrix module(s)12.
System Metrics → led_matrix_monitoring → PNG image → Unix socket → led_matrix_daemon → Serial (ttyACM) → LED Matrix
Installation
Arch Linux (AUR)
Both packages are available in the AUR, maintained by the author13:
yay -S led_matrix_daemon
yay -S led_matrix_monitoring
Enable the services:
sudo systemctl enable --now led_matrix_daemon.socket led_matrix_daemon.service
sudo systemctl enable --now led_matrix_monitoring.service
Daemon configuration is located at /etc/led_matrix/daemon.toml2.
NixOS
Both projects provide NixOS flakes with dedicated modules12:
{
inputs.led-matrix-daemon.url = "github:night-crawler/led_matrix_daemon";
inputs.led-matrix-monitoring.url = "github:night-crawler/led_matrix_monitoring";
outputs = { self, nixpkgs, led-matrix-daemon, led-matrix-monitoring, ... }: {
nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
modules = [
led-matrix-daemon.nixosModules.default
led-matrix-monitoring.nixosModules.default
{
services.led-matrix-daemon.enable = true;
services.led-matrix-monitoring = {
enable = true;
settings = {
collector.max_history_samples = 20;
collector.sample_interval = "200ms";
};
};
}
];
};
};
}
The socket path is automatically configured when both NixOS modules are enabled1.
From Source
git clone https://github.com/night-crawler/led_matrix_daemon.git
cd led_matrix_daemon && cargo build --release
git clone https://github.com/night-crawler/led_matrix_monitoring.git
cd led_matrix_monitoring && cargo build --release
Configuration
The monitoring service uses a TOML configuration file. Key settings include1:
| Setting | Description | Default |
|---|---|---|
socket | Path to daemon Unix socket | /run/led-matrix/led-matrix.sock |
collector.max_history_samples | Number of samples for time-series plots | 10 |
collector.sample_interval | Metric collection interval | 170ms |
collector.disk_names | Disk devices to monitor (filter by name) | nvme0n1 |
collector.network_interfaces | Network interfaces to monitor | wlp1s0 |
collector.temperatures | Temperature sensors (filter by prefix) | k10temp |
render.max_brightness | Maximum LED brightness (0–255) | 255 |
Widget positions are defined per-matrix side (left/right) with configurable mid_point, max_height, start_x, start_y, end_x, end_y, and scaling factor k1.
The daemon configuration specifies serial port paths, baud rate (115200), timeouts, and listen addresses2:
listen_address = "127.0.0.1:45935"
unix_socket = "/tmp/led-matrix.sock"
max_queue_size = 10
num_http_workers = 4
[left_port]
path = "/dev/ttyACM0"
baud_rate = 115200
timeout = "2s"
keep_open = true
Technical Details
Monitoring Service
| Detail | Value |
|---|---|
| Language | Rust (2021 edition) |
| License | MIT |
| Latest version | 0.3.1 (January 2025) |
| Total tags | 5 |
| Contributors | 1 (night-crawler) |
| Key dependencies | sysinfo, procfs, image, imageproc, battery |
| Config format | TOML |
| Image output | 9x34 grayscale PNG |
Daemon
| Detail | Value |
|---|---|
| Language | Rust (2021 edition) |
| License | MIT |
| Latest version | 0.2.2 (January 2025) |
| Total tags | 4 |
| Contributors | 1 (night-crawler) |
| Key dependencies | actix-web, serialport, tokio, kanal |
| Endpoints | Multipart form, Base64-encoded |
Related Projects
| Project | Description |
|---|---|
| inputmodule-rs | Official Framework input module tools and LED Matrix control library4 |
| fw16-ledvu | Audio visualizer for FW16 LED Matrix (PipeWire + CAVA) |
| framework16-led-matrix-manager | C++/Qt GUI for controlling FW16 LED Matrix |
| led-matrix-controllers | Cross-firmware controllers for FW16 LED Matrix |
| framework-led-matrix-daemon | Go-based alternative daemon for system stats on LED Matrix |
| led-matrix | Python-based system monitor for FW16 LED Matrix |