How hans-kramer/qcctl works
qcctl is a board-specific CLI and daemon for applying CPU, GPU, thermal, and fan policy to the Ventuno Q. Operators select or inspect profiles through the CLI; configuration is validated against discovered hardware before writes are planned and committed, with snapshots supporting reset and profile switching. The daemon applies a startup profile, consumes telemetry from qcstats, and manages fan strategies and control requests. The README describes additional fan and profile capabilities; connections not evidenced by the excerpts are omitted. I have not inspected unsampled source.
Main entry points: daemon.c qcctld daemon · main.c qcctl CLI · apply.c Apply and rollback · surface.c Hardware discovery
Components 16
Profiles and apply
- qcctl CLI
src/main.c - Profile parser
src/config.c - Profile validator
src/profile_check.c - Apply and rollback
src/apply.c
Daemon and fan
- qcctld daemon
src/daemon.c - Fan strategies
src/fancurve.c - Fan ownership
src/fanown.c - Fan baseline
src/fanbase.c - Control socket
src/control.c - Telemetry reader
src/stats.c
Board interface
- Hardware discovery
src/surface.c
Shared runtime
- Filesystem I/O
src/io.c - Environment ID
src/envid.c
Other components
- Operator
- qcstats sampler
- Board sysfs
Connections 25
- Operator → qcctl CLI: invokes
README.md - qcctl CLI → Profile parser: loads
src/main.c - qcctl CLI → Hardware discovery: discovers
src/main.c - qcctl CLI → Profile validator: checks
src/profile_check.c - Profile validator → Profile parser: validates
src/profile_check.c - Profile validator → Hardware discovery: checks against
src/profile_check.c - qcctl CLI → Apply and rollback: plans and commits
src/main.c - Apply and rollback → Hardware discovery: resolves writes
- Apply and rollback → Filesystem I/O: writes paths
src/apply.c - qcctld daemon → Profile parser: loads
src/daemon.c - qcctld daemon → Hardware discovery: discovers
src/daemon.c - qcctld daemon → Apply and rollback: applies profiles
src/daemon.c - qcctld daemon → Telemetry reader: reads samples
src/daemon.c - Telemetry reader → qcstats sampler: spawns and reads
- qcctld daemon → Fan strategies: runs strategy
src/daemon.c - qcctld daemon → Fan ownership: commands fan
src/daemon.c - qcctld daemon → Control socket: services requests
src/daemon.c - qcctld daemon → Fan baseline: checks airflow
src/daemon.c - qcctl CLI → Fan ownership: controls cooling
src/main.c - Hardware discovery → Filesystem I/O: scans attributes
src/surface.c - Apply and rollback → Environment ID: tags snapshots
src/apply.c - Hardware discovery → Board sysfs: discovers controls
- Apply and rollback → Board sysfs: writes controls
src/apply.c - Fan ownership → Board sysfs: takes and releases zone
- Fan baseline → Telemetry reader: judges fan readings