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

Have you seen the Debian installer ?

I haven’t yet tried it yet. It seems very well supported.

Ubuntu / Debian is the majority of the user base and hence where my time gets allocated.

If you look at the sandbox, you’ll see where we did the first passes of CPU SKU identification and that sort of thing.

For RPMs, we’ll have our own Sandbox thread to work out all the kinks.

We’ll iterate between Developer-trial / User test until we get a consensus it’s ready.

If there are things to allow (like RPM updating in containers) I need to know that upfront so we have some sort of requirements list for the packaging update.

1 Like

Thanks, I look forward to hearing more

Given the coming holiday in the US, I’ll do what I can.

ANY help you / all can provide for exact package names to query for is greatly appreciated… e.g.

Sample code of what the package tests look like … (NOT rocket science)

[ "$(rpm -qa | grep intel-opencl.x86_64`)" != "" ] && HaveIntelOpenCL=1

It’s that basic of an inventory process

FYI: NEO is the work we want for all -9xxx CPUs and above.

Got some work done on the package upgrade.

  1. I can’t get the i915 to pass through into the VM (ESXi 7.0b – machine #2) (not listed in /sys/module) even with VGA=FALSE and the UHD630 passing through (shown in /dev/dri). My main PMS is the machine this config was cloned from so I’m missing something very obvious.

  2. Changing the inventory inquiry for %pre produces the following output (which is very promising.

# Plex Media Server installation configuration info:  Tue 23 Nov 2021 12:43:02 PM EST
Systemd=1
Custom=0
LinuxContainer=0
NewInstall=1
HaveOverride=0
OverrideFile=""
PlexUser="plex"
PlexGroup="plex"
VideoGroup="render"
AppSuppDir="/var/lib/plexmediaserver/Library/Application Support"
PlexTempDir="/tmp"
LangEncoding="en_US.UTF-8"
ExistingVersion=0
HaveHardware=1
HaveTranscoderPref=0
NeedUser=1
NeedGroup=1
NeedVideo=1
Verbose=1
Running=0
Errors=0
Warnings=0
HaveIntel=1
HaveIntelCore=1
HaveIntelXeon=0
Havei915=1     <---- This is hard set in code for testing purposes only -- NEEDS fix
HaveNvidia=0
Processor=Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz
CPUSKU=8809
NeedOpenCL=1
NeedBeignet=1
NeedIntelCompute=0
HaveIntelGmmlib=0
HaveIntelIGCCore=0
HaveIntelIGCOpenCL=0
HaveIntelOpenCL=0
HaveIntelZeroGPU=0
HaveIntelCompute=0
HaveBeignet=0
HaveOpenCL=0
Platform="VMware Virtual Platform"
Processor="Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz"
Distro="Fedora 30 (Workstation Edition)"
Kernel="Linux fedora 5.6.13-100.fc30.x86_64 #1 SMP Fri May 15 00:36:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux"
Memory="11973 1129 9563"
[root@fedora chuck]# 

Any experience with this? it’s going to be something simple that I’ve forgotten.

1 Like

This is first-draft.

  1. Should detect hardware OK.
  2. Will detect plex exists and /dev/dri video group.
  3. If a systemd override is in effect, it will both report it and validate APP_SUPPORT_DIR has perms for the runtime user.
  4. It also has support for Nvidia GPUs and certain Preferences.xml values.
  5. Package names are most likely wrong
  6. There are no actions taken by this pre-install (inventory only operation)

Please run this script.

Check the output of /tmp/plexinstaller.log (how information is passed from stage to stage and which also provides diagnostics in case of errors)

chuckpa-rpm-preinst.tar.gz (8.8 KB)

1 Like

Out of curiosity, can you try downgrading to see if tone mapping starts working properly?

I have what I think is the same problem you’re reporting - on both Fedora 34 and 35 - and if I downgrade to plexmediaserver-1.22.0.4163-d8c4875dd (found here: GitHub - axlecrusher/plex_download_urls: Archive of Plex mediaserver download URLs), transcoding / tonemapping is done in hardware.

See [PMS Bug] Hardware accelerated HDR tone mapping broken again. OpenCL is broken in Plex but not in system - #3 by swindmill

This script worked good, but I did see an error on how it searches for the rpm for opencl and a syntax error

Line 593: is checking for the rpm from deb install

[ "$(rpm -qa | grep -i ocl-icd-libopencl1)" != "" ] && HaveOpenCL=1
It should rather look for intel-opencl

Running it:

#./rpm-preinst-dev 
PlexMediaServer install: Pre-installation Validation.
./rpm-preinst-dev: line 597: [: -gt: unary operator expected
    PlexMediaServer install: Pre-installation Validation complete.

It does come with an error because of this when ran, it looks like you may want to use double brackets in the if compares. So you should also change the line 596, 597 to:

    # If have all 6  ICR packages, flag as complete
    [[ $HaveIntelGmmlib -gt 0 ]] && [[ $HaveIntelIGCCore -gt 0 ]] && [[ $HaveIntelIGCOpenCL -gt 0 ]] && \
    [[ $HaveIntelOpenCL -gt 0 ]] && [[ $HaveIntelOCLoc   -gt 0 ]] && [[ $HaveIntelZeroGPU   -gt 0 ]] && HaveIntelCompute=1

Here is my output:

# Plex Media Server installation configuration info:  Tue Nov 23 09:09:08 PM PST 2021
Systemd=1
Custom=0
LinuxContainer=0
NewInstall=0
HaveOverride=0
OverrideFile=""
PlexUser="plex"
PlexGroup="plex"
VideoGroup="render"
AppSuppDir="/var/lib/plexmediaserver/Library/Application Support"
PlexTempDir="/var/lib/plexmediaserver/encdir"
LangEncoding="en_US.UTF-8"
ExistingVersion=0
HaveHardware=1
HaveTranscoderPref=1
NeedUser=0
NeedGroup=0
NeedVideo=0
Verbose=1
Running=1
Errors=0
Warnings=0
HaveIntel=1
HaveIntelCore=1
HaveIntelXeon=0
Havei915=1
HaveNvidia=0
Processor=Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz
CPUSKU=10700
NeedOpenCL=1
NeedBeignet=0
NeedIntelCompute=1
HaveIntelGmmlib=1
HaveIntelIGCCore=1
HaveIntelIGCOpenCL=1
HaveIntelOpenCL=1
HaveIntelOCLoc=
HaveIntelZeroGPU=0
HaveIntelCompute=0
HaveBeignet=0
HaveOpenCL=0
Platform="To Be Filled By O.E.M."
Processor="Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz"
Distro="Fedora Linux 35 (Thirty Five)"
Kernel="Linux rave.truevibe.net 5.14.18-300.fc35.x86_64 #1 SMP Fri Nov 12 16:43:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux"
Memory="31722 3380 512"

I have always had issues with passing video card hw with ESX servers. I hope you figured this out.

This is a great first draft. I can help with the package names. I’ll update it with my findings.

I updated the script with level-zero name, and opencl rpm.
chuckpa-rpm-preinst-update.tar.gz (8.8 KB)

This is my output:

# Plex Media Server installation configuration info:  Tue Nov 23 10:33:57 PM PST 2021
Systemd=1
Custom=0
LinuxContainer=0
NewInstall=0
HaveOverride=0
OverrideFile=""
PlexUser="plex"
PlexGroup="plex"
VideoGroup="render"
AppSuppDir="/var/lib/plexmediaserver/Library/Application Support"
PlexTempDir="/var/lib/plexmediaserver/encdir"
LangEncoding="en_US.UTF-8"
ExistingVersion=0
HaveHardware=1
HaveTranscoderPref=1
NeedUser=0
NeedGroup=0
NeedVideo=0
Verbose=1
Running=1
Errors=0
Warnings=0
HaveIntel=1
HaveIntelCore=1
HaveIntelXeon=0
Havei915=1
HaveNvidia=0
Processor=Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz
CPUSKU=10700
NeedOpenCL=1
NeedBeignet=0
NeedIntelCompute=1
HaveIntelGmmlib=1
HaveIntelIGCCore=1
HaveIntelIGCOpenCL=1
HaveIntelOpenCL=1
HaveIntelOCLoc=
HaveIntelZeroGPU=1
HaveIntelCompute=0
HaveBeignet=0
HaveOpenCL=1
Platform="To Be Filled By O.E.M."
Processor="Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz"
Distro="Fedora Linux 35 (Thirty Five)"
Kernel="Linux rave.truevibe.net 5.14.18-300.fc35.x86_64 #1 SMP Fri Nov 12 16:43:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux"
Memory="31722 3448 518"

What are the names please so I can just pop them into the master code ?

Line 597:

[[ ]] should not be needed. Each test is single operator . Each && chains them together.

I’m uncertain why bash is different between distros. It should be the exact same.
I ran it in Fedora 35 before giving it here.

That output looks correct:

NeedOpenCL = HaveOpenCL
NeedIntelCompute = 1 (CPUSKU > 9000)
HaveIntelCompute = (HaveGmmlib && … all the components … )

Ocloc will go away. It’s not needed in the new transcoder release.

Because I’m basing the RPM code around your output, and I can’t get the i915 to pass through correctly in my new VM (hate ESXI being fussy), If I were to generate a package based on this input, would it work?

I see HaveIntelOCLoc is not defined so likely where the error comes from., As it’s going away, so why the error on line 597.

As for the lines, here is what needs to be in the script:

    # ICR Packages
    [ "$(rpm -qa  | grep -i intel-gmmlib)"         != "" ] && HaveIntelGmmlib=1
    [ "$(rpm -qa  | grep -i intel-igc-core)"       != "" ] && HaveIntelIGCCore=1
    [ "$(rpm -qa  | grep -i intel-igc-opencl)"     != "" ] && HaveIntelIGCOpenCL=1
    [ "$(rpm -qa  | grep -i intel-opencl)"         != "" ] && HaveIntelOpenCL=1
    [ "$(rpm -qa  | grep -i intel-level-zero)"           != "" ] && HaveIntelZeroGPU=1

    # OpenCL  (Required regardless of which Tone Mapping solution installed)
    [ "$(rpm -qa | grep -i ocl-icd)" != "" ] && HaveOpenCL=1

I think you can base a package off my input.
For the ESXi, I assume you are using passthrough mode for the i915, so make sure that it’s toggled passthrough.

Also this page has the simple package manager commands to easily install neo opencl not just for rpm, but as it shows for ubuntu, and others:

Also for level-zero it is here:

@truevibe

I’m using ESXi 7.0u1 on a NUC8 (i7-8809G)

The only ESXi options are as follows and why I can’t remember the magic of how I set it up the first time (there’s voodoo here somewhere I’m forgetting)


Side note: Tried to download (for backup purposes) my Plex VM. it kept failing in VMware Workstation. :roll_eyes:

I don’t think you need to change the Settings, you have to go to the Configure tab, select Hardware > PCI Devices, and click Configure Passthrough.

A detailed page on this, but it’s for ESXi 6.5, but should be similar is here:
https://elatov.github.io/2018/04/esxi-65-passthrough-video-card-to-plex-vm/#hardware-acceleration-with-plex

It won’t work in Workstation, as you can’t passthough the card as you can with ESXi.

Remember me telling you it was simple?

Don’t know why but after another restart of the guest, it came through

[chuck@fedora ~]$ cd /sys/module/i915
[chuck@fedora i915]$ ls -la
total 0
drwxr-xr-x.   7 root root    0 Nov 24 12:43 .
drwxr-xr-x. 179 root root    0 Nov 24 12:43 ..
-r--r--r--.   1 root root 4096 Nov 24 12:44 coresize
drwxr-xr-x.   2 root root    0 Nov 24 12:44 drivers
drwxr-xr-x.   2 root root    0 Nov 24 12:44 holders
-r--r--r--.   1 root root 4096 Nov 24 12:44 initsize
-r--r--r--.   1 root root 4096 Nov 24 12:44 initstate
drwxr-xr-x.   2 root root    0 Nov 24 12:44 notes
drwxr-xr-x.   2 root root    0 Nov 24 12:44 parameters
-r--r--r--.   1 root root 4096 Nov 24 12:44 refcnt
drwxr-xr-x.   2 root root    0 Nov 24 12:44 sections
-r--r--r--.   1 root root 4096 Nov 24 12:44 taint
--w-------.   1 root root 4096 Nov 24 12:43 uevent
[chuck@fedora i915]$ cd drivers
[chuck@fedora drivers]$ ls -la
total 0
drwxr-xr-x. 2 root root 0 Nov 24 12:44 .
drwxr-xr-x. 7 root root 0 Nov 24 12:43 ..
lrwxrwxrwx. 1 root root 0 Nov 24 12:44 pci:i915 -> ../../../bus/pci/drivers/i915
[chuck@fedora drivers]$ 

HaveIntelXeon=0
Havei915=1
HaveNvidia=0
Processor=Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz
CPUSKU=8809
NeedOpenCL=1
NeedBeignet=1
NeedIntelCompute=0
HaveIntelGmmlib=0
HaveIntelIGCCore=0
HaveIntelIGCOpenCL=0
HaveIntelOpenCL=0
HaveIntelOCLoc=
HaveIntelZeroGPU=0
HaveIntelCompute=0
HaveBeignet=0
HaveOpenCL=0
Platform="VMware Virtual Platform"
Processor="Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz"
Distro="Fedora Linux 35 (Workstation Edition)"
Kernel="Linux fedora 5.14.18-300.fc35.x86_64 #1 SMP Fri Nov 12 16:43:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux"
Memory="11957 365 11112"
[chuck@fedora ~]$ 

I have one word for it … ā€œWhatever!ā€ :roll_eyes:

I know, as I was reply to the side note:
Side note: Tried to download (for backup purposes) my Plex VM. it kept failing in VMware Workstation. :roll_eyes: