[TUTORIAL] Proxmox LXC iGPU passthrough

Mamiya_

New Member
Oct 14, 2022
4
1
1

Proxmox LXC iGPU passthrough​

I couldn't find any tutorial that worked out for me so i create my own.
Code was executed at Lenovo M720q, i5-8500T, Proxmox 8.1.3


Full step by step guide for passthrough intel iGPU for jellyfin and Intel CPU's gen7+
It seems like Firefox has some problems with transcoding movies. It’s recommended to stick with chromium based browsers.

Install the required drivers on the Proxmox host.​

Code:
apt install -y intel-opencl-icd

Edit grub
Code:
nano /etc/default/grub

Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and change to following:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_gvt=1"

Execute command:
Code:
update-grub

reboot host​


Validate changes. It showed IOMMU enabled
Code:
dmesg | grep -e DMAR -e IOMMU


Edit etc modules
Code:
nano /etc/modules
Code:
    # Modules required for PCI passthrough
    vfio
    vfio_iommu_type1
    vfio_pci
    vfio_virqfd
    # Modules required for Intel GVT
    kvmgt
    exngt
    Vfio-mdev

Execute command:
Code:
update-initramfs -u -k all

Your VGA card should be visible with command
Code:
lspci -nnv | grep VGA

Enable GUC
Code:
echo "options i915 enable_guc=3" >> /etc/modprobe.d/i915.conf


Create LXC container as plivilaged and add parameters to configuration
Code:
nano /etc/pve/lxc/<container number>.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


On LXC container


Update and upgrade system
Code:
apt update && apt upgrade -y


Install ffmpeg
Code:
apt install ffmpeg -y

Install software-properties-common
Code:
apt-get install software-properties-common -y

Install curl and gnupg
Code:
apt install curl gnupg -y

On Ubuntu (and derivatives) only, enable the Universe repository to obtain all the FFmpeg dependencies
Code:
add-apt-repository universe


Download the GPG signing key (signed by the Jellyfin Team) and install it
Code:
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
Code:
/etc/apt/sources.list.d/jellyfin.source

Code:
export VERSION_OS="$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release )"
export VERSION_CODENAME="$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )"
export DPKG_ARCHITECTURE="$( dpkg --print-architecture )"
cat <<EOF | tee /etc/apt/sources.list.d/jellyfin.sources
Types: deb
URIs: <https://repo.jellyfin.org/${VERSION_OS}>
Suites: ${VERSION_CODENAME}
Components: main
Architectures: ${DPKG_ARCHITECTURE}
Signed-By: /etc/apt/keyrings/jellyfin.gpg
EOF

Update your APT repositorie
Code:
apt update

Install the Jellyfin metapackage, which will automatically fetch the various sub-packages:
Code:
apt install jellyfin -y

Add user jellyfin to needed groups
Code:
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
Code:
apt install jellyfin-ffmpeg -y


these are setting for transcoding in jellyfin (i5-8500T)
Untitled.png
 
Last edited:
  • Like
Reactions: dylank9
Can you please get in more details after the On Ubuntu (and derivatives) only, enable the Universe repository to obtain all the FFmpeg dependencies?

after executing sudo gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg nothing happens.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!