RPM Error Tonemapping in HW- "Unable to get number of OpenCL platforms"-- Happens with all RPM Distributions

Server Version#: Version 1.25.0.5220
Player Version#: Version 4.66.1
OS: Fedora 35

HW Encoding works for all non HDR material, but it always defaults to Software Decoding as I get the Error with the OpenCL Check. It says it fails to get the number of OpenCL Platforms.

I have installed the beignet and OpenCL Drivers and it seems correct. Here is the plex log, with vainfo and clinfo Please note, as I’m running Fedora 35, I did build OpenCL and beignet from src.

Plex Debug Log Snippet:
Nov 12, 2021 16:37:51.148 [0x7f78bf326b38] ERROR - [Transcoder] [AVHWDeviceContext @ 0x7f5d7e2470c0] Failed to get number of OpenCL platforms: -1001.
Nov 12, 2021 16:37:51.148 [0x7f78bee89b38] ERROR - [Transcoder] [AVHWDeviceContext @ 0x7f5d7e2470c0] Failed to get number of OpenCL platforms: -1001.
Nov 12, 2021 16:37:51.148 [0x7f78beecbb38] ERROR - [Transcoder] [Parsed_hwmap_2 @ 0x7f5d7e29f4c0] Failed to created derived device context: -19.
Nov 12, 2021 16:37:51.148 [0x7f78bedafb38] ERROR - [Transcoder] [Parsed_hwmap_2 @ 0x7f5d7e29f4c0] Failed to configure output pad on Parsed_hwmap_2
Nov 12, 2021 16:37:51.149 [0x7f78bf25db38] ERROR - [Transcoder] Error reinitializing filters!
Nov 12, 2021 16:37:51.149 [0x7f78bf326b38] ERROR - [Transcoder] Failed to inject frame into filter network: No such device
Nov 12, 2021 16:37:51.198 [0x7f78bfc3cb38] DEBUG - Streaming Resource: Changing client to use software decoding
Nov 12, 2021 16:37:51.198 [0x7f78bfc3cb38] DEBUG - Found session GUID of 7qsx0vpritadei78uy04gulb in session start.
Nov 12, 2021 16:37:51.198 [0x7f78bfc3cb38] DEBUG - TranscodeUniversalRequest: using augmented profile Web

vainfo

libva info: VA-API version 1.13.0
libva info: User environment variable requested driver ‘iHD’
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.3.4 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD

clinfo

Number of platforms: 2
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 3.0
Platform Name: Intel(R) OpenCL HD Graphics
Platform Vendor: Intel(R) Corporation
Platform Extensions: cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_command_queue_families cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_intel_mem_force_host_memory cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_shuffle cl_khr_subgroup_shuffle_relative cl_khr_subgroup_clustered_reduce cl_intel_device_attribute_query cl_khr_suggested_local_work_size cl_khr_fp64 cl_khr_subgroups cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory_preview cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_3d_image_writes cl_intel_media_block_io cl_intel_va_api_media_sharing cl_intel_sharing_format_query cl_khr_pci_bus_info
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.0 beignet 1.4 (git-f40a2861)
Platform Name: Intel Gen OCL Driver
Platform Vendor: Intel
Platform Extensions: 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_3d_image_writes cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups cl_intel_subgroups_short cl_intel_required_subgroup_size cl_intel_media_block_io cl_intel_planar_yuv

Platform Name: Intel(R) OpenCL HD Graphics
Number of devices: 1
Device Type: CL_DEVICE_TYPE_GPU
Vendor ID: 8086h
Max compute units: 24
Max work items dimensions: 3
Max work items[0]: 256
Max work items[1]: 256
Max work items[2]: 256
Max work group size: 256
Preferred vector width char: 16
Preferred vector width short: 8
Preferred vector width int: 4
Preferred vector width long: 1
Preferred vector width float: 1
Preferred vector width double: 1
Native vector width char: 16
Native vector width short: 8
Native vector width int: 4
Native vector width long: 1
Native vector width float: 1
Native vector width double: 1
Max clock frequency: 1200Mhz
Address bits: 64
Max memory allocation: 4294959104
Image support: Yes
Max number of images read arguments: 128
Max number of images write arguments: 128
Max image 2D width: 16384
Max image 2D height: 16384
Max image 3D width: 16384
Max image 3D height: 16384
Max image 3D depth: 2048
Max samplers within kernel: 16
Max size of kernel argument: 2048
Alignment (bits) of base address: 1024
Minimum alignment (bytes) for any datatype: 128
Single precision floating point capability
Denorms: Yes
Quiet NaNs: Yes
Round to nearest even: Yes
Round to zero: Yes
Round to +ve and infinity: Yes
IEEE754-2008 fused multiply-add: Yes
Cache type: Read/Write
Cache line size: 64
Cache size: 524288
Global memory size: 26610794496
Constant buffer size: 4294959104
Max number of constant args: 8
Local memory type: Scratchpad
Local memory size: 65536
Max pipe arguments: 16
Max pipe active reservations: 1
Max pipe packet size: 1024
Max global variable size: 65536
Max global variable preferred total size: 4294959104
Max read/write image args: 128
Max on device events: 1024
Queue on device max size: 67108864
Max on device queues: 1
Queue on device preferred size: 131072
SVM capabilities:
Coarse grain buffer: Yes
Fine grain buffer: No
Fine grain system: No
Atomics: No
Preferred platform atomic alignment: 64
Preferred global atomic alignment: 64
Preferred local atomic alignment: 64
Kernel Preferred work group size multiple: 32
Error correction support: 0
Unified memory for Host and Device: 1
Profiling timer resolution: 83
Device endianess: Little
Available: Yes
Compiler available: Yes
Execution capabilities:
Execute OpenCL kernels: Yes
Execute native function: No
Queue on Host properties:
Out-of-Order: Yes
Profiling : Yes
Queue on Device properties:
Out-of-Order: Yes
Profiling : Yes
Platform ID: 0xdd4bf0
Name: Intel(R) UHD Graphics 630 [0x9bc5]
Vendor: Intel(R) Corporation
Device OpenCL C version: OpenCL C 3.0
Driver version: 21.46.0
Profile: FULL_PROFILE
Version: OpenCL 3.0 NEO
Extensions: cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_command_queue_families cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_intel_mem_force_host_memory cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_shuffle cl_khr_subgroup_shuffle_relative cl_khr_subgroup_clustered_reduce cl_intel_device_attribute_query cl_khr_suggested_local_work_size cl_khr_fp64 cl_khr_subgroups cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory_preview cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_3d_image_writes cl_intel_media_block_io cl_intel_va_api_media_sharing cl_intel_sharing_format_query cl_khr_pci_bus_info

Platform Name: Intel Gen OCL Driver
Number of devices: 1
Device Type: CL_DEVICE_TYPE_GPU
Vendor ID: 8086h
Max compute units: 24
Max work items dimensions: 3
Max work items[0]: 512
Max work items[1]: 512
Max work items[2]: 512
Max work group size: 256
Preferred vector width char: 16
Preferred vector width short: 8
Preferred vector width int: 4
Preferred vector width long: 2
Preferred vector width float: 4
Preferred vector width double: 0
Native vector width char: 8
Native vector width short: 8
Native vector width int: 4
Native vector width long: 2
Native vector width float: 4
Native vector width double: 2
Max clock frequency: 1000Mhz
Address bits: 32
Max memory allocation: 3221225472
Image support: Yes
Max number of images read arguments: 128
Max number of images write arguments: 8
Max image 2D width: 8192
Max image 2D height: 8192
Max image 3D width: 8192
Max image 3D height: 8192
Max image 3D depth: 2048
Max samplers within kernel: 16
Max size of kernel argument: 1024
Alignment (bits) of base address: 1024
Minimum alignment (bytes) for any datatype: 128
Single precision floating point capability
Denorms: No
Quiet NaNs: Yes
Round to nearest even: Yes
Round to zero: No
Round to +ve and infinity: No
IEEE754-2008 fused multiply-add: No
Cache type: Read/Write
Cache line size: 64
Cache size: 8192
Global memory size: 4294967296
Constant buffer size: 134217728
Max number of constant args: 8
Local memory type: Scratchpad
Local memory size: 65536
Max pipe arguments: 16
Max pipe active reservations: 1
Max pipe packet size: 1024
Max global variable size: 65536
Max global variable preferred total size: 65536
Max read/write image args: 8
Max on device events: 1024
Queue on device max size: 262144
Max on device queues: 1
Queue on device preferred size: 16384
SVM capabilities:
Coarse grain buffer: Yes
Fine grain buffer: No
Fine grain system: No
Atomics: No
Preferred platform atomic alignment: 0
Preferred global atomic alignment: 0
Preferred local atomic alignment: 0
Kernel Preferred work group size multiple: 16
Error correction support: 0
Unified memory for Host and Device: 1
Profiling timer resolution: 80
Device endianess: Little
Available: Yes
Compiler available: Yes
Execution capabilities:
Execute OpenCL kernels: Yes
Execute native function: Yes
Queue on Host properties:
Out-of-Order: No
Profiling : Yes
Queue on Device properties:
Out-of-Order: Yes
Profiling : Yes
Platform ID: 0x7f794140e540
Name: Intel(R) UHD Graphics Comet Lake Desktop GT2
Vendor: Intel
Device OpenCL C version: OpenCL C 2.0 beignet 1.4 (git-f40a2861)
Driver version: 1.4
Profile: FULL_PROFILE
Version: OpenCL 2.0 beignet 1.4 (git-f40a2861)
Extensions: 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_3d_image_writes cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups cl_intel_subgroups_short cl_intel_required_subgroup_size cl_intel_media_block_io cl_intel_planar_yuv cl_khr_fp16

May I see the contents of /tmp/plexinstaller.log ?

There is no file of /tmp/plexinstaller.log as I install from the RPM. Is there a way I can parse it so will keep it. I reinstalled it, but don’t see anything:

# rpm -ivh plexmediaserver-1.25.0.5220-de6e61df7.x86_64.rpm
warning: plexmediaserver-1.25.0.5220-de6e61df7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 3adca79d: NOKEY
Verifying… ################################# [100%]
Preparing… ################################# [100%]
Updating / installing…
1:plexmediaserver-1.25.0.5220-de6e6################################# [100%]

Thank you . Now I understand why.

The RPM packaging hasn’t yet been updated to include support for tonemapping .

The specifics of what you need, which are already packaged for Debian distributions, exists here:

Beignet & Open CL only work for the -3xxx → 9xxx CPUs.

CometLake (-10xxx), and RocketLake (-11xxx) require Intel Compute Runtime.

Regret to say that , given the state of Redhat, Centos, and Fedora, there hasn’t been any urge to spend any effort on RPM packaging.

At this point, without need being demonstrated by the community, RPM development is static.

You can download and compile the sources. Intel provides them at the link above.

Yes I did that, I have no issue compiling it.
I used the latest release and compiled it with the necessary dependencies and has no issue.
The above command clinfo has it there showing that it’s installed and running.
Platform Version: OpenCL 3.0
Platform Name: Intel(R) OpenCL HD Graphics

/etc/OpenCL/vendors/ has the built intel.icd with location:
/usr/local/lib64/intel-opencl/libigdrcl.so

As for RPM Packaging, is there something else that I need as it seems the test that looks for tonemapping is missing a specific check.?

One more thing you need to do to make it work.

In ld-musl-x86_64.path (under /usr/lib/plexmediaserver) add the directories where the ICR, Beignet, and OpenCL libraries are.

(Plex doesn’t use ldconfig anymore. It uses musl. musl needs to know where to look for files)

I added it the paths to /usr/lib/plexmediaserver/etc/ld-musl-x86_64.path and restarted the server but this didn’t work. Same issue saying "Failed to get number of OpenCL platforms: "
I am wondering if it how on your end are compiling ffmpeg for rpm compilation which may not include the flag `–enable-opencl’ with ./configure.
I was hoping that I wouldn’t have to run this in a docker, but it may be my only choice to get it to work.

I hope plex can put some priority to the RPM version for the packaging. Anyone running with Fedora / Rocky / Centos / RHEL will not be able to Hardware Tone Mapping.

@truevibe

RPM package updates is, truly, fighting an uphill battle.

The entire Redhat free distribution community is coming to an end – as seen by the discontinuation of Centos. Fedora will likely soon follow , IMHO. IBM is doing things their way now.

If there is a large outcry from our users, I can and will make the case to our product team.

Wow, that’s a statement.

RHEL compatible clones are doing very well, yes IBM is staying out of the way. Fedora is still very much the groundbreaking… Why don’t you try to discover AlmaLinux, Rocky Linux, VxLiux, Enterprise Oracle Linux?
Also Centos Stream is delivering now --very cool stuff based on RHEL9 is in beta.
I work with Redhat as one of their largest partners. RPM is as strong as ever.

Your quote: “The entire Redhat free distribution community is coming to an end”
Can you share where you get this?

This is REALLY bad news from PLEX.

@truevibe

I shared with you that which we know / I was told.

Your reply tells me we’re very ‘out of date’.

I brought this up in our team meeting tonight (night for me) before receiving your post here. .

What I can do immediately is: Upgrade the package to bring it largely to parity with the Debian package

One topic I am very ignorant about is the OpenCL scene / packages.

For Intel -9xxx and above CPUs, the Intel Compute Engine software is used
For Intel 2xxx - 8xxx CPUs, OpenCL and Beignet provide the functionality.

On Debian, all the above packages area external to Plex’s distribution

The packaging I’ve created for Debian/Ubuntu systems looks for

  1. CPU SKU to determine which extra packages need to be loaded.
  2. 2000-8000 CPUs
  • beignet-opencl-icd
  • ocl-icd-opencl1
  1. 9000 and above (Intel Compute Runtime - Releases · intel/compute-runtime · GitHub
  • intel-gmmlib
  • Intel-igc-core
  • intel-igc-opencl
  • intel-opencl
  • intel-level-zero-gpu

If you can point me to anything authoritative (RPM packages) for these Ubuntu/Debian packages, I will gladly do the work.

The understanding I have is there exists no RPM versions of these packages.

Our Engineering team has not decided whether to bring the sources of these packages in house and compile for inclusion with PMS (which would be a big task) but is honestly shying away from that if at all possible.

If you can help me, I will do my best to help you.

You are the only person to even ask me about tonemapping for RPM based systems.

I hope you can see, from where I sit, there is not much, if any, demand.

Again, please show me where I’m misinformed and I’ll do what I can ASAP.

(it’s not a lot of work if replacements for the debian packages can be identified)

Glad to hear that change in thought. I am glad to help.

For OpenCL, it is in the copr repo All these binaries are built here:
https://copr.fedorainfracloud.org/coprs/jdanecki/intel-opencl/
Specifically if you want to look at the directly listing of the repo of these RPMs mentioned, see:
https://download.copr.fedorainfracloud.org/results/jdanecki/intel-opencl/

As for the other CPUs 2000-8000, Beignet as it seems to be on maintenance mode. But do these older CPUs really support much HDR->SDR HW tonemapping? The support you already have should be enough I think as it does normal HW.

The older CPUs are a part of what’s out there.

You would probably be surprised.

7000 and 8000 CPUs are still quite common and mainstay’s in the community.

CometLake support was just added (stable).
RocketLake support is brand new (still has a few quirks to work out)

Followup -

Thank you for that. This is good info:

[bash][atlas]:workdir > sudo yum -y install intel-opencl
Loaded plugins: copr, fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: centos.mirror.ate.info
 * epel: linuxsoft.cern.ch
 * extras: mirror.plusserver.com
 * updates: centos.mirror.ate.info
Resolving Dependencies
--> Running transaction check
---> Package intel-opencl.x86_64 0:20.28.17293-1.el7 will be installed
--> Processing Dependency: intel-gmmlib = 20.2.2 for package: intel-opencl-20.28.17293-1.el7.x86_64
--> Processing Dependency: intel-igc-opencl = 1.0.4241 for package: intel-opencl-20.28.17293-1.el7.x86_64
--> Processing Dependency: libigdgmm.so.11()(64bit) for package: intel-opencl-20.28.17293-1.el7.x86_64
--> Running transaction check
---> Package intel-gmmlib.x86_64 0:20.2.2-1.el7 will be installed
---> Package intel-opencl.x86_64 0:20.28.17293-1.el7 will be installed
--> Processing Dependency: intel-igc-opencl = 1.0.4241 for package: intel-opencl-20.28.17293-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: intel-opencl-20.28.17293-1.el7.x86_64 (copr:copr.fedorainfracloud.org:jdanecki:intel-opencl)
           Requires: intel-igc-opencl = 1.0.4241
           Available: intel-igc-opencl-1.0.4944-1.el7.x86_64 (copr:copr.fedorainfracloud.org:jdanecki:intel-opencl)
               intel-igc-opencl = 1.0.4944-1.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[bash][atlas]:workdir >
I see that you updated the intel-igc RPM recently.

I can’t promise but I will try.

I looked at Beignet, but looking at the comments, support has been removed Q1 of 2018:
https://src.fedoraproject.org/rpms/beignet/c/74628d735c9a4e6c8ac5c888adbfca0f5db282b3?branch=master

Glad to hear you are looking at copr. I hope it was successful for you as it was for me.

Supplemental:

The error (OP) about OpenCL platforms , IIRC, is an issue with the new transcoder bump (PlexPass release).

Has 1.25.0.5246 been tested? It contains some of the fixes.
The next PlexPass release will contain more (which will include the VC-1 issue)

What I can do is:

  1. Inspect the local host system to see what’s there.
  2. Report those packages needed (which is what we’ll map to COPR or other.
  3. In the process, I’ll bring the package to the same base functionality as the Debian package. (where PMS checks all the basics and ports anything which has problems)
  • It will ingest the systemd overrides and validate the username has access to the “PLEX_MEDIA_SERVER_APPLICATION_DIR” .
  • Ingest and validate other unit overrides which may be there.
  • Generate a final report of the PMS runtime environment.
  • Inspect which tonemapping packahges are installed
  • Report the packages needed for HW Tone Mapping.

Yes I tested with 1.25.0.5246, and I get that error about OpenCL platforms. Thanks for the info about the next PlexPass, I’ll be keeping my eye out for it.

sharing – RocketLake broke a lot of things (upstream as well). That’s what’s being worked through now.

Thanks this is great