[HW Accel Support]: intel_gpu_top defaults to incorrect card, no GPU stats in Frigate #16619
-
Describe the problem you are havingI'm running Frigate in Proxmox 8.3.1 as an unprivileged container running Debian Bookworm. My host has an Intel i7-8700 on a Supermicro X11 board. I configured PVE with the following setting:
I then passed through /dev/dri/card1 and /dev/dri/renderD128 to the Frigate LXC. I run docker in that LXC and was able to successfully passthrough the renderD128 device to the frigate docker container and was seeing proper GPU stats in the webGUI. I've recently added an additional Intel Arc 380 card to my PVE node. I'm not passing that through to my Frigate LXC/Docker. However, in the Frigate LXC, if I run intel-gpu-top: Intel Dg2 (Gen12) @ /dev/dri/card3 - 0/ 0 MHz; 100% RC6; 0 irqs/s
IMC reads: 775 MiB/s
IMC writes: 490 MiB/s
ENGINES BUSY MI_SEMA MI_WAIT
Render/3D 0.00% | | 0% 0%
Blitter 0.00% | | 0% 0%
Video 0.00% | | 0% 0%
VideoEnhance 0.00% | | 0% 0%
[unknown] 0.00% | | 0% 0%
root@frigate:~# This card isn't being utilized yet by other containers, so it's load is 0%. I can successfully query the iGPU with the command intel-gpu-top: Intel Coffeelake (Gen9) @ /dev/dri/card2 - 58/ 58 MHz; 74% RC6; 0.42/ 9.29 W; 268 irqs/s
IMC reads: 899 MiB/s
IMC writes: 516 MiB/s
ENGINES BUSY MI_SEMA MI_WAIT
Render/3D 0.85% |▊ | 0% 0%
Blitter 0.00% | | 0% 0%
Video 12.10% |█████████▉ | 0% 0%
VideoEnhance 0.00% | | 0% 0%
PID NAME Render/3D Blitter Video VideoEnhance
12959 ffmpeg |▏ || ||█▎ || |
12966 ffmpeg |▏ || ||▋ || |
12984 ffmpeg |▏ || ||▋ || |
^C
root@frigate:~# This is the correct card/render unit that is only running from Frigate at the moment. So FFMPEG is truly using the correct renderD128 card. As I said, in the Frigate webUI, the Intel GPU stat show 0%. If I get into the frigate docker container and run only Is there a way for me to make a config change in the compose file or Frigate config file that would tell the Web UI to use the Here is the output of VAinfo/Hardware Info
Version0.15.0-cea210d Frigate config filemqtt:
enabled: false
detectors:
coral1:
type: edgetpu
device: pci:0
coral2:
type: edgetpu
device: pci:1
ffmpeg:
input_args:
- -rtsp_transport
- tcp
- -r
- '25'
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- /dev/dri/card2
- -hwaccel_output_format
- yuv420p
cameras:
DrivewayWest: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://USER:PASSWORD@10.0.11.182:554 # <----- The stream you want to use for detection
roles:
- detect
hwaccel_args: preset-vaapi
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 1280
height: 720
motion:
mask:
- 0.681,0.033,0.68,0.092,0.969,0.095,0.968,0.035
- 0.792,0.587,0.785,0.263,0.644,0.24,0.639,0.578
- 0.626,0.244,0.616,0.367,0.565,0.361,0.555,0.219
- 0.788,0.263,0.853,0.202,0.925,0.001,0.429,0,0.634,0.139,0.626,0.234
DrivewayEast: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://USER:PASSWORD@10.0.11.181:554 # <----- The stream you want to use for detection
roles:
- detect
hwaccel_args: preset-vaapi
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 1280
height: 720
motion:
mask: 0.681,0.03,0.681,0.095,0.97,0.096,0.97,0.03
FrontPackageCam: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://USER:PASSWORD@10.0.11.183:554 # <----- The stream you want to use for detection
roles:
- detect
hwaccel_args: preset-vaapi
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 1280
height: 720
motion:
mask: 0.69,0.04,0.692,0.095,0.975,0.098,0.975,0.038
## Detection and Alert Config ##
record:
enabled: true
retain:
days: 21
mode: all
alerts:
retain:
days: 15
pre_capture: 30
post_capture: 30
detections:
retain:
days: 15
pre_capture: 30
post_capture: 30
version: 0.15-1 docker-compose file or Docker CLI commandinclude:
- ../networks.yaml
services:
frigate:
container_name: frigate
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "128mb"
devices:
- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/apex_1:/dev/apex_1 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/dri/card2:/dev/dri/card2 # for intel hwaccel, needs to be updated for your hardware
- /dev/dri/renderD128:/dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /docker/frigate/config:/config
- /storage/frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
- FRIGATE_RTSP_PASSWORD = frigate_rtsp_password
cap_add:
- CAP_PERFMON # From https://docs.frigate.video/configuration/hardware_acceleration/
secrets:
- frigate_rtsp_password
secrets:
frigate_rtsp_password:
file: ../secrets/frigate_rtsp_password.txt Relevant Frigate log output2025-02-16 19:56:02.834240238 [INFO] Preparing Frigate...
2025-02-16 19:56:02.947451270 [INFO] Starting Frigate...
2025-02-16 19:56:05.346675510 [2025-02-16 19:56:05] frigate.util.config INFO : Checking if frigate config needs migration...
2025-02-16 19:56:05.362457875 [2025-02-16 19:56:05] frigate.util.config INFO : copying config as backup...
2025-02-16 19:56:05.363017789 [2025-02-16 19:56:05] frigate.util.config INFO : Migrating frigate config from 0.14 to 0.15-0...
2025-02-16 19:56:05.370513846 [2025-02-16 19:56:05] frigate.util.config INFO : Migrating frigate config from 0.15-0 to 0.15-1...
2025-02-16 19:56:05.377388100 [2025-02-16 19:56:05] frigate.util.config INFO : Finished frigate config migration...
2025-02-16 19:56:05.416805774 [2025-02-16 19:56:05] frigate.app INFO : Starting Frigate (0.15.0-cea210d)
2025-02-16 19:56:05.425714811 [2025-02-16 19:56:05] frigate.app INFO : Making backup of DB before migrations...
2025-02-16 19:56:05.512323133 [2025-02-16 19:56:05] peewee_migrate.logs INFO : Starting migrations
2025-02-16 19:56:05.529285014 [2025-02-16 19:56:05] peewee_migrate.logs INFO : Migrate "026_add_notification_tokens"
2025-02-16 19:56:05.529442291 [2025-02-16 19:56:05] peewee_migrate.logs INFO : add_column ('user', 'notification_tokens', <JSONField: User.notification_tokens>)
2025-02-16 19:56:05.531656793 [2025-02-16 19:56:05] peewee_migrate.logs INFO : Done 026_add_notification_tokens
2025-02-16 19:56:05.546685978 [2025-02-16 19:56:05] peewee_migrate.logs INFO : Migrate "027_create_explore_index"
2025-02-16 19:56:05.546728745 [2025-02-16 19:56:05] peewee_migrate.logs INFO : sql ('CREATE INDEX IF NOT EXISTS "event_label_start_time" ON "event" ("label", "start_time" DESC)',)
2025-02-16 19:56:05.550428453 [2025-02-16 19:56:05] peewee_migrate.logs INFO : Done 027_create_explore_index
2025-02-16 19:56:05.582892424 [2025-02-16 19:56:05] frigate.app INFO : Recording process started: 347
2025-02-16 19:56:05.582941151 [2025-02-16 19:56:05] frigate.app INFO : Review process started: 349
2025-02-16 19:56:05.586315965 [2025-02-16 19:56:05] frigate.app INFO : go2rtc process pid: 94
2025-02-16 19:56:05.597473527 [2025-02-16 19:56:05] detector.coral1 INFO : Starting detection process: 363
2025-02-16 19:56:05.600536592 [2025-02-16 19:56:05] detector.coral2 INFO : Starting detection process: 365
2025-02-16 19:56:05.601040377 [2025-02-16 19:56:05] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:0
2025-02-16 19:56:05.608187702 [2025-02-16 19:56:05] frigate.app INFO : Output process started: 402
2025-02-16 19:56:05.613560300 [2025-02-16 19:56:05] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:1
2025-02-16 19:56:05.614791833 [2025-02-16 19:56:05] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2025-02-16 19:56:05.614834940 [2025-02-16 19:56:05] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2025-02-16 19:56:05.621777403 [2025-02-16 19:56:05] frigate.app INFO : Camera processor started for DrivewayWest: 416
2025-02-16 19:56:05.632750279 [2025-02-16 19:56:05] frigate.app INFO : Camera processor started for DrivewayEast: 417
2025-02-16 19:56:05.632825744 [2025-02-16 19:56:05] frigate.app INFO : Camera processor started for FrontPackageCam: 421
2025-02-16 19:56:05.632907671 [2025-02-16 19:56:05] frigate.app WARNING : The current SHM size of 128.0MB is too small, recommend increasing it to at least 146MB.
2025-02-16 19:56:05.638122533 [2025-02-16 19:56:05] frigate.app INFO : Capture process started for DrivewayWest: 427
2025-02-16 19:56:05.644759176 [2025-02-16 19:56:05] frigate.app INFO : Capture process started for DrivewayEast: 432
2025-02-16 19:56:05.654754303 [2025-02-16 19:56:05] frigate.app INFO : Capture process started for FrontPackageCam: 441
2025-02-16 19:56:05.932384652 [2025-02-16 19:56:05] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-02-16 19:56:06.021761159 [2025-02-16 19:56:06] frigate.api.fastapi_app INFO : FastAPI started Relevant go2rtc log outputNA FFprobe output from your cameraNA Install methodProxmox via Docker Object DetectorCoral Network connectionWired Camera make and modelDahua IPC-HDW5231R-ZE Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
In Frigate 0.16 you can set the mode to |
Beta Was this translation helpful? Give feedback.
In Frigate 0.16 you can set the mode to
sriov
which will likely make this work