Skip to content

Fix OCL_ICD_VENDORS path so Intel OpenCL (HDR tonemapping) works#118

Merged
aptalca merged 1 commit into
linuxserver:betafrom
Sausageroll2077:fix-opencl-tonemap-path
Jun 19, 2026
Merged

Fix OCL_ICD_VENDORS path so Intel OpenCL (HDR tonemapping) works#118
aptalca merged 1 commit into
linuxserver:betafrom
Sausageroll2077:fix-opencl-tonemap-path

Conversation

@Sausageroll2077

Copy link
Copy Markdown

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Points OCL_ICD_VENDORS at /app/emby/etc/OpenCL/vendors in the Emby service run script (root/etc/s6-overlay/s6-rc.d/svc-emby/run).

The service exported OCL_ICD_VENDORS=/app/emby/extra/etc/OpenCL/vendors, which does not exist in the image. The OpenCL ICD loader therefore found no platforms and ffmpeg failed to create an OpenCL device:

[AVHWDeviceContext] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.

(-1001 = CL_PLATFORM_NOT_FOUND_KHR.) As a result, Intel HDR→SDR tonemapping (the vpp_qsv → hwmap(opencl) → tonemap_opencl → hwmap(qsv) filter chain) failed with Error reinitializing filters, and Emby fell back to slow software (libx264) transcoding.

The actual ICD vendor files ship at /app/emby/etc/OpenCL/vendors (intel.icd / intel_legacy1.icd), which reference libigdrcl.so — already resolvable via the service's LD_LIBRARY_PATH (/app/emby/lib). Pointing OCL_ICD_VENDORS at the real directory restores the full hardware tonemapping pipeline.

A changelog entry has been added to readme-vars.yml.

Benefits of this PR and context:

Restores hardware HDR tonemapping on Intel GPUs (QuickSync + OpenCL). Without this, any HDR→SDR transcode silently drops to software encoding, which is dramatically slower (observed ~3–4x vs ~12x on the same Arc A380). The official emby/embyserver image sets this env correctly, so this brings the LSIO image in line.

How Has This Been Tested?

On a real Intel iGPU, ran ffmpeg's OpenCL device init inside the lscr.io/linuxserver/emby:beta container with the service's exact env, before and after the change:

  • Before (OCL_ICD_VENDORS=/app/emby/extra/etc/OpenCL/vendors): Failed to get number of OpenCL platforms: -1001, exit 1.
  • After (OCL_ICD_VENDORS=/app/emby/etc/OpenCL/vendors): OpenCL device created, exit 0.

This matches real-world transcode logs where the LSIO image fell back to software while the official image completed the QSV+OpenCL tonemap pipeline.

Source / References:

N/A

The service exported OCL_ICD_VENDORS=/app/emby/extra/etc/OpenCL/vendors,
which does not exist in the image. The OpenCL ICD loader therefore found
no platforms (CL_PLATFORM_NOT_FOUND_KHR / -1001), so ffmpeg could not
create an OpenCL device. HDR->SDR tonemapping (vpp_qsv -> opencl ->
tonemap_opencl) failed with 'Error reinitializing filters' and Emby fell
back to slow software (libx264) transcoding.

The actual ICD vendor files ship at /app/emby/etc/OpenCL/vendors
(intel.icd / intel_legacy1.icd, referencing libigdrcl.so on
LD_LIBRARY_PATH). Pointing OCL_ICD_VENDORS there restores the full
hardware tonemapping pipeline. Validated on an Intel iGPU: ffmpeg
-init_hw_device opencl went from -1001 to exit 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this from PRs to PRs Approved in Issue & PR Tracker Jun 19, 2026
@aptalca aptalca merged commit 64d5ef8 into linuxserver:beta Jun 19, 2026
4 checks passed
@LinuxServer-CI LinuxServer-CI moved this from PRs Approved to Done in Issue & PR Tracker Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants