Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] NVidia drivers after 396.24 and OpenCL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
BruceG
n00b
n00b


Joined: 21 Jul 2003
Posts: 27
Location: Saskatoon, SK, Canada

PostPosted: Thu Aug 30, 2018 2:03 am    Post subject: [SOLVED] NVidia drivers after 396.24 and OpenCL Reply with quote

I've been using x11-drivers/nvidia-drivers for a couple of years to drive an application that makes extensive use of OpenCL (darktable). Every version up to and including 396.24-r1 works for OpenCL, but all versions 396.45 and later no longer work. The clinfo tool reports 0 platforms when it is broken, and darktable reports that opencl is not available.

I have compared the installed package before and after, and as far as I can tell all the same files are being installed (with different library version numbers, of course). I am of course rebooting as required between upgrades to load the new drivers in the kernel and X.

Is there any chance this is an issue with the Gentoo ebuild, or more likely a driver bug I should take up with NVidia?


Last edited by BruceG on Thu Aug 30, 2018 2:34 am; edited 1 time in total
Back to top
View user's profile Send private message
BruceG
n00b
n00b


Joined: 21 Jul 2003
Posts: 27
Location: Saskatoon, SK, Canada

PostPosted: Thu Aug 30, 2018 2:33 am    Post subject: [SOLVED] NVidia drivers after 396.24 and OpenCL Reply with quote

Thanks to some of the comments in this thread on NVidia devtalk, I found and fixed the problem.

It turns out that the versions 396.24.02 and later of the driver require NUMA configuration in the kernel for Cuda and OpenCL to work. I only have a single CPU system, so it was never enabled. Enabling this kernel option and rebuilding the kernel and driver fixed the problem for me.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Fri Sep 14, 2018 11:29 am    Post subject: Reply with quote

tried your solution, but it does not work for me. i have NUMA in kernel
Code:
zgrep -i numa /proc/config.gz
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
# CONFIG_NUMA_BALANCING is not set
CONFIG_NUMA=y
CONFIG_AMD_NUMA=y
CONFIG_X86_64_ACPI_NUMA=y
# CONFIG_NUMA_EMU is not set
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
CONFIG_ACPI_NUMA=y

and loaded the nvidia-modules with nvidia-modprobe, but CUDA (ffmpeg with hevc_nvenc) does not work:

Code:
[hevc_nvenc @ 0x5563461d4260] Cannot init CUDA


do i need any other devnodes than these:
Code:
crw-rw---- 1 root video 195,   0 14. Sep 13:09 /dev/nvidia0
crw-rw---- 1 root video 195, 255 14. Sep 13:09 /dev/nvidiactl
crw-rw---- 1 root video 195, 254 14. Sep 13:09 /dev/nvidia-modeset


creating the devnode nvidia-uvm with mknod does make CUDA work either.
i'll try with an older driver - but is there another solution for this?
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
BruceG
n00b
n00b


Joined: 21 Jul 2003
Posts: 27
Location: Saskatoon, SK, Canada

PostPosted: Fri Sep 14, 2018 2:07 pm    Post subject: Reply with quote

You might need the -u option to nvidia-modprobe to set up the uvm devices. These are the nodes on my (working) system:
Code:
crw-rw---- 1 root video 195,   0 Aug 29 20:28 /dev/nvidia0
crw-rw---- 1 root video 195, 255 Aug 29 20:28 /dev/nvidiactl
crw-rw---- 1 root video 195, 254 Aug 29 20:28 /dev/nvidia-modeset
crw-rw-rw- 1 root root  245,   0 Aug 29 20:28 /dev/nvidia-uvm
crw-rw-rw- 1 root root  245,   1 Aug 29 20:28 /dev/nvidia-uvm-tools
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Fri Sep 14, 2018 2:51 pm    Post subject: Reply with quote

Quote:
You might need the -u option to nvidia-modprobe

already tried that - did not work.
i just did
Code:
nvidia-modprobe -u
(after manually unloading all nvidia-modules) but the devnodes are definitely not created; i only get the following:
Code:
crw-rw---- 1 root video 195,   0 14. Sep 16:39 /dev/nvidia0
crw-rw---- 1 root video 195, 255 14. Sep 16:39 /dev/nvidiactl

(i do not have to start x before, do i? doing this over ssh)
do i have to create them manually?
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Fri Sep 14, 2018 3:12 pm    Post subject: Reply with quote

with
Code:
nvidia-modprobe -u -c 0 -m -c 1
the device-nodes are created!

Code:
crw-rw---- 1 root video 195, 254 14. Sep 17:06 /dev/nvidia-modeset
crw-rw-rw- 1 root root  248,   1 14. Sep 17:10 /dev/nvidia-uvm
crw-rw-rw- 1 root root  248,   2 14. Sep 17:10 /dev/nvidia-uvm-tools
crw-rw---- 1 root video 195,   0 14. Sep 17:02 /dev/nvidia0
crw-rw---- 1 root video 195, 255 14. Sep 17:02 /dev/nvidiactl


but ffmpeg/hevc with CUDA still does not work:
Code:
[hevc_nvenc @ 0x563218c4f260] Cannot init CUDA
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0


any advice?
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
hhfeuer
Apprentice
Apprentice


Joined: 28 Jul 2005
Posts: 185

PostPosted: Fri Sep 14, 2018 4:23 pm    Post subject: Reply with quote

You also need CONFIG_CPUSETS set in kernel (same devtalk thread).
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Sat Sep 15, 2018 12:23 pm    Post subject: [solved] Reply with quote

@hhfeuer
Quote:
You also need CONFIG_CPUSETS set in kernel

Yes! THANK YOU!
this definitely solved it - i can run ffmpeg on the GPU again.
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum