Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Opencl support to be enabled need using "sudo" once (NVIDIA)

  1. #1

    Question Opencl support to be enabled need using "sudo" once (NVIDIA)

    Hi All,
    My laptop is Dell M4800 with Quadro k2100m.
    Here is the current driver. (I've tried G04 and G05).

    Code:
    #sudo rpmqpack| grep -iE '(opencl|ocl|nvidia)' | grep -Eiv '(geoclue|autoclean)'
    kernel-firmware-nvidia
    nvidia-computeG05
    nvidia-gfxG05-kmp-default
    nvidia-glG05
    x11-video-nvidiaG05
    
    When I restart and login my system first time. Opencl support wouldn't be enabled. As below shown.
    Code:
    #clinfo
    Number of platforms                               0
    
    But if I use "sudo clinfo", opencl support be enabled. And I don't have to use sudo again to get the opencl support.
    I think this is not a correct way to active opencl.
    Is my setting wrong?
    Or is it a bug?

    Code:
    #sudo clinfo
    Number of platforms                               1
      Platform Name                                   NVIDIA CUDA
      Platform Vendor                                 NVIDIA Corporation
      Platform Version                                OpenCL 1.2 CUDA 10.2.109
      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_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_khr_gl_event cl_
    nv_create_buffer cl_khr_int64_base_atomics cl_kernel_attribute_nv
      Platform Extensions function suffix             NV
    .......
    

  2. #2
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,430

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    Hi,

    Welcome to the forums...

    Quote Originally Posted by sohoming View Post
    But if I use "sudo clinfo", opencl support be enabled. And I don't have to use sudo again to get the opencl support.
    I think this is not a correct way to active opencl.
    Is my setting wrong?
    Or is it a bug?
    It's my understanding that clinfo is purely a utility that reports status information, it doesn't activate opencl. Maybe I'm misunderstanding your post

    Nonetheless, it works here, without using "sudo", in fact it doesn't need root privileges...

    Code:
    paul@Orion-17:~> clinfo    
    Number of platforms                               1
      Platform Name                                   NVIDIA CUDA
      Platform Vendor                                 NVIDIA Corporation
      Platform Version                                OpenCL 1.2 CUDA 10.2.109
      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_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
      Platform Extensions function suffix             NV
    
      Platform Name                                   NVIDIA CUDA
    Number of devices                                 1
      Device Name                                     GeForce GT 710
      Device Vendor                                   NVIDIA Corporation
      Device Vendor ID                                0x10de
      Device Version                                  OpenCL 1.2 CUDA
      Driver Version                                  440.44
      Device OpenCL C Version                         OpenCL C 1.2 
    
    ... snip
    Regards, Paul

    2x Tumbleweed (Snapshot: 20200314) KDE Plasma 5
    2x Leap 15.1 KDE Plasma 5

  3. #3
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,257

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    In the first instance (# clinfo) did you login to a graphical environment as root (and thus create a “root” user environment), or did you login as a user and then “su -” to root (when root's environment does not have any graphical (Nvidia) components?

    Can you not use “ > clinfo”, without the “sudo”?
    --
    slàinte mhath,
    rayH

    ~ knowing the right answer is easier than knowing the right question.

  4. #4
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,804

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    I remember seeing something similar a few years ago, IIRC it had something to do with the /dev/nvidia_uvm device ownership or permissions, so checking if there is something odd there might be useful.
    Old notes recall this bug https://bugzilla.novell.com/show_bug.cgi?id=879767 but so much water has passed since that I don't know if it might be still relevant.
    Leap 15.1 Gnome on i7 4720HQ + Geforce GTX960M
    testing Leap 15.2Beta

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,170
    Blog Entries
    15

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    Hi
    For Quadro K2100M you need the 04 or 390.132 driver if installed the hard way.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #6

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    Hi all, thanks for your reply.
    I'm a rookie of Linux, if I reply too stupid, please don't mind.


    tannington,
    I know "clinfo" is a utility, so I need to use "sudo clinfo" to active Opencl is so weird.


    OrsoBruno,
    I found this post before, but it didn't work.


    eng-int,
    I login as a user and didn't su- to root. Should I use "su-" to root before use "clinfo"?
    When I use "clinfo" without "sudo" it will show "Number of platforms 0".


    malcolmlewis,
    I use YaST to install the driver not hard way.

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,170
    Blog Entries
    15

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    Quote Originally Posted by sohoming View Post
    malcolmlewis,
    I use YaST to install the driver not hard way.
    Hi
    You need to be using G04 drivers, plus the current version of the nvidia drivers is out of date....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,804

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    Quote Originally Posted by sohoming View Post
    When I restart and login my system first time. Opencl support wouldn't be enabled. As below shown.
    Code:
    #clinfo
    Number of platforms                               0
    
    But if I use "sudo clinfo", opencl support be enabled. And I don't have to use sudo again to get the opencl support.
    If Opencl works from the second invocation, there is no driver problem apparently at the moment (although k2100m support has been dropped from G05 drivers recently, as @malcolmlewis suggests).
    I still think there is a permission problem somewhere, e.g. loading the nvidia_uvm module or creating the /dev/nvidia_uvm device; once the kernel module is loaded and the device has been setup, there are no further problems apparently.
    Does adding the current user to the "video" group have any effect?
    Can you post the result of the following commands just after login (Opencl not working) and after "sudo clinfo" has been issued? Does anything change?
    Code:
    lsmod | grep uvm
    ls -l /dev/ | grep uvm
    (Sorry, no opencl installed here at the moment, so cannot check it myself)
    Leap 15.1 Gnome on i7 4720HQ + Geforce GTX960M
    testing Leap 15.2Beta

  9. #9

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    Hi OrsoBruno,

    Here is the result
    just after login.
    Code:
    kelvin@localhost:~> lsmod | grep uvm
    
    kelvin@localhost:~> ls -1 /dev/ | grep uvm


    And here is the result after
    "sudo clinfo".
    Code:
    kelvin@localhost:~> lsmod | grep uvmnvidia_uvm           1081344  0
    nvidia              20434944  631 nvidia_uvm,nvidia_modeset
    
    kelvin@localhost:~> ls -1 /dev/ | grep uvm
    nvidia-uvm
    
    nvidia-uvm-tools


  10. #10
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,170
    Blog Entries
    15

    Default Re: Opencl support to be enabled need using "sudo" once (NVIDIA)

    Hi
    There is something funky with permissions...

    The following is all as my user;

    Code:
    lsmod |grep uvm
    
    nvidia_uvm           1081344  0
    nvidia              20463616  5 nvidia_uvm,nvidia_modeset
    
    ll /dev/ | grep uvm
    
    crw-rw-rw-   1 root     root    237,   0 Feb  4 17:37 nvidia-uvm
    crw-rw-rw-   1 root     root    237,   1 Feb  4 17:37 nvidia-uvm-tools
    
    
    clinfo |egrep -A2 "platforms|devices"
    
    Number of platforms                               1
      Platform Name                                   NVIDIA CUDA
      Platform Vendor                                 NVIDIA Corporation
    --
    Number of devices                                 1
      Device Name                                     GeForce GT 710
      Device Vendor                                   NVIDIA Corporation
    
    nvidia-smi
    
    Tue Feb  4 21:37:29 2020
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 440.59       Driver Version: 440.59       CUDA Version: 10.2     |
    |-------------------------------+----------------------+----------------------+
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •