Skip to main content

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

MetricDescription
CPU usagePer-core and average CPU utilization
Memory usagePercentage of RAM used
Disk I/ODisk read/write activity
NetworkNetwork throughput
CPU TemperatureProcessor temperature readings
Battery LevelCurrent battery charge percentage

Widgets

The monitoring service renders several widget types onto the 9x34 pixel LED matrix1:

WidgetDescription
CPU barPer-core usage bar with average
Memory barRAM usage as a horizontal bar
Network/disk plotTime-series plot of network and disk activity
Temperature barCPU temperature as a bar graph
Battery barBattery 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:

SettingDescriptionDefault
socketPath to daemon Unix socket/run/led-matrix/led-matrix.sock
collector.max_history_samplesNumber of samples for time-series plots10
collector.sample_intervalMetric collection interval170ms
collector.disk_namesDisk devices to monitor (filter by name)nvme0n1
collector.network_interfacesNetwork interfaces to monitorwlp1s0
collector.temperaturesTemperature sensors (filter by prefix)k10temp
render.max_brightnessMaximum 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

DetailValue
LanguageRust (2021 edition)
LicenseMIT
Latest version0.3.1 (January 2025)
Total tags5
Contributors1 (night-crawler)
Key dependenciessysinfo, procfs, image, imageproc, battery
Config formatTOML
Image output9x34 grayscale PNG

Daemon

DetailValue
LanguageRust (2021 edition)
LicenseMIT
Latest version0.2.2 (January 2025)
Total tags4
Contributors1 (night-crawler)
Key dependenciesactix-web, serialport, tokio, kanal
EndpointsMultipart form, Base64-encoded
ProjectDescription
inputmodule-rsOfficial Framework input module tools and LED Matrix control library4
fw16-ledvuAudio visualizer for FW16 LED Matrix (PipeWire + CAVA)
framework16-led-matrix-managerC++/Qt GUI for controlling FW16 LED Matrix
led-matrix-controllersCross-firmware controllers for FW16 LED Matrix
framework-led-matrix-daemonGo-based alternative daemon for system stats on LED Matrix
led-matrixPython-based system monitor for FW16 LED Matrix

Footnotes

  1. night-crawler/led_matrix_monitoring — GitHub 2 3 4 5 6 7 8 9 10

  2. night-crawler/led_matrix_daemon — GitHub 2 3 4 5 6

  3. AUR package: led_matrix_monitoring — Arch Linux User Repository

  4. FrameworkComputer/inputmodule-rs — GitHub