AFAIK, environment.sessionVariables does not apply to systemd services, so you’ll have to set systemd.services.jellyfin.environment.LIBVA_DRIVER_NAME = "iHD"; to achieve what you want.
Also, are you sure you’ve enabled hardware transcoding in the Jellyfin admin dashboard? I don’t know whether it’s enabled by default.
Also, it strikes we as very odd that you’re using the 32 bit package for intel-vaapi-driveronly. The Jellyfin package for NixOS is definitely for x86_64.
Edit: the iHD driver is in intel-media-driver. intel-vaapi-driver contains the i965 driver, which you probably don’t need.
This one is a dumb error i made : i tried intel-vaapi-driver instead of media-driver and only replace the 64bit package when reverting those tests. It does not work better with the 32 bit package, nor with the additional env variable in systemd service.
Clinfo return nothing on the VM so there is definitely something wrong with the GPU config rather than jellyfin :
nix-shell -p clinfo --run clinfo
Number of platforms 0
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.3.2
ICD loader Profile OpenCL 3.0
Edit : i needed to install intel-ocl to have clinfo informations :
Number of platforms 1
Platform Name Intel(R) OpenCL
Platform Vendor Intel(R) Corporation
Platform Version OpenCL 1.2 LINUX
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64
Platform Extensions function suffix INTEL
Platform Name Intel(R) OpenCL
Number of devices 1
Device Name Intel(R) N100
Device Vendor Intel(R) Corporation
Device Vendor ID 0x8086
Device Version OpenCL 1.2 (Build 475)
Driver Version 1.2.0.475
Device OpenCL C Version OpenCL C 1.2
Device Type CPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 4
Max clock frequency 0MHz
Device Partition (core)
Max number of sub-devices 4
Supported partition types by counts, equally, by names (Intel)
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 8192x8192x8192
Max work group size 8192
Preferred work group size multiple (kernel) 128
Preferred / native vector sizes
char 1 / 32
short 1 / 16
int 1 / 8
long 1 / 4
half 0 / 0 (n/a)
float 1 / 8
double 1 / 4 (cl_khr_fp64)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero No
Round to infinity No
IEEE754-2008 fused multiply-add No
Support is emulated in software No
Correctly-rounded divide and sqrt operations No
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Address bits 64, Little-Endian
Global memory size 4111093760 (3.829GiB)
Error Correction support No
Max memory allocation 1027773440 (980.2MiB)
Unified memory for Host and Device Yes
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Global Memory cache type Read/Write
Global Memory cache size 524288 (512KiB)
Global Memory cache line size 64 bytes
Image support Yes
Max number of samplers per kernel 480
Max size for 1D images from buffer 64235840 pixels
Max 1D or 2D image array size 2048 images
Max 2D image size 16384x16384 pixels
Max 3D image size 2048x2048x2048 pixels
Max number of read image args 480
Max number of write image args 480
Local memory type Global
Local memory size 32768 (32KiB)
Max number of constant args 480
Max constant buffer size 131072 (128KiB)
Max size of kernel argument 3840 (3.75KiB)
Queue properties
Out-of-order execution Yes
Profiling Yes
Local thread execution (Intel) Yes
Prefer user sync for interop No
Profiling timer resolution 1ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels Yes
SPIR versions 1.2
printf() buffer size 1048576 (1024KiB)
Built-in kernels (n/a)
Device Extensions cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Intel(R) OpenCL
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [INTEL]
clCreateContext(NULL, ...) [default] Success [INTEL]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name Intel(R) OpenCL
Device Name Intel(R) N100
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) Success (1)
Platform Name Intel(R) OpenCL
Device Name Intel(R) N100
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name Intel(R) OpenCL
Device Name Intel(R) N100
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.3.2
ICD loader Profile OpenCL 3.0
One other thing, is the user Jellyfin runs under member of the video group? This is required to access the GPU at /dev/dri/card1.
Background:
For graphical sessions started from a display manager or TTY, systemd-logind automatically grants access to devices. But for processes started any other way (e.g. from SSH sessions or as system services), UNIX file permissions are required to get device access.
I’m also wondering about i915.force_probe=a721 kernel parameter. Do you also have it set on your Debian VM? Can you check which module (i915/xe) the Debian VM uses?
I don’t really know which driver is recommended. My Framework Notebook’s i5-1240P seems to be using i915, and video acceleration is working fine.
But I read in the Arch Wiki that there is a difference in firmware loading for the HuC (HEVC/H.265 micro Controller). Which makes me wonder:
Does dmesg show any errors related to firmware loading? Have you enabled hardware.enableAllFirmware?
Have you set i915.enable_guc? Maybe setting it to 3 can help (see the wiki)
I tried only setting i915.enable_guc boot param but it did not work, i had to also set hardware.enableAllFirmware to true. I now have a working config, not changing anything else :
i915 is the older Kernel module while xe is the newer. iHD is the userspace VAAPI driver, but I think it works with both Kernel modules.
I’m not sure how the Linux kernel selects between the kernel modules. On my i5-1240P, both modules are loaded, but I only see log messages from the i915 module. I don’t have any kernel parameters related to either module set.
Regarding your config, the two kernel parameters should be separate strings. I’m not sure if i915.enable_guc=3 even has any effect right now. It might just be parsed as an another argument for i915.force_probe.
My guess is that i915.enable_guc is probably not required, and the problem was the missing firmware all along.
EDIT: you can forget everything I said about the xe module. It’s only available since Linux kernel version 6.8, but NixOS 24.11 is still using Linux 6.6. I’m running NixOS unstable on my Notebook, which is why it’s showing up for me. But it’s still experimental, and won’t be used by default.
I just got confused because the Alder Lake iGPUs are branded as “Xe Graphics”, but that doesn’t mean you have to (or even should) use the xe kernel module.
Linux kernel module are just weird sometimes. I mean, “i915” is the name of some ancient Intel chipset, but the i915 kernel module supports modern day GPUs.