-
-
Save emanuellopes/a43d978f1b3604b07209a12cdf951ae3 to your computer and use it in GitHub Desktop.
- Edit grub and rewrite grub parameters
nano /etc/default/grub
Note: You should also append the iommu=pt parameter. This will prevent Linux from touching devices which cannot be passed through.
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt pcie_acs_override=downstream,multifunction"
The properties pcie_acs_override=downstream,multifunction, it's mandatory, without them, proxmox will crash.
In theory this board/cpu have problems with iommu groups, gpu can be solved using this, not tested https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough/ GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:off,efifb:off"
1.1. Update Grub
update-grub
- Update modules
nano /etc/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
2.1. Allow unsafe interrupts
echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf
2.2. Ignore kvm
echo "options kvm ignore_msrs=1" > /etc/modprobe.d/kvm.conf
2.2. Update kernel modules
update-initramfs -u -k all
- Edit grub and rewrite grub parameters
nano /etc/default/grub
Note: You should also append the iommu=pt parameter. This will prevent Linux from touching devices which cannot be passed through.
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt"
1.1. Update Grub
update-grub
- Update modules
nano /etc/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
coretemp
2.1 Update pve-blacklist
nano /etc/modprobe.d/pve-blacklist.conf
blacklist snd_hda_codec_hdmi
blacklist snd_hda_codec
blacklist snd_hda_core
blacklist i915
2.2. Update kernel modules
update-initramfs -u -k all
Notes: IGPU N150 is not supported in last stable kernel on proxmox. You must update to the version >= 6.11
The support for new GPU is only provided in kernel >6.11.
- Update proxmox to newer kernel
- Enable pve-no-subscription repo
- Install last kernel
apt install proxmox-kernel-6.14
reboot
- Install dependencies
apt install -y git cmake pkg-config meson libdrm-dev automake libtool
2.1. Download the latest version of LibVA
cd ~
git clone https://github.com/intel/libva.git
cd libva
Compile and install LibVA
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make
make install
2.2. Install GMMLib The Intel(R) Graphics Memory Management Library is a library that provides device and buffer management capabilities for the Intel(R) Graphics Compute Runtime for OpenCL and the Intel(R) Media Driver for VAAPI.
Download the latest version of GMMLib
cd ~
git clone https://github.com/intel/gmmlib.git
cd gmmlib
Compile and install GMMLib
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j"$(nproc)"
make install
2.3 Install Intel Media Driver for VAAPI Intel(R) Media Driver for VAAPI is a driver for Intel VGAs based on the GEN architecture, supporting hardware acceleration for decoding, encoding, and video post processing.
Download the latest version of Media Driver
cd ~
git clone https://github.com/intel/media-driver.git
Compile and install Media Driver
mkdir build_media
cd build_media
cmake ../media-driver
make -j"$(nproc)"
make install
3.4 Clean up
apt remove -y git cmake pkg-config meson libdrm-dev automake libtool
apt autoremove -y
rm -r build_media gmmlib libva media-driver
To confirm that the driver has been successfully installed and Hardware Acceleration (HA) can be used, perform the following steps:
Use the vainfo tool to view VA-API library information as follows:
apt install -y vainfo
vainfo
Result
error: can't connect to X server!
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_23
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.23 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 25.1.2 (223d039ee)
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
...
... If you see full information displayed and no error message, the installation was successful.
Using video players like Plex or Jellyfin, go to Settings > Transcoding and enable Hardware acceleration for Intel QuickSync (QSV).
Enable Transcoding/Hardware acceleration on Jellyfin Then try playing a video clip and go to “Settings” and change the image quality to a lower one (for example 420 kbps). If there is no error message, the HA feature is working.
Change image quality on Jellyfin In addition, while watching a movie, you can also turn on “Playback info” mode to display parameters related to “Transcoding” on the screen.
Display Transcoding information on Jellyfin
This method only works on Proxmox VE Shell or on privilleged LXC
apt install -y intel-gpu-tools
intel_gpu_top
When watching a movie on Plex or Jellyfin in Transcoding mode, if you see a lot of GPU usage, it means HA is active.