In this tutorial I will explain how to install JellyFin on Proxmox on an LXC container on a system based with intel CPU and integrated video card.
I will base this tutorial on an INTEL CPU (i5 1235U)
apt install -y intel-opencl-icd
apt install -y intel-opencl-icd
Edit grub
nano /etc/default/grub
Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and change to following:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_gvt=1"
Execute command:
update-grub
reboot host
Validate changes. It showed IOMMU enabled
dmesg | grep -e DMAR -e IOMMU
Edit etc modules
nano /etc/modules
# Modules required for PCI passthrough
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
# Modules required for Intel GVT
kvmgt
exngt
Vfio-mdev
Execute command:
update-initramfs -u -k all
Your VGA card should be visible with command
lspci -nnv | grep VGA
Enable GUC
echo "options i915 enable_guc=3" >> /etc/modprobe.d/i915.conf
Create LXC container as plivilaged and add parameters to configuration
nano /etc/pve/lxc/<container number>.conf
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
On LXC container
Update and upgrade system
apt update && apt upgrade -y
Install ffmpeg, software-properties-common, curl and gnupg
apt install ffmpeg -y
apt-get install software-properties-common -y
apt install curl gnupg -y
On Ubuntu (and derivatives) only, enable the Universe repository to obtain all the FFmpeg dependencies.
You dont need that on Debian
add-apt-repository universe
Download the GPG signing key (signed by the Jellyfin Team) and install it
mkdir -p /etc/apt/keyrings
curl -fsSL <https://repo.jellyfin.org/jellyfin_team.gpg.key> | sudo gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg
Add a repository configuration at
/etc/apt/sources.list.d/jellyfin.source
Update your APT repositorie
apt update
at this point the apt update command should be executed, if it is not executed you should check the jellyfin.list file
This is my jellyfin.list file on Debian12
deb [signed-by=/etc/apt/keyrings/jellyfin.gpg] https://repo.jellyfin.org/debian bookworm main
Install the Jellyfin metapackage, which will automatically fetch the various sub-packages:
apt install jellyfin -y
Add user jellyfin to needed groups
usermod -a -G video jellyfin
usermod -a -G render jellyfin
usermod -a -G input jellyfin
usermod -a -G ssl-cert jellyfin
install ffmpeg for jellyfin because for some reason jellyfin ffmpeg doesn't install with in jellyfin install with cause error trying to transcode HEVC
apt install jellyfin-ffmpeg -y
or
apt install jellyfin-ffmpeg6 -y
Now, go to Jellyfin Dashboard > Playback and active hardware decoding according to the vainfo result
(for intel 12th all options are checked)
Set permissions in the dri folder
sudo chmod -R 0666 /dev/dri/*
and make it permanet
Ensure the command: ls /dev/dri
Returns the value: render128 (or another number depending on your VGA).
Install Intel vainfo: ( if do you have Intel cpu with integrated vga)
sudo apt install intel-gpu-tools
You can also check the supported codecs of the VGA using:
vainfo
Check if your VGA is functioning correctly with:
intel_gpu_top
If all is good, you should see something like this.
In some cases after ther all bove steps, it dont work ad desidered.
SO a subsequent step may be necessary to edit a Udev rules file.
Udev is a user-space device manager that takes care of dynamically managing device nodes in the /dev filesystem.
so:
chmod 0666 /dev/dri/renderD128
And to make it permanent open this file with nano:
nano /etc/udev/rules.d/59-igpu-chmod666.rules
and add the content:
KERNEL=="renderD128", MODE="0666"
This specification sets the device file permissions to 0666, which means that all users will have read and write permissions on this GPU rendering device. (rw-rw-rw-).
Proxmox forum: lxc-igpu-passthrough
Youtube Novaspirit Tech: iGPU Transcoding Proxmox Jellyfin
Use an init script
Create an init script
Create a shell script that runs the desired command. For example, create a file called set_permissions.sh in the /usr/local/bin/ directory.
sudo nano /usr/local/bin/set_permissions.sh
Add the following lines to the file:
#!/bin/bash
chmod -R 0666 /dev/dri/*
Make the script executable:
sudo chmod +x /usr/local/bin/set_permissions.sh
Create a systemd service unit
Create a systemd service unit file to run the script on startup.
For example, create a file called set_permissions.service in the /etc/systemd/system/ directory.
sudo nano /etc/systemd/system/set_permissions.service
Add the following lines to the file:
[Unit]
Description=Set permissions for /dev/dri
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/set_permissions.sh
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
Enable and start the service
Enable the service to run on startup:
sudo systemctl enable set_permissions.service
Start the service immediately to apply changes without having to restart:
sudo systemctl start set_permissions.service
Useful link