Vaapi Not Detecting, i5-13600K iGPU [HW Accel Support]: #11163
Answered
by
Peter-Nincompoop
Peter-Nincompoop
asked this question in
Hardware Acceleration Support
-
Describe the problem you are havingMy setup finds, streams, and records from the camera with no hardware acceleration. As soon as I try hardware acceleration, I get the attached errors. I've tried:
Version0.13.2-6476f8a Frigate config filemqtt:
enabled: False
detectors:
# type: cpu
coral1:
type: edgetpu
device: pci:0
coral2:
type: edgetpu
device: pci:1
#ffmpeg:
# hwaccel_args: preset-intel-qsv-h265
# hwaccel_args: preset-intel-qsv-h264
# hwaccel_args: preset-vaapi
record:
enabled: True
retain:
days: 3
mode: all
events:
retain:
default: 30
mode: motion
cameras:
garageBedroom: # <--- this will be changed to your actual camera later
enabled: True
ffmpeg:
inputs:
- path: rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=0
roles:
- record
input_args: preset-rtsp-generic
hwaccel_args: preset-vaapi
detect:
enabled: False docker-compose file or Docker CLI commandversion: "3.9"
services:
frigate:
container_name: frigate
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
privileged: true # this may not be necessary for all setups
# cap_add:
# - CAP_PERFMON
shm_size: "128mb" # update for your cameras based on calculation above
devices:
# - /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
- /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/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
- /dev/dri/card0:/dev/dri/card0
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/docker/frigate:/config
- /mnt/frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
group_add:
- 109 #render group id
environment:
FRIGATE_RTSP_PASSWORD: "password" Relevant log output2024-04-29 19:03:02.018037677 [INFO] Preparing Frigate...
2024-04-29 19:03:02.027766652 [INFO] Starting Frigate...
2024-04-29 19:03:02.575709522 [2024-04-29 19:03:02] frigate.app INFO : Starting Frigate (0.13.2-6476f8a)
2024-04-29 19:03:04.026626886 [2024-04-29 19:03:04] peewee_migrate.logs INFO : Starting migrations
2024-04-29 19:03:04.028201925 [2024-04-29 19:03:04] peewee_migrate.logs INFO : There is nothing to migrate
2024-04-29 19:03:04.029922099 [2024-04-29 19:03:04] frigate.app INFO : Recording process started: 889
2024-04-29 19:03:04.030805604 [2024-04-29 19:03:04] frigate.app INFO : go2rtc process pid: 89
2024-04-29 19:03:04.037283742 [2024-04-29 19:03:04] detector.coral1 INFO : Starting detection process: 898
2024-04-29 19:03:04.037980850 [2024-04-29 19:03:04] detector.coral2 INFO : Starting detection process: 900
2024-04-29 19:03:04.038873013 [2024-04-29 19:03:04] frigate.app INFO : Output process started: 902
2024-04-29 19:03:04.040770543 [2024-04-29 19:03:04] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:0
2024-04-29 19:03:04.041771353 [2024-04-29 19:03:04] frigate.app INFO : Camera processor started for garageBedroom: 937
2024-04-29 19:03:04.043492782 [2024-04-29 19:03:04] frigate.app INFO : Capture process started for garageBedroom: 939
2024-04-29 19:03:04.043961007 [2024-04-29 19:03:04] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-04-29 19:03:04.066694207 [2024-04-29 19:03:04] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:1
2024-04-29 19:03:04.069080713 [2024-04-29 19:03:04] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-04-29 19:03:05.439655375 [2024-04-29 19:03:05] frigate.video ERROR : garageBedroom: Unable to read frames from ffmpeg process.
2024-04-29 19:03:05.439826261 [2024-04-29 19:03:05] frigate.video ERROR : garageBedroom: ffmpeg process is not running. exiting capture thread...
2024-04-29 19:03:24.063197869 [2024-04-29 19:03:24] watchdog.garageBedroom ERROR : Ffmpeg process crashed unexpectedly for garageBedroom.
2024-04-29 19:03:24.063200739 [2024-04-29 19:03:24] watchdog.garageBedroom ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-04-29 19:03:24.063212490 [2024-04-29 19:03:24] ffmpeg.garageBedroom.detect ERROR : Option hwaccel (use HW accelerated decoding) cannot be applied to output url vaapi -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
2024-04-29 19:03:24.063317369 [2024-04-29 19:03:24] ffmpeg.garageBedroom.detect ERROR : Error parsing options for output file vaapi.
2024-04-29 19:03:24.063319105 [2024-04-29 19:03:24] ffmpeg.garageBedroom.detect ERROR : Error opening output files: Invalid argument FFprobe output from your camera[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"20/1","codec_long_name":"H.265/HEVC(HighEfficiencyVideoCoding)","height":1440,"width":2560}]}}] Operating systemOther Linux Install methodDocker Compose Network connectionWired Camera make and modelDahua N41BL13-W Any other information that may be helpfulOS is Ubuntu v22.04.4 LTS |
Beta Was this translation helpful? Give feedback.
Answered by
Peter-Nincompoop
Apr 30, 2024
Replies: 1 comment 1 reply
-
This is usually due to a missing or outdated driver on the host |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Edit: I went ahead and followed 3.1.5 and it updated the Kernel to 6.5 which enabled the iGPU. Weird that my Kernel was 5.something beforehand. Anyway, it now recognizes the GPU, but definitely wasn't happy. Turns out updating to 6.5 broke my TPU drivers, so had to dig around to find the solution (rebuilding from the gasket github). Frigate kept hanging as it tried to find the TPUs while they were broken - at first I thought maybe the Kernel update didn't install the GPU drivers quite right, but no it was the missing TPUs. My system page now shows both TPUs and the GPU with the video stream showing no hanging. I think everything is happy again. Thank you for pointing me down the driver path!