Classic Confinement Request for sensorz — Hardware Thermal Monitoring

name: sensorz

description: A terminal monitor displaying real-time CPU, GPU, fan, and drive temperatures

snapcraft: https://github.com/boeger-nathan/sensorz/blob/main/snap/snapcraft.yaml

upstream: https://github.com/boeger-nathan/sensorz

upstream-relation: I am the author and publisher of sensorz.

supported-category: system-tools (or developer-tools)

reasoning:

sensorz reads hardware temperatures and fan speeds via the kernel’s hardware monitoring interface. Strict confinement does not permit the required filesystem access:

  • /sys/class/hwmon must be readable to access temperature and fan channels from hwmon drivers (coretemp, k10temp, nct6775, etc.). These are world-readable kernel ABI files, but strict snaps cannot access arbitrary sysfs paths.
  • /sys/class/drm/card*/device is required for GPU temperature telemetry on AMD, Intel, and Nouveau cards.
  • /sys/block maps NVMe controllers to drive devices for correct thermal association.
  • /proc/stat and /proc/diskstats provide CPU core count and active disk inventory.

Additionally, NVIDIA GPU support requires runtime loading of libnvidia-ml.so.1, which strict confinement cannot accommodate.

I have attempted strict confinement, but the hwmon subsystem is not accessible through any existing strict interface. Classic confinement is necessary for a functional thermal monitor. The snap makes no network connections, writes nothing, and only reads hardware state.

This request has been added to the queue for review by the @reviewers team.

Please see:

Your snap must fit into one of the supported categories listed there, also note the last paragraph. Packaging a classic snap is a very advanced task that requires a lot knowledge about binary patching of applications and libraries to adjust RPATH and interpreter calls of the binaries to make them work everywhere a snap must be able to work.

All the paths you mention above should actually be covered by the existing interfaces for strict snaps, which ones did you try and what were the errors; also, did you use the snappy-debug tool alongside your app ? this should actually have pointed you to the necessary interfaces.

1 Like

Understood, we tried as you suggested and it works now. We don’t require classic anymore. We can close this out.

Thank you!

1 Like