Skip to main content

Module drm

Module drm 

Source
Expand description

AMD and Intel GPUs from /sys/class/drm/card<N>/device.

NVIDIA GPUs come from NVML (gpu.rs) and are skipped here. Everything read is world-readable:

  • amdgpu: gpu_busy_percent, mem_busy_percent, mem_info_vram_{used,total}, and the device’s hwmon (temperature, power, fan, clock).
  • i915 / xe (Intel): the clock and, on discrete cards, hwmon. Intel exposes utilization only through perf events, which need privileges, so it is left unknown.

Names come from the driver (product_name on some AMD boards) or the PCI ID database (pci.ids, from hwdata / pciutils).

Structs§

DrmGpuReader
Reads AMD and Intel GPUs, remembering their names.