Clinfo returns "Number of platforms 0"

Hello, (Newbie experimenting here) I’ve recently experimented with openCL Just as a confirmation, I installed “computer-vision-basic” which include clinfo. Yesterday, the afore mentioned app just worked well “Number of platforms 1…”

After updating Clear Linux, today clinfo seems to not detect anything.
Trying to search for a solution, some suggest to look for “libOpenCL.so” or “libcl.so”, the only one that “locate” found was “libOpenCL.so” on /usr/lib64. Now the trouble, apparently, seems to be linking clinfo to /usr/lib64, what should be the proper solution(s)? is there any other workaround?

P.S. I am using an Intel UHD 620
After checking with “strace -o output.log clinfo”, this was the log

execve(“/usr/bin/clinfo”, [“clinfo”], 0x7ffd5dc3e030 /* 78 vars /) = 0
brk(NULL) = 0x55871ecd3000
arch_prctl(0x3001 /
ARCH_??? */, 0x7fff94090b00) = -1 EINVAL (Invalid argument)
access(“/etc/ld.so.preload”, R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, “/var/cache/ldconfig/ld.so.cache”, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=279176, …}) = 0
mmap(NULL, 279176, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fa343043000
close(3) = 0
openat(AT_FDCWD, “/usr/lib64/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 b\0\0\0\0\0\0”…, 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=188064, …}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa343041000
mmap(NULL, 189992, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa343012000
mprotect(0x7fa343018000, 159744, PROT_NONE) = 0
mmap(0x7fa343018000, 106496, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fa343018000
mmap(0x7fa343032000, 49152, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20000) = 0x7fa343032000
mmap(0x7fa34303f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2c000) = 0x7fa34303f000
close(3) = 0
openat(AT_FDCWD, “/usr/lib64/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 \22\0\0\0\0\0\0”…, 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=18632, …}) = 0
mmap(NULL, 20624, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa34300c000
mmap(0x7fa34300d000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7fa34300d000
mmap(0x7fa34300f000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fa34300f000
mmap(0x7fa343010000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fa343010000
close(3) = 0
openat(AT_FDCWD, “/usr/lib64/haswell/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\0`\246\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\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0”, 32, 848) = 32
pread64(3, “\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\235XF\247\177\5\254\260\266\364O\322\10\357<6”…, 68, 880) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=2072920, …}) = 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
pread64(3, “\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0”, 32, 848) = 32
pread64(3, “\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\235XF\247\177\5\254\260\266\364O\322\10\357<6”…, 68, 880) = 68
mmap(NULL, 2085736, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fa342e0e000
mmap(0x7fa342e33000, 1589248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7fa342e33000
mmap(0x7fa342fb7000, 307200, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a9000) = 0x7fa342fb7000
mmap(0x7fa343002000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f3000) = 0x7fa343002000
mmap(0x7fa343008000, 13160, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fa343008000
madvise(0x7fa343008000, 13160, MADV_MERGEABLE) = 0
close(3) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa342e0b000
arch_prctl(ARCH_SET_FS, 0x7fa342e0b740) = 0
mprotect(0x7fa343002000, 12288, PROT_READ) = 0
mprotect(0x7fa343010000, 4096, PROT_READ) = 0
mprotect(0x7fa34303f000, 4096, PROT_READ) = 0
mprotect(0x55871e6c1000, 4096, PROT_READ) = 0
mprotect(0x7fa3430b6000, 4096, PROT_READ) = 0
munmap(0x7fa343043000, 279176) = 0
openat(AT_FDCWD, “/usr/share/OpenCL/vendors”, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), …}) = 0
brk(NULL) = 0x55871ecd3000
brk(0x55871ecf4000) = 0x55871ecf4000
write(1, "Number of platforms "…, 52) = 52
exit_group(0) = ?
+++ exited with 0 +++

Probably a regression due to the update.
You can file a bug report on GitHub.

Apparently, on this post someone had a similar issue.
Instead of adding my user into the video group, every time I opened a terminal and entered a line such as “sudo clinfo”, magically everything worked… but obviously, the aforementioned is the real solution!

For NVIDIA proprietary drivers, the nvidia-modprobe binary is required (which has root sticky bit enabled). Unfortunately, the NVIDIA Drivers installation guide on this site instructs the user to pass the --no-nvidia-modprobe flag. Without the nvidia-modprobe binary, this is the reason why as a non-root user the driver is unable to create the /dev/{nvidia-uvm-tools|nvidia-uvm} files.

Edit: Updated comment for swupd-client issue 1587.

2 Likes