Bug#889097: nvidia-libopencl1: Missing NVidia OpenCL platform

2018-02-06 Thread Krzysztof Marczak
I have tested exactly as you described without terminating X

$ sudo modprobe -r nvidia_uvm
$lsmod | grep nvidia_uvm   # empty result
$ nvidia-modprobe -u#without sudo
$ lsmod | grep nvidia_uvm   # empty result! (not like it
was expected)

$ sudo  nvidia-modprobe -u  #this time with sudo -> modules are loaded
nvidia_uvm765952  0
nvidia  13168640  1447 nvidia_modeset,nvidia_uvm


2018-02-06 11:45 GMT+01:00 Andreas Beckmann :
> On 2018-02-05 22:35, Krzysztof Marczak wrote:
>> Module loading mechanism seem to be working properly.
>> I have tested it as you described:
>>
>> $ sudo modprobe -r nvidia
>> $ lsmod | grep nvidia   # there was no output
>> $ sudo nvidia-modprobe -u
>> $ lsmod | grep nvidia  #returned folowing:
>>
>> nvidia_uvm765952  0
>> nvidia  13168640  1 nvidia_uvm
>>
>> It loaded nvidia_uvm as it should be.
>> After that I started sddm and tested OpenCL. It worked properly (like after
>> sudo clinfo).
>> So the problem is somewhere else.
>
> There has been some progress made in #888952.
>
> Looks like a capability issue.
>
> Something new to try, no need to reboot or terminate X, we are just
> playing around with the nvidia_uvm module:
>
> $ sudo setcap cap_sys_module+ep /usr/bin/nvidia-modprobe
> $ sudo modprobe -r nvidia_uvm
> $ lsmod | grep nvidia_uvm   # expect empty
> $ nvidia-modprobe -u# NO sudo!
> $ lsmod | grep nvidia_uvm   # expect result
>
>
> Andreas



Bug#889097: nvidia-libopencl1: Missing NVidia OpenCL platform

2018-02-06 Thread Andreas Beckmann
On 2018-02-05 22:35, Krzysztof Marczak wrote:
> Module loading mechanism seem to be working properly.
> I have tested it as you described:
> 
> $ sudo modprobe -r nvidia
> $ lsmod | grep nvidia   # there was no output
> $ sudo nvidia-modprobe -u
> $ lsmod | grep nvidia  #returned folowing:
> 
> nvidia_uvm765952  0
> nvidia  13168640  1 nvidia_uvm
> 
> It loaded nvidia_uvm as it should be.
> After that I started sddm and tested OpenCL. It worked properly (like after
> sudo clinfo).
> So the problem is somewhere else.

There has been some progress made in #888952.

Looks like a capability issue.

Something new to try, no need to reboot or terminate X, we are just
playing around with the nvidia_uvm module:

$ sudo setcap cap_sys_module+ep /usr/bin/nvidia-modprobe
$ sudo modprobe -r nvidia_uvm
$ lsmod | grep nvidia_uvm   # expect empty
$ nvidia-modprobe -u# NO sudo!
$ lsmod | grep nvidia_uvm   # expect result


Andreas



Bug#889097: nvidia-libopencl1: Missing NVidia OpenCL platform

2018-02-05 Thread Krzysztof Marczak
Module loading mechanism seem to be working properly.
I have tested it as you described:

$ sudo modprobe -r nvidia
$ lsmod | grep nvidia   # there was no output
$ sudo nvidia-modprobe -u
$ lsmod | grep nvidia  #returned folowing:

nvidia_uvm765952  0
nvidia  13168640  1 nvidia_uvm

It loaded nvidia_uvm as it should be.
After that I started sddm and tested OpenCL. It worked properly (like after
sudo clinfo).
So the problem is somewhere else.


2018-02-05 6:01 GMT+01:00 Andreas Beckmann :

> Control: tag -1 moreinfo
>
> On 2018-02-02 17:19, Krzysztof Marczak wrote:
> > Thank you for quick reply.
> > You were right. It's look like it's the same problem as reported in
> #888952
> > When after reboot I don't run clinfo as a root, the NVidia OpenCL
> platform
> > is not visible. After running 'sudo clinfo' it starts to work properly.
> > It's reproducible all the time.
> I cannot reproduce the problem here. (Tried the 384.111 driver from
> stretch-backports, using both ocl-icl-libopencl1 and nvidia-libopencl1.
> Only possible difference is that I'm running a rather old non-distro
> kernel for unrelated reasons.)
>
> But it should be easy for you to test the module loading mechanism,
> assuming you don't have X running using the nvidia driver:
>
> $ sudo modprobe -r nvidia   # unload all nvidia modules
> $ lsmod | grep nvidia   # expect no output
> $ nvidia-modprobe -u# NVIDIA's setuid root helper
> $ lsmod | grep nvidia   # expect nvidia and nvidia-uvm
>
> If that doesn't work for you, the setuid helper nvidia-modprobe is not
> working properly on your system
>
> $ ls -la /usr/bin/nvidia-modprobe
>
> should print
>
> -rwsr-xr-x 1 root root ...
>^ 
>
>
> Andreas
>


Bug#889097: nvidia-libopencl1: Missing NVidia OpenCL platform

2018-02-04 Thread Andreas Beckmann
Control: tag -1 moreinfo

On 2018-02-02 17:19, Krzysztof Marczak wrote:
> Thank you for quick reply.
> You were right. It's look like it's the same problem as reported in #888952
> When after reboot I don't run clinfo as a root, the NVidia OpenCL platform
> is not visible. After running 'sudo clinfo' it starts to work properly.
> It's reproducible all the time.
I cannot reproduce the problem here. (Tried the 384.111 driver from
stretch-backports, using both ocl-icl-libopencl1 and nvidia-libopencl1.
Only possible difference is that I'm running a rather old non-distro
kernel for unrelated reasons.)

But it should be easy for you to test the module loading mechanism,
assuming you don't have X running using the nvidia driver:

$ sudo modprobe -r nvidia   # unload all nvidia modules
$ lsmod | grep nvidia   # expect no output
$ nvidia-modprobe -u# NVIDIA's setuid root helper
$ lsmod | grep nvidia   # expect nvidia and nvidia-uvm

If that doesn't work for you, the setuid helper nvidia-modprobe is not
working properly on your system

$ ls -la /usr/bin/nvidia-modprobe

should print

-rwsr-xr-x 1 root root ...
   ^ 


Andreas



Bug#889097: nvidia-libopencl1: Missing NVidia OpenCL platform

2018-02-02 Thread Krzysztof Marczak
Thank you for quick reply.
You were right. It's look like it's the same problem as reported in #888952
When after reboot I don't run clinfo as a root, the NVidia OpenCL platform
is not visible. After running 'sudo clinfo' it starts to work properly.
It's reproducible all the time.

It looks like nvidia_uvm kernel module is loaded when clinfo is used
when I run folowing commands:
$ lsmod >modules_before.txt
$ sudo clinfo
$ lsmod >modules_after.txt
$ diff modules_before.txt modules_after.txt

the output if diff is following:
1a2
> nvidia_uvm765952  0
79c80
< nvidia  13168640  1057 nvidia_modeset
---
> nvidia  13168640  1055 nvidia_modeset,nvidia_uvm


This is the output of clinfo run as a root:

X server found. dri2 connection failed!
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
Number of platforms   2
 Platform Name   Intel Gen OCL Driver
 Platform Vendor Intel
 Platform VersionOpenCL 2.0 beignet 1.3
 Platform ProfileFULL_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_byte_addressable
_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer
cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator
cl_intel_subgroups cl_intel_subgroups_short cl_khr_gl_sharing
 Platform Extensions function suffix Intel
X server found. dri2 connection failed!
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed!
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed!
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed!
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed!



DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument



Assuming 131072kB available aperture size.



May lead to reduced performance or incorrect rendering.



get chip id failed: -1 [22]



param: 4, val: 0







 Platform Name   NVIDIA CUDA



 Platform Vendor NVIDIA Corporation



 Platform VersionOpenCL 1.2 CUDA 9.0.282



 Platform ProfileFULL_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_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
 Platform Extensions function suffix NV







 Platform Name   Intel Gen OCL Driver



Number of devices 1



X server found. dri2 connection failed!



DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument



Assuming 131072kB available aperture size.



May lead to reduced performance or incorrect rendering.



get chip id failed: -1 [22]



param: 4, val: 0



X server found. dri2 connection failed!
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
 Device Name Intel(R) HD Graphics
Haswell GT2 Desktop
 Device Vendor   Intel
 Device Vendor ID0x8086
 Device Version  OpenCL 1.2 beignet 1.3
 Driver Version  1.3
 Device OpenCL C Version OpenCL C 1.2 beignet 1.3
 Device Type GPU
 Device AvailableYes
 Device Profile  FULL_PROFILE
 Max compute units   20
 Max clock frequency 1000MHz
 Device Partition(core)
   Max number of sub-devices 1
   Sup

Bug#889097: nvidia-libopencl1: Missing NVidia OpenCL platform

2018-02-01 Thread Andreas Beckmann
On 2018-02-01 22:30, Krzysztof Marczak wrote:
> After lastest update to version nvidia-graphics-drivers 384.111-3 the OpenCL
> platform in no longer available in the system. clinfo command lists only other
> platforms (e.g. Intel).
> Just before this update everything worked properly.
> 
> I have tried to unistall (purge) all opencl-icd packages and install again, 
> but
> it did not help.
> 
> In actual state there is not possible to run any software using OpenCL with
> nvidia proprietary drivers.

Looks like a duplicate of #888952
Running clinfo as root helped there - is some module not loaded?

Which package version combination was working previously?


Andreas