question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intel GPU <10th hardware acceleration issue

See original GitHub issue

I have an intel NUC (Gemini Lake) with Home assistant installed on Proxmox. I followed this guide to enable the passthroug of the GPU to the container with frigate.

I think I got it right since I can see in lspci the GPU (even if it’s 00:18.0 while I was expecting it to be 00:02.0)

photo_2021-05-07_12-43-57 photo_2021-05-07_12-43-46

I added the hwaccel_args for the <10 intel generation listed on the documentation

My frigate.yml is:

mqtt:
  host: 192.168.91.92
  user: user
  password: password

cameras:
  ingresso:
    ffmpeg:
      inputs:
        - path: rtsp://admin:password@192.168.91.100:554//h264Preview_01_sub
          roles:
            - detect
            - rtmp
      hwaccel_args:
        - -hwaccel
        - vaapi
        - -hwaccel_device
        - /dev/dri/renderD128
        - -hwaccel_output_format
        - yuv420p
    width: 640
    height: 352
    fps: 3
    objects:
      track:
        - person
    motion:
      mask:
        - 0,352,200,352,201,326,0,323
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    rtmp:
      # Required: Enable the live stream (default: True)
      enabled: True
detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu

The issue is: with this setup the fans run like hell, while with no hardware acceleration it runs way more silent. I think it might be something wrong with the configuration.

I installed intel-gpu-tools and tried to run intel_gpu_top but I get the error “Failed to initialize PMU! (Permission denied)”

The frigate log is fine and has no errors.

Hope I didnt forget to mention any useful log or information. If so, please ask and I’ll provide them.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
Murph24commented, May 8, 2021

I could not get QSV working on my 10th gen intel, but vaapi will work. My CPU idles at ~9%. I’m also running frigate in a docker container in an LXC. Not exactly the same hardware and setup as you, but this may help you out. Also note I did a lot of messing around, so some of these settings may not be doing anything useful.

Proxmox container config (file 105.conf in my case). lxc.cgroup and lxc.mount are used to pass GPU device and USB for a coral stick"

arch: amd64
cores: 2  
features: nesting=1 
hostname: Docker 
memory: 4096 
mp0: /shared,mp=/shared,size=0 
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=22:EE:96:01:2D:D2,ip=dhcp,type=veth 
onboot: 1 
ostype: debian 
rootfs: local-lvm:vm-105-disk-0,size=115G 
startup: order=2 
swap: 512
lxc.cgroup.devices.allow: c 226:0 rwm
lxc.cgroup.devices.allow: c 226:128 rwm
lxc.cgroup.devices.allow: c 29:0 rwm
lxc.cgroup.devices.allow: c 189:* rwm
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file 0, 0
lxc.mount.entry: /dev/bus/usb/002/ dev/bus/usb/002/ none bind,optional,create=dir 0, 0
lxc.cap.drop:

frigate config:

hwaccel_args: 
   #Optional: global input args (default: shown below)
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128

Docker run command passing USB and GPU devices:

docker run --name frigate --privileged --shm-size=1g --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 -v /shared/frigate/config:/config:ro -v /shared/frigate/clips:/clips:rw -v /etc/localtime:/etc/localtime:ro -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule="c 189:* rmw" --device=/dev/dri/renderD128 -d -p 5000:5000 -e FRIGATE_RTSP_PASSWORD='password' blakeblackshear/frigate:0.8.4-amd64

Also, a useful container to see if your hardware accel is working: https://hub.docker.com/r/djaydev/intel-gpu-tools

0reactions
federicotravainicommented, Jun 23, 2021

Yes, even if GPU/Coral passhthrough seemed to be fine, it was not working properly. I first tried to passthrough the PCI channel, but then I could not redirect other USB ports to other VM.

What I finally decided to do, is to install Frigate directly on Proxmox and everything is working fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is Hardware-Accelerated GPU Scheduling Supported by Intel®...
At the same time, WDDM 2.7 introduced a new feature named Hardware-accelerated GPU scheduling. Some 3rd party applications (per example GPU-Z) are reporting ......
Read more >
Hardware Acceleration in Windows 10 - Microsoft Community
I have a NVIDIA GeForce GTX 980M graphics card installed on this computer and when I updated to windows 10 today all sorts...
Read more >
How to Enable or Disable Hardware Acceleration Windows 10
If you want to try managing Hardware Acceleration for Windows 10 itself, here's what you can try!Check out the full guide on ...
Read more >
Intel Graphics - Best practices and settings for hardware ...
Getting hardware acceleration on Linux for Intel graphics has taken a little ... libva-utils gstreamer1-vaapi ffmpeg intel-gpu-tools mesa-dri-drivers mpv ...
Read more >
How to Disable Hardware Acceleration on Windows 10
When you're having issues with hardware acceleration, it's best to troubleshoot as soon as possible. Faulty hardware acceleration doesn't help your PC or ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found