2024-10-22, 01:53 AM
(2024-10-21, 11:39 PM)TheDreadPirate Wrote: What model NUC do you have? If it is relatively recent, the iGPU should be pretty capable as is.
It's a NUC11PAHi7. Here's a link: https://a.co/d/8t0RSzj
Trying it out right now. Here's what I did.
Passing the device into the container.
Code:
demo@pve:~$ ls -l /dev/dri
total 0
drwxr-xr-x 2 root root 80 Oct 20 09:37 by-path
crw-rw---- 1 root video 226, 0 Oct 20 09:37 card0
crw-rw---- 1 root render 226, 128 Oct 20 09:37 renderD128
demo@pve:~$ getent group video
video:x:44:
demo@pve:~$ getent group render
render:x:104:
I added the following to my LXC conf and restarted it.
Code:
dev0: /dev/dri/card0,gid=44,uid=0
dev1: /dev/dri/renderD128,gid=105,uid=0
I see the device inside the LXC now.
Code:
demo@jellyfin:~$ ls /dev
console dri full initctl mqueue ptmx random stderr stdout tty1 urandom
core fd hugepages log null pts shm stdin tty tty2 zero
demo@jellyfin:~$ ls /dev/dri
card0 renderD128
Added this to the compose file for Jellyfin.
Code:
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
network_mode: "host"
devices:
- '/dev/dri:/dev/dri'
Verified the container can see the device.
Code:
demo@jellyfin:~/jellyfin$ sudo docker exec -it jellyfin /bin/bash
root@jellyfin:/# ls /dev
core dri fd full mqueue null ptmx pts random shm stderr stdin stdout tty urandom zero
root@jellyfin:/#
Now, I went into the Jellyfin settings in the UI and enabled QSV under Playback > Transcoding (default settings). I can see it using the iGPU.
It still seems like the LXC is using an inordinate amount of CPU, though. It's sitting at roughly 70% with 4 vCPUs allocated to the container.
Did I do something wrong or is this normal behavior?