clarify intel gpu stats requirements for pre-broadwell gpus (#24632)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s

The i915 driver never publishes per-client usage counters on GPUs older than Broadwell, so Haswell and older users got a warning telling them to upgrade to kernel 6.5 even on 6.12. The warning and docs now state the Broadwell requirement alongside the kernel 6.5 requirement for 12th gen and newer.
This commit is contained in:
Josh Hawkins
2026-10-11 05:57:15 -06:00
committed by GitHub
parent 9d9de6263e
commit 8e569ff4f9
2 changed files with 8 additions and 5 deletions
@@ -132,7 +132,8 @@ ffmpeg:
Frigate reads Intel GPU utilization directly from the kernel's per-client DRM usage counters exposed at `/proc/<pid>/fdinfo/<fd>`. This requires: Frigate reads Intel GPU utilization directly from the kernel's per-client DRM usage counters exposed at `/proc/<pid>/fdinfo/<fd>`. This requires:
- Linux kernel **5.19 or newer** for the `i915` driver, or any release of the `xe` driver. - An Intel GPU from Broadwell (5th gen) or newer. Older GPUs do not expose these counters on any kernel.
- Linux kernel **5.19 or newer** for the `i915` driver (**6.5 or newer** on 12th gen and newer), or any release of the `xe` driver.
- Frigate running with permission to read other processes' fdinfo. Running as root inside the container (the default) satisfies this; non-root setups may need `CAP_SYS_PTRACE`. - Frigate running with permission to read other processes' fdinfo. Running as root inside the container (the default) satisfies this; non-root setups may need `CAP_SYS_PTRACE`.
No `intel_gpu_top` binary, `CAP_PERFMON`, privileged mode, or `perf_event_paranoid` tuning is required. No `intel_gpu_top` binary, `CAP_PERFMON`, privileged mode, or `perf_event_paranoid` tuning is required.
+6 -4
View File
@@ -487,8 +487,9 @@ def get_intel_gpu_stats(
Each DRM client FD exposes monotonic per-engine busy counters via Each DRM client FD exposes monotonic per-engine busy counters via
/proc/<pid>/fdinfo/<fd>. For i915 this requires kernel 6.5 or newer: /proc/<pid>/fdinfo/<fd>. For i915 this requires kernel 6.5 or newer:
earlier kernels omit the per-engine counters whenever GuC submission is earlier kernels omit the per-engine counters whenever GuC submission is
active, which is the default on 12th gen and newer. Xe has exposed them active, which is the default on 12th gen and newer. i915 never exposes
since its first release. We sample twice and divide busy-time deltas by them on GPUs older than Broadwell (Gen8). Xe has exposed them since its
first release. We sample twice and divide busy-time deltas by
wall-clock to derive utilization. Render/3D and Compute are pooled into wall-clock to derive utilization. Render/3D and Compute are pooled into
"compute"; Video and VideoEnhance into "dec". Overall "gpu" is the sum of "compute"; Video and VideoEnhance into "dec". Overall "gpu" is the sum of
those pools (clamped to 100%). those pools (clamped to 100%).
@@ -557,10 +558,11 @@ def get_intel_gpu_stats(
# i915 suppresses per-client engine counters while GuC submission is # i915 suppresses per-client engine counters while GuC submission is
# active on kernels older than 6.5 (kernel commit 1324680a80eb lifted # active on kernels older than 6.5 (kernel commit 1324680a80eb lifted
# this), which covers stock Debian 12 and Ubuntu 22.04 on 12th gen # this), which covers stock Debian 12 and Ubuntu 22.04 on 12th gen
# and newer. # and newer. It never publishes them for pre-Broadwell GPUs.
logger.warning( logger.warning(
"Unable to collect Intel GPU stats: found %d DRM client(s) for %s but " "Unable to collect Intel GPU stats: found %d DRM client(s) for %s but "
"no per-engine counters. Kernel 6.5 or newer is required.", "the kernel reports no usage for them. GPUs older than Broadwell "
"(5th gen) are not supported. 12th gen and newer need kernel 6.5+",
len(snapshot_a), len(snapshot_a),
"/".join(sorted({client["driver"] for client in snapshot_a.values()})), "/".join(sorted({client["driver"] for client in snapshot_a.values()})),
) )