Thanks for the guide, it was very helpful.
I managed to get iGPU passthrough working on a Jellyfin LXC with my `AMD Ryzen 9 7940HS w/ Radeon 780M Graphics` processor. The steps for me were slightly different. It took some hours of problem solving (aka trial and error) for me to get it going, so I am sharing my steps here for the benefit of anyone in the same predicament.
I recommend taking regular snapshots during this process so you can revert to a previous state if anything goes wrong.
Version `6.8.4-3-pve` is working for me. I didn't have to install any mad packages or hacks.
For the device mapping I used this guide, which is more complicated but doesn't require you to change device owner on the Proxmox host:
https://www.youtube.com/watch?v=0ZDr5h52OOE&t=702s
My mappings look like this (`/etc/pve/lxc/[123].conf`):
Where group 106 is the render group in my container and 104 is the render group on Proxmox. The video group is 44 in both environments.
It's better to copy commands from an official source than an internet forum, but here they are from my Bash history:
My Bash history:
And this command on your Proxmox host:
At this point I would reboot the container, just to be nice to it. It's been through a lot.
The next verification step had me confused until I read the documentation. With AMD we are using the Vulkan driver rather than OpenVA: https://jellyfin.org/docs/general/administration/hardware-acceleration/amd
This command will verify that Vulkan driver is working with ffmpeg:
Where /dev/dri/renderD128 is the path to your GPU.
This command will fail, which is fine:
The driver is the last argument in the command (`vulkan@dr` vs `opencl@va`).
The output of the vainfo command from earlier will tell you which codecs to select:
Good luck!
I managed to get iGPU passthrough working on a Jellyfin LXC with my `AMD Ryzen 9 7940HS w/ Radeon 780M Graphics` processor. The steps for me were slightly different. It took some hours of problem solving (aka trial and error) for me to get it going, so I am sharing my steps here for the benefit of anyone in the same predicament.
I recommend taking regular snapshots during this process so you can revert to a previous state if anything goes wrong.
1. Set up Debian 12 LXC, GPU passthrough and media bind mounts as above
Make sure your hardware is supported by your Proxmox host kernel. You can check your kernel with:
Bash:
proxmox-boot-tool kernel list
Version `6.8.4-3-pve` is working for me. I didn't have to install any mad packages or hacks.
For the device mapping I used this guide, which is more complicated but doesn't require you to change device owner on the Proxmox host:
https://www.youtube.com/watch?v=0ZDr5h52OOE&t=702s
My mappings look like this (`/etc/pve/lxc/[123].conf`):
Code:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 106 104 1
lxc.idmap: g 107 100107 65429
Where group 106 is the render group in my container and 104 is the render group on Proxmox. The video group is 44 in both environments.
2. Install Libva package from Github
The installation steps are described here: https://github.com/intel/libvaIt's better to copy commands from an official source than an internet forum, but here they are from my Bash history:
Bash:
apt update -y && apt upgrade -y
apt-get install git cmake pkg-config meson libdrm-dev automake libtool
git clone https://github.com/intel/libva.git
cd libva
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make
make install
3. Install Jellyfin
Same as in the OP. The steps are documented here: https://jellyfin.org/docs/general/installation/linux/My Bash history:
Bash:
apt install curl
curl https://repo.jellyfin.org/install-debuntu.sh | bash
4. Set group permissions for Jellyfin and Root user in LXC
That's these commands on your LXC guest:
Bash:
usermod -aG video,render root
usermod -aG video,render jellyfin
And this command on your Proxmox host:
Bash:
usermod -aG render,video root
At this point I would reboot the container, just to be nice to it. It's been through a lot.
5. Verify device passthrough and driver on LXC
By running the following command inside your container you should now see a list of codecs supported by your hardware:
Bash:
/usr/lib/jellyfin-ffmpeg/vainfo
The next verification step had me confused until I read the documentation. With AMD we are using the Vulkan driver rather than OpenVA: https://jellyfin.org/docs/general/administration/hardware-acceleration/amd
This command will verify that Vulkan driver is working with ffmpeg:
Bash:
/usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vulkan@dr
Where /dev/dri/renderD128 is the path to your GPU.
This command will fail, which is fine:
Bash:
/usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va
The driver is the last argument in the command (`vulkan@dr` vs `opencl@va`).
6. Jellyfin Transcoder Config
For the hardware acceleration type choose `Video Acceleration API (VAAPI)`. Don't choose the AMD one because that won't work.The output of the vainfo command from earlier will tell you which codecs to select:
Bash:
/usr/lib/jellyfin-ffmpeg/vainfo
Good luck!
Last edited: