You are not logged in.

#1 2024-07-10 11:23:32

SamX87
Member
Registered: 2024-07-10
Posts: 3

[Solved] OpenCL doens't load nvidia icd - nvidia-470xx-dkms (NVE0)

Hi folks,

I need some help  as I've been struggling for the past few days trying to get OpenCL to work with my (old) nvidia card.
I mainly use it for image processing on darktable, and I can't get OpenCL to recognize the nvidia card.

Driver installation method : https://github.com/korvahannu/arch-nvid … tion-guide

installed nvidia packages

 [sam@archlinux ~]$ pacman -Qs nvidia
local/egl-wayland 2:1.1.13-2
    EGLStream-based Wayland external platform
local/lib32-nvidia-470xx-utils 470.256.02-1
    NVIDIA drivers utilities (32-bit)
local/lib32-opencl-nvidia 555.58.02-1
    OpenCL implemention for NVIDIA (32-bit)
local/libvdpau 1.5-3
    Nvidia VDPAU library
local/libxnvctrl 555.58.02-1
    NVIDIA NV-CONTROL X extension
local/nvidia-470xx-dkms 470.256.02-5
    NVIDIA drivers - module sources
local/nvidia-470xx-utils 470.256.02-5
    NVIDIA drivers utilities
local/nvidia-settings 555.58.02-1
    Tool for configuring the NVIDIA graphics driver
local/opencl-nvidia 555.58.02-1
    OpenCL implemention for NVIDIA
[sam@archlinux ~]$ 

NVIDIA smi output

[sam@archlinux ~]$ nvidia-smi
Wed Jul 10 11:59:57 2024       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.256.02   Driver Version: 470.256.02   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 N/A |                  N/A |
| 34%   34C    P5    N/A /  N/A |    364MiB /  1996MiB |     N/A      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Installed ICDs.. : I also installed clover and rusticl just to test on darktable.

[sam@archlinux ~]$ ls /etc/OpenCL/vendors/
intel-cpu.icd  intel.icd  mesa.icd  nvidia.icd  rusticl.icd

[sam@archlinux ~]$ cat /etc/OpenCL/vendors/nvidia.icd 
libnvidia-opencl.so.1

### lib is present (files exist)
/usr/lib32/libnvidia-opencl.so.1
/usr/lib/libnvidia-opencl.so.1

But, OpenCL doesn't seem to see the nvidia driver. It recognizes Intel, clover and rusticl. But not nvidia.

[sam@archlinux ~]$ clinfo -l
Platform #0: Intel(R) CPU Runtime for OpenCL(TM) Applications
 `-- Device #0: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
Platform #1: rusticl
Platform #2: Clover

Some additional system info for reference:

sam@archlinux ~]$ uname -a
Linux archlinux 6.9.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jul 2024 22:11:24 +0000 x86_64 GNU/Linux

[sam@archlinux ~]$ lsmod | grep nvidia
nvidia_drm             81920  18
nvidia_uvm           2789376  0
nvidia_modeset       1511424  39 nvidia_drm
video                  77824  1 nvidia_modeset
nvidia              40759296  1801 nvidia_uvm,nvidia_modeset

sam@archlinux ~]$ lspci -k | grep -A 2 -E "(VGA|3D)"
01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 760] (rev a1)
        Subsystem: Micro-Star International Co., Ltd. [MSI] Device 2847
        Kernel driver in use: nvidia

# systemd-boot config:
title   Arch Linux (linux)
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root=PARTUUID=c7540b21-18a2-4b9a-9d99-0b49b979cada rw rootfstype=ext4 nvidia-drm.modeset=1 

# From boot log we can see it's there:
Kernel command line: initrd=\initramfs-linux.img root=PARTUUID=c7540b21-18a2-4b9a-9d99-0b49b979cada rw rootfstype=ext4 nvidia-drm.modeset=1


Display server is X11,  wayland doesn't seem to work with drivers older than the ones available for my card. Source: https://community.kde.org/Plasma/Wayland/Nvidia

I was using dwm, but switched to KDE this morning just to test on a different DE, issue is still present.


Assumption: I do see that nvidia-drm fails to grab modeset ownership:

[sam@archlinux ~]$ journalctl -b | grep nvidia
Jul 10 11:41:47 archlinux kernel: Command line: initrd=\initramfs-linux.img root=PARTUUID=c7540b21-18a2-4b9a-9d99-0b49b979cada rw rootfstype=ext4 nvidia-drm.modeset=1
Jul 10 11:41:47 archlinux kernel: Kernel command line: initrd=\initramfs-linux.img root=PARTUUID=c7540b21-18a2-4b9a-9d99-0b49b979cada rw rootfstype=ext4 nvidia-drm.modeset=1
Jul 10 11:41:47 archlinux kernel: nvidia: loading out-of-tree module taints kernel.
Jul 10 11:41:47 archlinux kernel: nvidia: module license 'NVIDIA' taints kernel.
Jul 10 11:41:47 archlinux kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Jul 10 11:41:47 archlinux kernel: nvidia: module license taints kernel.
Jul 10 11:41:47 archlinux kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 242
Jul 10 11:41:47 archlinux kernel: nvidia 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=io+mem
Jul 10 11:41:47 archlinux kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  470.256.02  Thu May  2 14:50:40 UTC 2024
Jul 10 11:41:47 archlinux kernel: nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
Jul 10 11:41:47 archlinux kernel: nvidia-uvm: Loaded the UVM driver, major device number 240.
Jul 10 11:41:47 archlinux kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Jul 10 11:41:47 archlinux kernel: caller _nv000720rm+0x1ad/0x200 [nvidia] mapping multiple BARs
Jul 10 11:41:47 archlinux kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
Jul 10 11:41:56 archlinux kernel: [drm:drm_new_set_master] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Jul 10 11:41:56 archlinux kernel: [drm:drm_new_set_master] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership

this could be an application misbehavior. Or not, tbh I'm lost at this point.

Any help would be much appreciated here.

Thank you so much

Last edited by SamX87 (2024-07-10 12:58:57)

Offline

#2 2024-07-10 11:51:10

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,384

Re: [Solved] OpenCL doens't load nvidia icd - nvidia-470xx-dkms (NVE0)

You have both 555 and 470 drivers installed, remove the 555 ones .

opencl support for nvidia drivers is in separate packages , for the 470 driver you need opencl-nvidia-470xx and lib32-opencl-nvidia-470xx  from aur .

They are not tied to specific kernel versions, so have no place in dkms packages .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building to complicated ?
Try clean chroot manager by graysky

Offline

#3 2024-07-10 12:58:33

SamX87
Member
Registered: 2024-07-10
Posts: 3

Re: [Solved] OpenCL doens't load nvidia icd - nvidia-470xx-dkms (NVE0)

Lone_Wolf can I give you a hug?

[sam@archlinux ~]$ yay -S opencl-nvidia-470xx and lib32-opencl-nvidia-470xx
....

[sam@archlinux ~]$ clinfo -l
Platform #0: NVIDIA CUDA
 `-- Device #0: NVIDIA GeForce GTX 760
Platform #1: Intel(R) CPU Runtime for OpenCL(TM) Applications
 `-- Device #0: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
Platform #2: rusticl
Platform #3: Clover

and just posting dt working with OpenCL :

     0.1406 [opencl_init] no devices found for Mesa (vendor) - Clover (name)
[opencl_init] found 2 devices

[dt_opencl_device_init]
   DEVICE:                   0: 'NVIDIA GeForce GTX 760'
   CONF KEY:                 cldevice_v5_nvidiacudanvidiageforcegtx760
   PLATFORM, VENDOR & ID:    NVIDIA CUDA, NVIDIA Corporation, ID=4318
   CANONICAL NAME:           nvidiacudanvidiageforcegtx760
   DRIVER VERSION:           470.256.02
   DEVICE VERSION:           OpenCL 3.0 CUDA, SM_20 SUPPORT
   DEVICE_TYPE:              GPU, dedicated mem
   GLOBAL MEM SIZE:          1997 MB
   MAX MEM ALLOC:            499 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      1024
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 1024 1024 64 ]
   ASYNC PIXELPIPE:          NO
   PINNED MEMORY TRANSFER:   NO
   AVOID ATOMICS:            NO
   MICRO NAP:                250
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      128
   TILING ADVANTAGE:         0.000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/sam/.cache/darktable/cached_v3_kernels_for_NVIDIACUDANVIDIAGeForceGTX760_47025602
   CL COMPILER OPTION:       -cl-fast-relaxed-math
   CL COMPILER COMMAND:      -w -cl-fast-relaxed-math  -DNVIDIA_SM_20=1 -DNVIDIA=1 -I"/usr/share/darktable/kernels"
   KERNEL LOADING TIME:       0.0246 sec

[dt_opencl_device_init]
   DEVICE:                   1: 'Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz'
   CONF KEY:                 cldevice_v5_intelrcpuruntimeforopencltmapplicationsintelrcoretmi54590cpu330ghz
   PLATFORM, VENDOR & ID:    Intel(R) CPU Runtime for OpenCL(TM) Applications, Intel(R) Corporation, ID=32902
   CANONICAL NAME:           intelrcpuruntimeforopencltmapplicationsintelrcoretmi54590cpu330ghz
   DRIVER VERSION:           18.1.0.0920
   DEVICE VERSION:           OpenCL 2.1 (Build 0)
   DEVICE_TYPE:              CPU, unified mem
   GLOBAL MEM SIZE:          7872 MB
   MAX MEM ALLOC:            1968 MB
   MAX IMAGE SIZE:           16384 x 16384
   MAX WORK GROUP SIZE:      8192
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 8192 8192 8192 ]
   ASYNC PIXELPIPE:          NO
   PINNED MEMORY TRANSFER:   NO
   AVOID ATOMICS:            NO
   MICRO NAP:                1000
   ROUNDUP WIDTH & HEIGHT    16x16
   CHECK EVENT HANDLES:      128
   TILING ADVANTAGE:         0.000
   DEFAULT DEVICE:           NO

Offline

Board footer

Powered by FluxBB