diff --git a/hosts/12kingdoms-youko/homelab-services/jellyfin.nix b/hosts/12kingdoms-youko/homelab-services/jellyfin.nix index c60bf8fd..ad621c3c 100644 --- a/hosts/12kingdoms-youko/homelab-services/jellyfin.nix +++ b/hosts/12kingdoms-youko/homelab-services/jellyfin.nix @@ -27,6 +27,14 @@ in # (and therefore VA-API) is missing. hardware.graphics.enable = true; + # HDR/DoVi transcoding needs OpenCL for `tonemap_opencl`. With only Mesa + # installed, ffmpeg cannot create an OpenCL device (`Failed to get number of + # OpenCL platforms: -1001`) and the transcode aborts with exit code 237, so + # HDR titles fail to play. ROCm's clr provides the ICD for the Barceló iGPU + # (reported as `gfx90c`); `ocl-icd` finds it under + # /run/opengl-driver/etc/OpenCL/vendors. + hardware.graphics.extraPackages = [ pkgs.rocmPackages.clr.icd ]; + services.jellyfin = { enable = true; @@ -96,4 +104,11 @@ in # before it is mounted. The module's own RequiresMountsFor entries for # config/log/cache are merged with these list definitions. systemd.services.jellyfin.unitConfig.RequiresMountsFor = [ mediaDir ]; + + # ROCm's OpenCL runtime (used for HDR tone mapping via `tonemap_opencl`) + # reaches the GPU through /dev/kfd. The module's device whitelist only allows + # the VA-API render node, so OpenCL init fails and HDR transcodes abort with + # exit code 237. Allow the compute node too (list definitions merge with the + # module's entry). + systemd.services.jellyfin.serviceConfig.DeviceAllow = [ "/dev/kfd rw" ]; }