BGPVR Operator guide
Operator guide

NVIDIA persistence mode

Without it, the NVIDIA driver shuts a card down whenever no program is using it and starts it again for the next one: each Light recording stream (and the card check before it) then waits about a second longer. Monitor › Technical › Exposed Hardware shows it per card (Persistence mode: On ✓ or Off). It is a setting of the host's NVIDIA driver: the BGPVR container only reads it.

On this page
  1. Check it
  2. Turn it on with the script BGPVR ships
  3. The same by hand
  4. Watch out

Check it

On the server itself (the host, not inside the container):

nvidia-smi --query-gpu=index,name,persistence_mode --format=csv

Turn it on with the script BGPVR ships

Ubuntu, Debian, Proxmox and other hosts with systemd and the NVIDIA driver. It turns persistence mode on now and after every reboot. Take it from the BGPVR image and read it before you run it with sudo:

docker run --rm --entrypoint cat "$(docker inspect -f '{{.Image}}' bgpvr)" /app/scripts/host/gpu_persistence.sh > gpu_persistence.sh
less gpu_persistence.sh
sudo bash gpu_persistence.sh enable
status shows it, disable undoes it.

The same by hand

On now: sudo nvidia-smi -pm 1. On after every reboot: a systemd drop-in for nvidia-persistenced with --persistence-mode; the full Help page has the file, the undo and the check.

Watch out

  • Unraid: run nvidia-smi -pm 1 once and add it to /boot/config/go. TrueNAS SCALE: add it as a Post Init command under System → Advanced → Init/Shutdown Scripts.
  • Proxmox and virtual machines: do it where the NVIDIA driver runs (inside the VM when the card is passed through, on the host when containers share it). Docker Desktop and Windows (WSL): nothing to do.