Failed to create OpenCL context on recent Fedora 36 kernels

It seems that a lot of GPU problems revolve around specific versions of drivers. Though NVidia has their own support structure, you can often learn from information reported by others who fold.

Moderators: Site Moderators, FAHC Science Team

Post Reply
bikeaddict
Posts: 187
Joined: Sun May 03, 2020 1:20 am

Failed to create OpenCL context on recent Fedora 36 kernels

Post by bikeaddict »

Fedora 36 has been testing kernel 5.17.8 and is about to be released. When I tested with this kernel, folding fails with these messages:

Code: Select all

15:24:58:WU01:FS00:0x22:  Configuring platform OpenCL
15:24:58:WU01:FS00:0x22:Failed to create OpenCL context:
15:24:58:WU01:FS00:0x22:Error initializing context: clCreateContext (-5)
15:24:58:WU01:FS00:0x22:ERROR:125: Failed to create a GPU-enabled OpenMM Context.
15:24:58:WU01:FS00:0x22:Saving result file ../logfile_01.txt
15:24:58:WU01:FS00:0x22:Saving result file science.log
15:24:58:WU01:FS00:0x22:Folding@home Core Shutdown: BAD_WORK_UNIT
15:24:58:WARNING:WU01:FS00:FahCore returned: BAD_WORK_UNIT (114 = 0x72)
Then even when rebooting back to 5.17.7, the error is still there. I had to remove the 5.17.7 kmod package and let it rebuild the nvidia kernel module and any associated libraries on boot. Kernel 5.17.9 is now in testing (https://bodhi.fedoraproject.org/updates ... ges=kernel) and it gave the same error. For now, I've disabled kernel updates by adding exclude=kernel* to /etc/dnf/dnf.conf.

Not sure how to troubleshoot this. There is nothing obvious in the akmod log in /var/cache/akmods/nvidia/.
hrsetrdr
Posts: 112
Joined: Sun Dec 02, 2007 4:29 pm
Location: In the Fold somewhere in SoCal.

Re: Failed to create OpenCL context on recent Fedora 36 kernels

Post by hrsetrdr »

I don't use Fedora regularly, but I gather you need OpenCL for your GPU client. Maybe: https://linux-packages.com/fedora-36/pa ... -icdx86-64
Folding rig:Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 128GB DDR3 ECC Registered

Image
Install Folding@Home on Linux without Python dependancy issues
bikeaddict
Posts: 187
Joined: Sun May 03, 2020 1:20 am

Re: Failed to create OpenCL context on recent Fedora 36 kernels

Post by bikeaddict »

WUs are processing properly on all previous 5.17.x kernels. The client detects OpenCL and CUDA on both the working and broken kernels.

Code: Select all

15:22:35:  CUDA Device 0: Platform:0 Device:0 Bus:1 Slot:0 Compute:8.6 Driver:11.6
15:22:35:OpenCL Device 0: Platform:0 Device:0 Bus:1 Slot:0 Compute:3.0 Driver:510.68
It may be a compatibility problem between NVIDIA driver 510.68 and the last couple 5.17.x kernels. This is the latest driver available from rpmfusion, so I will wait to see if a newer release has a fix.
bikeaddict
Posts: 187
Joined: Sun May 03, 2020 1:20 am

Re: Failed to create OpenCL context on recent Fedora 36 kernels

Post by bikeaddict »

Discovered something new today after a bunch of new updates installed that included kernel firmware. Something broke folding on the 5.17.7 kernel and it showed the same OpenCL error as the newer versions. I had to remove the kmod package and let it rebuild the nvidia kernel modules on boot.

Then I tried installing 5.17.9 that is currently in testing and again removed the kmod package that is automatically built by akmods after a kernel is installed. After letting it build the modules on boot, folding now works on the newer kernel. So it seems something is broken when the build happens after kernel install, but works when the build happens at boot.
Post Reply