pub fn install()Expand description
Install the GET_ATTACHED_IDS/GET_PROBED_IDS GOT filter, at most once and only when a
host GPU is hidden from the container. Idempotent and safe to call before every NVENC session
open (guarded by a Once).
- Escape hatch: if
PIXELFLUX_DISABLE_GPU_FILTERis set, log and return without patching (also useful for A/B testing the filter). - Cache the nvidiactl identity:
stat/dev/nvidiactland store itsrdevinNVIDIACTL_RDEVso the ioctl hook can later verify an fd’s identity before rewriting. If thestatfails the value stays 0, which makes the hook skip that identity gate. - Patch only when needed: if
has_hidden_gpus()reports GPUs hidden from the container, rundl_iterate_phdroverpatch_phdr_cbto repoint theioctlGOT slots in the targeted NVIDIA libraries. Otherwise nothing is patched — the filter is a strict no-op.