Clinfo number of platforms 0

xubuntu 22.04, ocl-icd-libopencl1 and ocl-icd-opencl-dev 2.2.14-3, amd cpu, nvidia GeForce RTX 3060 Mobile video card.

When I boot I get:

$ clinfo 
Number of platforms                               1
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 3.0 CUDA 12.2.147
  Platform Profile                                FULL_PROFILE
  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_fp64 cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_device_uuid cl_khr_pci_bus_info cl_khr_external_semaphore cl_khr_external_memory cl_khr_external_semaphore_opaque_fd cl_khr_external_memory_opaque_fd
  Platform Extensions with Version                cl_khr_global_int32_base_atomics                                 0x400000 (1.0.0)
                                                  cl_khr_global_int32_extended_atomics                             0x400000 (1.0.0)
                                                  cl_khr_local_int32_base_atomics                                  0x400000 (1.0.0)
                                                  cl_khr_local_int32_extended_atomics                              0x400000 (1.0.0)
                                                  cl_khr_fp64                                                      0x400000 (1.0.0)
                                                  cl_khr_3d_image_writes                                           0x400000 (1.0.0)
                                                  cl_khr_byte_addressable_store                                    0x400000 (1.0.0)
                                                  cl_khr_icd                                                       0x400000 (1.0.0)
                                                  cl_khr_gl_sharing                                                0x400000 (1.0.0)
                                                  cl_nv_compiler_options                                           0x400000 (1.0.0)
                                                  cl_nv_device_attribute_query                                     0x400000 (1.0.0)
                                                  cl_nv_pragma_unroll                                              0x400000 (1.0.0)
                                                  cl_nv_copy_opts                                                  0x400000 (1.0.0)
                                                  cl_nv_create_buffer                                              0x400000 (1.0.0)
                                                  cl_khr_int64_base_atomics                                        0x400000 (1.0.0)
                                                  cl_khr_int64_extended_atomics                                    0x400000 (1.0.0)
                                                  cl_khr_device_uuid                                               0x400000 (1.0.0)
                                                  cl_khr_pci_bus_info                                              0x400000 (1.0.0)
                                                  cl_khr_external_semaphore                                          0x9000 (0.9.0)
                                                  cl_khr_external_memory                                             0x9000 (0.9.0)
                                                  cl_khr_external_semaphore_opaque_fd                                0x9000 (0.9.0)
                                                  cl_khr_external_memory_opaque_fd                                   0x9000 (0.9.0)
  Platform Numeric Version                        0xc00000 (3.0.0)
  Platform Extensions function suffix             NV
  Platform Host timer resolution                  0ns

  Platform Name                                   NVIDIA CUDA
Number of devices                                 1
  Device Name                                     NVIDIA GeForce RTX 3060 Laptop GPU
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 3.0 CUDA
  Device UUID                                     684fa666-7afc-8a1b-37fd-42c44af1a22b
  Driver UUID                                     684fa666-7afc-8a1b-37fd-42c44af1a22b
  Valid Device LUID                               No
  Device LUID                                     6d69-637300000000
  Device Node Mask                                0
  Device Numeric Version                          0xc00000 (3.0.0)
  Driver Version                                  535.129.03
  Device OpenCL C Version                         OpenCL C 1.2 
  Device OpenCL C all versions                    OpenCL C                                                         0x400000 (1.0.0)
                                                  OpenCL C                                                         0x401000 (1.1.0)
                                                  OpenCL C                                                         0x402000 (1.2.0)
                                                  OpenCL C                                                         0xc00000 (3.0.0)
  Device OpenCL C features                        __opencl_c_fp64                                                  0xc00000 (3.0.0)
                                                  __opencl_c_images                                                0xc00000 (3.0.0)
                                                  __opencl_c_int64                                                 0xc00000 (3.0.0)
                                                  __opencl_c_3d_image_writes                                       0xc00000 (3.0.0)
  Latest comfornace test passed                   v2022-10-05-00
  Device Type                                     GPU
  Device Topology (NV)                            PCI-E, 0000:01:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               30
  Max clock frequency                             1282MHz
  Compute Capability (NV)                         8.6
  Device Partition                                (core)
    Max number of sub-devices                     1
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x64
  Max work group size                             1024
  Preferred work group size multiple (device)     32
  Preferred work group size multiple (kernel)     32
  Warp size (NV)                                  32
  Max sub-groups per work group                   0
  Preferred / native vector sizes                 
    char                                                 1 / 1       
    short                                                1 / 1       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 0 / 0        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              6226378752 (5.799GiB)
  Error Correction support                        No
  Max memory allocation                           1556594688 (1.45GiB)
  Unified memory for Host and Device              No
  Integrated memory (NV)                          No
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   No
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       4096 bits (512 bytes)
  Preferred alignment for atomics                 
    SVM                                           0 bytes
    Global                                        0 bytes
    Local                                         0 bytes
  Atomic memory capabilities                      relaxed, work-group scope
  Atomic fence capabilities                       relaxed, acquire/release, work-group scope
  Max size for global variable                    0
  Preferred total size of global vars             0
  Global Memory cache type                        Read/Write
  Global Memory cache size                        860160 (840KiB)
  Global Memory cache line size                   128 bytes
  Image support                                   Yes
    Max number of samplers per kernel             32
    Max size for 1D images from buffer            268435456 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             32768x32768 pixels
    Max 3D image size                             16384x16384x16384 pixels
    Max number of read image args                 256
    Max number of write image args                32
    Max number of read/write image args           0
  Pipe support                                    No
  Max number of pipe args                         0
  Max active pipe reservations                    0
  Max pipe packet size                            0
  Local memory type                               Local
  Local memory size                               49152 (48KiB)
  Registers per block (NV)                        65536
  Max number of constant args                     9
  Max constant buffer size                        65536 (64KiB)
  Generic address space support                   No
  Max size of kernel argument                     32764 (32KiB)
  Queue properties (on host)                      
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Device enqueue capabilities                     (n/a)
  Queue properties (on device)                    
    Out-of-order execution                        No
    Profiling                                     No
    Preferred size                                0
    Max size                                      0
  Max queues on device                            0
  Max events on device                            0
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Non-uniform work-groups                       No
    Work-group collective functions               No
    Sub-group independent forward progress        No
    Kernel execution timeout (NV)                 Yes
  Concurrent copy and kernel execution (NV)       Yes
    Number of async copy engines                  2
    IL version                                    (n/a)
    ILs with version                              <printDeviceInfo:186: get CL_DEVICE_ILS_WITH_VERSION : error -30>
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                (n/a)
  Built-in kernels with version                   <printDeviceInfo:190: get CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION : error -30>
  Device 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_fp64 cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_device_uuid cl_khr_pci_bus_info cl_khr_external_semaphore cl_khr_external_memory cl_khr_external_semaphore_opaque_fd cl_khr_external_memory_opaque_fd
  Device Extensions with Version                  cl_khr_global_int32_base_atomics                                 0x400000 (1.0.0)
                                                  cl_khr_global_int32_extended_atomics                             0x400000 (1.0.0)
                                                  cl_khr_local_int32_base_atomics                                  0x400000 (1.0.0)
                                                  cl_khr_local_int32_extended_atomics                              0x400000 (1.0.0)
                                                  cl_khr_fp64                                                      0x400000 (1.0.0)
                                                  cl_khr_3d_image_writes                                           0x400000 (1.0.0)
                                                  cl_khr_byte_addressable_store                                    0x400000 (1.0.0)
                                                  cl_khr_icd                                                       0x400000 (1.0.0)
                                                  cl_khr_gl_sharing                                                0x400000 (1.0.0)
                                                  cl_nv_compiler_options                                           0x400000 (1.0.0)
                                                  cl_nv_device_attribute_query                                     0x400000 (1.0.0)
                                                  cl_nv_pragma_unroll                                              0x400000 (1.0.0)
                                                  cl_nv_copy_opts                                                  0x400000 (1.0.0)
                                                  cl_nv_create_buffer                                              0x400000 (1.0.0)
                                                  cl_khr_int64_base_atomics                                        0x400000 (1.0.0)
                                                  cl_khr_int64_extended_atomics                                    0x400000 (1.0.0)
                                                  cl_khr_device_uuid                                               0x400000 (1.0.0)
                                                  cl_khr_pci_bus_info                                              0x400000 (1.0.0)
                                                  cl_khr_external_semaphore                                          0x9000 (0.9.0)
                                                  cl_khr_external_memory                                             0x9000 (0.9.0)
                                                  cl_khr_external_semaphore_opaque_fd                                0x9000 (0.9.0)
                                                  cl_khr_external_memory_opaque_fd                                   0x9000 (0.9.0)

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  NVIDIA CUDA
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [NV]
  clCreateContext(NULL, ...) [default]            Success [NV]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  Invalid device type for platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.14
  ICD loader Profile                              OpenCL 3.0

and

$ darktable-cltest 
     0.0261 [dt_get_sysresource_level] switched to 3 as 'unrestricted'
     0.0261   total mem:       15339MB
     0.0261   mipmap cache:    1917MB
     0.0261   available mem:   245438MB
     0.0261   singlebuff:      15339MB
     0.0261   OpenCL tune mem: WANTED
     0.0261   OpenCL pinned:   WANTED
[opencl_init] opencl related configuration options:
[opencl_init] opencl: ON
[opencl_init] opencl_scheduling_profile: 'very fast GPU'
[opencl_init] opencl_library: 'default path'
[opencl_init] opencl_device_priority: '*/!0,*/*/*/!0,*'
[opencl_init] opencl_mandatory_timeout: 200
[opencl_init] opencl library 'libOpenCL' found on your system and loaded
[opencl_init] found 1 platform
[opencl_init] found 1 device

[dt_opencl_device_init]
   DEVICE:                   0: 'NVIDIA GeForce RTX 3060 Laptop GPU'
   PLATFORM NAME & VENDOR:   NVIDIA CUDA, NVIDIA Corporation
   CANONICAL NAME:           nvidiacudanvidiageforcertx3060laptopgpu
   DRIVER VERSION:           535.129.03
   DEVICE VERSION:           OpenCL 3.0 CUDA, SM_20 SUPPORT
   DEVICE_TYPE:              GPU
   GLOBAL MEM SIZE:          5938 MB
   MAX MEM ALLOC:            1484 MB
   MAX IMAGE SIZE:           32768 x 32768
   MAX WORK GROUP SIZE:      1024
   MAX WORK ITEM DIMENSIONS: 3
   MAX WORK ITEM SIZES:      [ 1024 1024 64 ]
   ASYNC PIXELPIPE:          NO
   PINNED MEMORY TRANSFER:   WANTED
   MEMORY TUNING:            WANTED
   FORCED HEADROOM:          400
   AVOID ATOMICS:            NO
   MICRO NAP:                250
   ROUNDUP WIDTH:            16
   ROUNDUP HEIGHT:           16
   CHECK EVENT HANDLES:      128
   TILING ADVANTAGE:         0.000
   DEFAULT DEVICE:           NO
   KERNEL BUILD DIRECTORY:   /usr/share/darktable/kernels
   KERNEL DIRECTORY:         /home/paolo/.cache/darktable/cached_v1_kernels_for_NVIDIACUDANVIDIAGeForceRTX3060LaptopGPU_53512903
   CL COMPILER OPTION:       -cl-fast-relaxed-math
   KERNEL LOADING TIME:       0.0531 sec
[opencl_init] OpenCL successfully initialized. Internal numbers and names of available devices:
[opencl_init]		0	'NVIDIA CUDA NVIDIA GeForce RTX 3060 Laptop GPU'
[opencl_init] FINALLY: opencl is AVAILABLE and ENABLED.
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		0	0	0	0	0
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		1	1	1	1	1
[opencl_synchronization_timeout] synchronization timeout set to 0
[dt_opencl_update_priorities] these are your device priorities:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		0	0	0	0	0
[dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe:
[dt_opencl_update_priorities] 		image	preview	export	thumbs	preview2
[dt_opencl_update_priorities]		1	1	1	1	1
[opencl_synchronization_timeout] synchronization timeout set to 0

I.e.: darktable sees opencl.

However, after using darktable for a while (I cannot see how long; various hours?), opencl “desappears”; darktable doesn’t see it any more, and

$ clinfo 
Number of platforms                               0

What can I do in order to understand what is happening?

Ok, so Laptop, Linux, AMD CPU (and possibly on-chip GPU), NVIDIA GPU, NVIDIA graphics drivers.

On Linux, NVIDIA driver device access is often limited to users who are a member of group “video” or “render”. For instance, here:

> ls -l /dev | egrep -i 'video|render'
crw-rw----   1 root video      29,   0 Dec 26 14:34 fb0
crw-rw----+  1 root video     195, 254 Dec 26 14:34 nvidia-modeset
crw-rw----+  1 root video     238,   0 Dec 26 14:34 nvidia-uvm
crw-rw----+  1 root video     238,   1 Dec 26 14:34 nvidia-uvm-tools
crw-rw----+  1 root video     195,   0 Dec 26 14:34 nvidia0
crw-rw----+  1 root video     195, 255 Dec 26 14:34 nvidiactl

If you haven’t already:

  • Try running as root and see if that avoids the issue.
  • Add your username to group video (or render) depending on your system there and see if that resolves the issue when running clinfo as a normal user. Be sure to completely log out and back into X before retesting.
  • When the problem is occurring, run strace clinfo >& OUT. Then scan the kernel calls with return status values at the tail end of OUT for clues as to what kernel calls are failing. My guess is it might be a failure to open one or more of these NVIDIA graphics driver device files.

More on this:

Thank you for answering!

What happens it that, while using darktable, suddenly it show an error in using opencl, and from that moment clinfo reports 0 platforms.

I am in video group.

I don’t have many of your devices:

$ ls -l /dev | egrep -i 'video|render'
crw-rw----   1 root video      29,     0 Dec 26 11:09 fb0
crw-rw----   1 root render    509,     0 Dec 26 11:09 kfd
crw-rw----+  1 root video     508,     0 Dec 26 11:09 media0
crw-rw----+  1 root video     508,     1 Dec 26 11:09 media1
crw-rw----+  1 root video      81,     0 Dec 26 11:09 video0
crw-rw----+  1 root video      81,     1 Dec 26 11:09 video1
crw-rw----+  1 root video      81,     2 Dec 26 11:09 video2
crw-rw----+  1 root video      81,     3 Dec 26 11:09 video3
  • Try running as root and see if that avoids the issue.
  • Add your username to group video (or render ) depending on your system there and see if that resolves the issue when running clinfo as a normal

No, nothing different.

When the problem is occurring, run strace clinfo >& OUT .

$ strace clinfo
execve("/usr/bin/clinfo", ["clinfo"], 0x7ffd2f5ca740 /* 59 vars */) = 0
brk(NULL)                               = 0x56403a2fa000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd119392b0) = -1 EINVAL (Argumento inválido)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f089f757000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=122667, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 122667, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f089f739000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libOpenCL.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300c\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=69288, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 71200, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f089f727000
mmap(0x7f089f72d000, 24576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f089f72d000
mmap(0x7f089f733000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0x7f089f733000
mmap(0x7f089f737000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7f089f737000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=14432, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 16424, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f089f722000
mmap(0x7f089f723000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f089f723000
mmap(0x7f089f724000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f089f724000
mmap(0x7f089f725000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f089f725000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\237\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0 \0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 48, 848) = 48
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\244;\374\204(\337f#\315I\214\234\f\256\271\32"..., 68, 896) = 68
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2216304, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 2260560, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f089f400000
mmap(0x7f089f428000, 1658880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x7f089f428000
mmap(0x7f089f5bd000, 360448, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bd000) = 0x7f089f5bd000
mmap(0x7f089f615000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x214000) = 0x7f089f615000
mmap(0x7f089f61b000, 52816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f089f61b000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f089f71f000
arch_prctl(ARCH_SET_FS, 0x7f089f71f740) = 0
set_tid_address(0x7f089f71fa10)         = 253828
set_robust_list(0x7f089f71fa20, 24)     = 0
rseq(0x7f089f7200e0, 0x20, 0, 0x53053053) = 0
mprotect(0x7f089f615000, 16384, PROT_READ) = 0
mprotect(0x7f089f725000, 4096, PROT_READ) = 0
mprotect(0x7f089f737000, 4096, PROT_READ) = 0
mprotect(0x564038fc5000, 4096, PROT_READ) = 0
mprotect(0x7f089f791000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f089f739000, 122667)          = 0
openat(AT_FDCWD, "/etc/OpenCL/vendors", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
newfstatat(3, "", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_EMPTY_PATH) = 0
getrandom("\x80\x57\xe0\x15\xaa\xe8\xb8\x14", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x56403a2fa000
brk(0x56403a31b000)                     = 0x56403a31b000
getdents64(3, 0x56403a2fa2d0 /* 3 entries */, 32768) = 80
getdents64(3, 0x56403a2fa2d0 /* 0 entries */, 32768) = 0
lseek(3, 0, SEEK_SET)                   = 0
getdents64(3, 0x56403a2fa2d0 /* 3 entries */, 32768) = 80
openat(AT_FDCWD, "/etc/OpenCL/vendors/nvidia.icd", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=22, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=22, ...}, AT_EMPTY_PATH) = 0
lseek(4, 0, SEEK_SET)                   = 0
read(4, "libnvidia-opencl.so.1\n", 22)  = 22
lseek(4, 22, SEEK_SET)                  = 22
close(4)                                = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=122667, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 122667, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f089f739000
close(4)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libnvidia-opencl.so.1", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@}\r\0\0\0\0\0"..., 832) = 832
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=24273560, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 24430112, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f089dc00000
mmap(0x7f089dcd7000, 5529600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xd7000) = 0x7f089dcd7000
mmap(0x7f089e21d000, 16691200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x61d000) = 0x7f089e21d000
mmap(0x7f089f208000, 1175552, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1607000) = 0x7f089f208000
mmap(0x7f089f327000, 153120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f089f327000
close(4)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=940560, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 942344, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f089f638000
mmap(0x7f089f646000, 507904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xe000) = 0x7f089f646000
mmap(0x7f089f6c2000, 372736, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x8a000) = 0x7f089f6c2000
mmap(0x7f089f71d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xe4000) = 0x7f089f71d000
close(4)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=21448, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 16424, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f089f633000
mmap(0x7f089f634000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x7f089f634000
mmap(0x7f089f635000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f089f635000
mmap(0x7f089f636000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f089f636000
close(4)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=14664, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 16440, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f089f62e000
mmap(0x7f089f62f000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x7f089f62f000
mmap(0x7f089f630000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f089f630000
mmap(0x7f089f631000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f089f631000
close(4)                                = 0
mprotect(0x7f089f631000, 4096, PROT_READ) = 0
mprotect(0x7f089f636000, 4096, PROT_READ) = 0
mprotect(0x7f089f71d000, 4096, PROT_READ) = 0
mprotect(0x7f089f208000, 102400, PROT_READ) = 0
sched_get_priority_max(SCHED_RR)        = 99
sched_get_priority_min(SCHED_RR)        = 1
munmap(0x7f089f739000, 122667)          = 0
getdents64(3, 0x56403a2fa2d0 /* 0 entries */, 32768) = 0
getpid()                                = 253828
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 4
read(4, "0-15\n", 1024)                 = 5
close(4)                                = 0
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 4
read(4, "0-15\n", 1024)                 = 5
close(4)                                = 0
mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f089f3df000
sched_getaffinity(253828, 8, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) = 8
munmap(0x7f089f3df000, 135168)          = 0
clock_gettime(CLOCK_MONOTONIC_RAW, {tv_sec=17429, tv_nsec=896954355}) = 0
openat(AT_FDCWD, "/proc/sys/vm/mmap_min_addr", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(4, "65536\n", 1024)                = 6
close(4)                                = 0
openat(AT_FDCWD, "/proc/cpuinfo", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(4, "processor\t: 0\nvendor_id\t: Authen"..., 1024) = 1024
read(4, "m_mbm_total cqm_mbm_local clzero"..., 1024) = 1024
close(4)                                = 0
openat(AT_FDCWD, "/proc/self/maps", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(4, "564038fa6000-564038fad000 r--p 0"..., 1024) = 1024
read(4, "             /usr/lib/x86_64-lin"..., 1024) = 1024
read(4, "  /usr/lib/x86_64-linux-gnu/libr"..., 1024) = 1024
read(4, "b/x86_64-linux-gnu/libm.so.6\n7f0"..., 1024) = 1024
read(4, "   /usr/lib/x86_64-linux-gnu/lib"..., 1024) = 1024
read(4, "ux-x86-64.so.2\n7f089f791000-7f08"..., 1024) = 580
close(4)                                = 0
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 4
read(4, "0-15\n", 1024)                 = 5
close(4)                                = 0
futex(0x7f089f32cf04, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, "/dev/shm/cuda_injection_path_shm", O_RDWR|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/home/paolo/.nv/nvidia-application-profile-globals-rc", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
gettimeofday({tv_sec=1703628977, tv_usec=378092}, NULL) = 0
openat(AT_FDCWD, "/home/paolo/.nv/nvidia-application-profiles-rc", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/home/paolo/.nv/nvidia-application-profiles-rc.d", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/etc/nvidia/nvidia-application-profiles-rc", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/etc/nvidia/nvidia-application-profiles-rc.d/", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/usr/share/nvidia/nvidia-application-profiles-535.129.03-rc", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=16566, ...}) = 0
brk(0x56403a33c000)                     = 0x56403a33c000
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=16566, ...}, AT_EMPTY_PATH) = 0
read(4, "# Application profiles for the N"..., 16384) = 16384
read(4, "SysmemToHostVisibleMemory\" },\n  "..., 4096) = 182
brk(0x56403a35d000)                     = 0x56403a35d000
close(4)                                = 0
openat(AT_FDCWD, "/usr/share/nvidia/nvidia-application-profiles-rc", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
getpid()                                = 253828
readlink("/proc/253828/exe", "/usr/bin/clinfo", 4095) = 15
openat(AT_FDCWD, "/proc/self/cmdline", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(4, "clinfo\0", 4096)               = 7
read(4, "", 3072)                       = 0
close(4)                                = 0
getpid()                                = 253828
geteuid()                               = 1000
socket(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 4
setsockopt(4, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
connect(4, {sa_family=AF_UNIX, sun_path="/tmp/nvidia-mps/control"}, 26) = -1 ENOENT (No existe el archivo o el directorio)
close(4)                                = 0
readlink("/proc", 0x7ffd11937e10, 1023) = -1 EINVAL (Argumento inválido)
readlink("/proc/self", "253828", 1023)  = 6
readlink("/proc/253828", 0x7ffd11937e10, 1023) = -1 EINVAL (Argumento inválido)
readlink("/proc/253828/exe", "/usr/bin/clinfo", 1023) = 15
readlink("/usr", 0x7ffd11937e10, 1023)  = -1 EINVAL (Argumento inválido)
readlink("/usr/bin", 0x7ffd11937e10, 1023) = -1 EINVAL (Argumento inválido)
readlink("/usr/bin/clinfo", 0x7ffd11937e10, 1023) = -1 EINVAL (Argumento inválido)
brk(0x56403a38f000)                     = 0x56403a38f000
openat(AT_FDCWD, "/proc/modules", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(4, "tls 147456 0 - Live 0x0000000000"..., 1024) = 1024
read(4, "0\nvideobuf2_vmalloc 20480 1 uvcv"..., 1024) = 1024
read(4, "snd_sof_amd_rembrandt 16384 0 - "..., 1024) = 1024
read(4, "ched 61440 1 amdgpu, Live 0x0000"..., 1024) = 1024
close(4)                                = 0
openat(AT_FDCWD, "/proc/driver/nvidia/params", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(4, "ResmanDebugLevel: 4294967295\nRmL"..., 1024) = 900
close(4)                                = 0
stat("/dev/nvidiactl", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
stat("/dev/nvidiactl", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
unlink("/dev/char/195:255")             = -1 EACCES (Permiso denegado)
symlink("../nvidiactl", "/dev/char/195:255") = -1 EEXIST (El archivo ya existe)
stat("/dev/char/195:255", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
openat(AT_FDCWD, "/dev/nvidiactl", O_RDWR) = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
openat(AT_FDCWD, "/sys/devices/system/memory/block_size_bytes", O_RDONLY) = 5
read(5, "8000000\n", 99)                = 8
close(5)                                = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0xd6, 0x8), 0x7ffd11938880) = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0xc8, 0x900), 0x7f089f331bc0) = 0
stat("/proc/driver/nvidia/gpus/0000:01:00.0/numa_status", 0x7ffd119387f0) = -1 ENOENT (No existe el archivo o el directorio)
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x2b, 0x20), 0x7ffd119389d0) = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x2a, 0x20), 0x7ffd119378d0) = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x29, 0x10), 0x7ffd119389b0) = 0
close(4)                                = 0
openat(AT_FDCWD, "/proc/modules", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(4, "tls 147456 0 - Live 0x0000000000"..., 1024) = 1024
read(4, "0\nvideobuf2_vmalloc 20480 1 uvcv"..., 1024) = 1024
read(4, "snd_sof_amd_rembrandt 16384 0 - "..., 1024) = 1024
read(4, "ched 61440 1 amdgpu, Live 0x0000"..., 1024) = 1024
close(4)                                = 0
openat(AT_FDCWD, "/proc/driver/nvidia/params", O_RDONLY) = 4
newfstatat(4, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(4, "ResmanDebugLevel: 4294967295\nRmL"..., 1024) = 900
close(4)                                = 0
stat("/dev/nvidiactl", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
stat("/dev/nvidiactl", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
unlink("/dev/char/195:255")             = -1 EACCES (Permiso denegado)
symlink("../nvidiactl", "/dev/char/195:255") = -1 EEXIST (El archivo ya existe)
stat("/dev/char/195:255", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
openat(AT_FDCWD, "/dev/nvidiactl", O_RDWR) = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
openat(AT_FDCWD, "/sys/devices/system/memory/block_size_bytes", O_RDONLY) = 5
read(5, "8000000\n", 99)                = 8
close(5)                                = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0xd6, 0x8), 0x7ffd11938e40) = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0xc8, 0x900), 0x7f089f331bc0) = 0
stat("/proc/driver/nvidia/gpus/0000:01:00.0/numa_status", 0x7ffd11938db0) = -1 ENOENT (No existe el archivo o el directorio)
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x2b, 0x20), 0x7ffd11938f90) = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x2a, 0x20), 0x7ffd11937e50) = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x2a, 0x20), 0x7ffd11937e50) = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x2b, 0x30), 0x7ffd11938f80) = 0
openat(AT_FDCWD, "/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 5
read(5, "0-15\n", 1024)                 = 5
close(5)                                = 0
openat(AT_FDCWD, "/proc/self/status", O_RDONLY) = 5
newfstatat(5, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(5, "Name:\tclinfo\nUmask:\t0002\nState:\t"..., 1024) = 1024
read(5, "ndirectBranch:\tconditional enabl"..., 1024) = 460
close(5)                                = 0
openat(AT_FDCWD, "/sys/devices/system/node", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5
newfstatat(5, "", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_EMPTY_PATH) = 0
getdents64(5, 0x56403a317a50 /* 11 entries */, 32768) = 360
openat(AT_FDCWD, "/sys/devices/system/node/node0/cpumap", O_RDONLY) = 6
newfstatat(6, "", {st_mode=S_IFREG|0444, st_size=4096, ...}, AT_EMPTY_PATH) = 0
read(6, "ffff\n", 4096)                 = 5
close(6)                                = 0
getdents64(5, 0x56403a317a50 /* 0 entries */, 32768) = 0
close(5)                                = 0
futex(0x7f089f32d9c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
get_mempolicy([MPOL_DEFAULT], [000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000, 000000000000000000], 1024, NULL, 0) = 0
openat(AT_FDCWD, "/proc/modules", O_RDONLY) = 5
newfstatat(5, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(5, "tls 147456 0 - Live 0x0000000000"..., 1024) = 1024
read(5, "0\nvideobuf2_vmalloc 20480 1 uvcv"..., 1024) = 1024
close(5)                                = 0
openat(AT_FDCWD, "/proc/devices", O_RDONLY) = 5
newfstatat(5, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(5, "Character devices:\n  1 mem\n  4 /"..., 1024) = 806
close(5)                                = 0
stat("/dev/nvidia-uvm", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0), ...}) = 0
stat("/dev/nvidia-uvm", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0), ...}) = 0
unlink("/dev/char/507:0")               = -1 EACCES (Permiso denegado)
symlink("../nvidia-uvm", "/dev/char/507:0") = -1 EEXIST (El archivo ya existe)
stat("/dev/char/507:0", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0), ...}) = 0
stat("/dev/nvidia-uvm-tools", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0x1), ...}) = 0
stat("/dev/nvidia-uvm-tools", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0x1), ...}) = 0
unlink("/dev/char/507:1")               = -1 EACCES (Permiso denegado)
symlink("../nvidia-uvm-tools", "/dev/char/507:1") = -1 EEXIST (El archivo ya existe)
stat("/dev/char/507:1", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0x1), ...}) = 0
openat(AT_FDCWD, "/dev/nvidia-uvm", O_RDWR|O_CLOEXEC) = -1 EIO (Error de entrada/salida)
openat(AT_FDCWD, "/dev/nvidia-uvm", O_RDWR) = -1 EIO (Error de entrada/salida)
ioctl(-5, _IOC(_IOC_NONE, 0, 0x2, 0x3000), 0) = -1 EBADF (Descriptor de archivo erróneo)
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x29, 0x10), 0x7ffd11938f10) = 0
ioctl(4, _IOC(_IOC_READ|_IOC_WRITE, 0x46, 0x29, 0x10), 0x7ffd11938f10) = 0
close(4)                                = 0
close(3)                                = 0
newfstatat(1, "", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x4), ...}, AT_EMPTY_PATH) = 0
write(1, "Number of platforms             "..., 52Number of platforms                               0
) = 52
exit_group(0)                           = ?
+++ exited with 0 +++

Then scan the kernel calls with return status values at the tail end of OUT for clues as to what kernel calls are failing.

This sounds obscure to me.

Is there a way to get opencl working again without rebooting? something like restarting a service

The output of strace lists kernel calls the application made, the arguments the app provided, and the return values of the kernel calls.

Scanning your output, under-the-hood, it looks like clinfo was able to detect and open some of the special NVIDIA config files in /etc/ and NVIDIA kernel device files in /dev/ and /proc/:

openat(AT_FDCWD, "/etc/OpenCL/vendors/nvidia.icd", O_RDONLY) = 4
openat(AT_FDCWD, "/usr/share/nvidia/nvidia-application-profiles-535.129.03-rc", O_RDONLY) = 4
openat(AT_FDCWD, "/proc/driver/nvidia/params", O_RDONLY) = 4
stat("/dev/nvidiactl", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
stat("/dev/nvidiactl", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
openat(AT_FDCWD, "/dev/nvidiactl", O_RDWR) = 4
openat(AT_FDCWD, "/proc/driver/nvidia/params", O_RDONLY) = 4
stat("/dev/nvidiactl", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
stat("/dev/nvidiactl", {st_mode=S_IFCHR|0666, st_rdev=makedev(0xc3, 0xff), ...}) = 0
openat(AT_FDCWD, "/dev/nvidiactl", O_RDWR) = 4
stat("/dev/nvidia-uvm", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0), ...}) = 0
stat("/dev/nvidia-uvm", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0), ...}) = 0
stat("/dev/nvidia-uvm-tools", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0x1), ...}) = 0
stat("/dev/nvidia-uvm-tools", {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1fb, 0x1), ...}) = 0

But some of the kernel calls it made in the process of probing the state of things failed:

arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd119392b0) = -1 EINVAL (Argumento inválido)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/dev/shm/cuda_injection_path_shm", O_RDWR|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/home/paolo/.nv/nvidia-application-profile-globals-rc", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/home/paolo/.nv/nvidia-application-profiles-rc", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/home/paolo/.nv/nvidia-application-profiles-rc.d", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/etc/nvidia/nvidia-application-profiles-rc", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/etc/nvidia/nvidia-application-profiles-rc.d/", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
openat(AT_FDCWD, "/usr/share/nvidia/nvidia-application-profiles-rc", O_RDONLY) = -1 ENOENT (No existe el archivo o el directorio)
connect(4, {sa_family=AF_UNIX, sun_path="/tmp/nvidia-mps/control"}, 26) = -1 ENOENT (No existe el archivo o el directorio)
readlink("/proc", 0x7ffd11937e10, 1023) = -1 EINVAL (Argumento inválido)
readlink("/proc/253828", 0x7ffd11937e10, 1023) = -1 EINVAL (Argumento inválido)
readlink("/usr", 0x7ffd11937e10, 1023)  = -1 EINVAL (Argumento inválido)
readlink("/usr/bin", 0x7ffd11937e10, 1023) = -1 EINVAL (Argumento inválido)
readlink("/usr/bin/clinfo", 0x7ffd11937e10, 1023) = -1 EINVAL (Argumento inválido)
unlink("/dev/char/195:255")             = -1 EACCES (Permiso denegado)
symlink("../nvidiactl", "/dev/char/195:255") = -1 EEXIST (El archivo ya existe)
stat("/proc/driver/nvidia/gpus/0000:01:00.0/numa_status", 0x7ffd119387f0) = -1 ENOENT (No existe el archivo o el directorio)
unlink("/dev/char/195:255")             = -1 EACCES (Permiso denegado)
symlink("../nvidiactl", "/dev/char/195:255") = -1 EEXIST (El archivo ya existe)
stat("/proc/driver/nvidia/gpus/0000:01:00.0/numa_status", 0x7ffd11938db0) = -1 ENOENT (No existe el archivo o el directorio)
unlink("/dev/char/507:0")               = -1 EACCES (Permiso denegado)
symlink("../nvidia-uvm", "/dev/char/507:0") = -1 EEXIST (El archivo ya existe)
unlink("/dev/char/507:1")               = -1 EACCES (Permiso denegado)
symlink("../nvidia-uvm-tools", "/dev/char/507:1") = -1 EEXIST (El archivo ya existe)
openat(AT_FDCWD, "/dev/nvidia-uvm", O_RDWR|O_CLOEXEC) = -1 EIO (Error de entrada/salida)
openat(AT_FDCWD, "/dev/nvidia-uvm", O_RDWR) = -1 EIO (Error de entrada/salida)
ioctl(-5, _IOC(_IOC_NONE, 0, 0x2, 0x3000), 0) = -1 EBADF (Descriptor de archivo erróneo)

Not being an NVIDIA driver expert, it’s not clear to me which of these failures are OK and which (if any) are not OK.

Anyway, from a mere user perspective, I don’t see an obvious smoking gun in this output.

You could try re-installing the NVIDIA driver and see if that resolves the intermittent OpenCL device availability issues you’re seeing.

Also, I’d verify that (especially when the problem happens) that there are no stray applications running on your system, even in the background, that are using the GPU(s) via any API: OpenCL, OpenGL, Vulkan, etc. for compute and/or 3D rendering. Maybe that’s what’s going on here (?)

That’s of course going to determine on why OpenCL appears to have “stopped” working, … which (AFAIK) we don’t know yet.

  • lsmod | grep -i nvidia will show you the NVIDIA kernel modules that are loaded at any given time.
  • modprobe nvidia will load these modules if they’re not already loaded.

That said, the NVIDIA kernel modules are probably not being forceably unloaded for some reason.

I could reproduce the bug:

It happens when I put the system in suspend mode (with pm-suspend) with darktable running.

When I resume from suspend, “Number of platforms” is 0.

Is it a nvidia bug, a darktable one, or a pm-suspend one?

TBD. You’re going to have to gather more info.

Check your system logs and look for errors. They may point to the problem.

If suspend works when DarkTable is not running, then it may be some “permission denied” error as normal users can’t perform admin/root actions. Something similar to one of these:

With DarkTable running, try one of these:

sudo systemctl suspend

sudo bash -c 'echo -n mem > /sys/power/state'

sudo just runs these as the root user, not an ordinary user. Alternatively, become root in your shell, and then run the commands without the “sudo” prefix.

It could be that there are some NVIDIA services you need to start to get this to work properly. This thread for instance:

3 systemd units (nvidia-suspend, nvidia-hibernate and nvidia-resume). I have no idea how this works, but this may give you some terms to search for in the NVIDIA driver docs.