When I run ./deviceQuery I get this result (the output without sudo is the same):
$ sudo optirun ./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
FATAL: Module nvidia_uvm not found.
cudaGetDeviceCount returned 30
-> unknown error
Result = FAIL
when I try ./clock I get thits:
$ sudo optirun ./clock
CUDA Clock sample
FATAL: Module nvidia_uvm not found.
CUDA error at ../../common/inc/helper_cuda.h:905 code=30(cudaErrorUnknown) "cudaGetDeviceCount(&device_count)"
sudo modprobe -v nvidia-uvm said wrong format(not remember, but the more info in dmesg)
dmesg found:
$ dmesg
[ 638.438514] nvidia_uvm: Unknown symbol task_stack_page (err 0)
search:
this page said that
Seems to be upstream problem. Adding #include <linux/sched/task_stack.h> on top of ./kernel/nvidia-uvm/uvm8_va_block.c should fix the issue.
so I tried, then make -j4 module and cp nvidia-uvm.ko to /lib/moduls/4.14XXX/kernel/driver/video/
depmod -a
than
sudo modprobe -v nvidia-uvm
success