CUDA optimus on Asus UX32LN

Hi!

I’ve been trying to get CUDA to work on the Asus UX32LN for the past couple of days. I have working optimus support and can use the GPU for graphics rendering but CUDA applications does not work neither through optirun nor by loading the modules and running “natively”.

The distro I am using is Linux Mint 17. I am currently using Nvidia driver 340.13 as this is in the package repositories along with Bumblebee 3.2.1 and Cuda SDK 6.5. It appears that although GPU rendering works no CUDA application finds the GPU. I have made sure the GPU is turned on (bbswitch) and appropriate modules are loaded (nvidia + nvidia-uvm), but still no luck. On my system I have to load said modules using names as “nvidia-343” and “nvidia-343-uvm” but they show up without version indictation when I use lsmod.

I am able to compile the CUDA samples so at least the static dependencies should be met, at this point I have run out of things to try and search words for Google. Any help in debugging this issue would be appreciated

In advance thanks

lspci|grep NVIDIA
03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev ff)
optirun ./deviceQuery 
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 30
-> unknown error
Result = FAIL
lsmod |grep nvidia
nvidia_uvm             45407  0 
nvidia              11108654  28 nvidia_uvm
drm                   302817  6 i915,drm_kms_helper,nvidia
dpkg -l|grep nvidia
ii  bumblebee-nvidia                            3.2.1-90~trustyppa1                                    amd64        NVIDIA Optimus support using the proprietary NVIDIA driver
rc  nvidia-304                                  304.123-0ubuntu1~xedgers14.04.1                        amd64        NVIDIA legacy binary driver - version 304.123
ii  nvidia-343                                  343.13-0ubuntu1~xedgers14.04.1                         amd64        NVIDIA binary driver - version 343.13
ii  nvidia-343-uvm                              343.13-0ubuntu1~xedgers14.04.1                         amd64        NVIDIA Unified Memory kernel module
rc  nvidia-libopencl1-331                       331.89-0ubuntu1~xedgers14.04.2                         amd64        NVIDIA OpenCL Driver and ICD Loader library
ii  nvidia-settings                             343.13-0ubuntu1~xedgers14.04.1                         amd64        Tool for configuring the NVIDIA graphics driver
dpkg -l|grep cuda
ii  libcuda1-343                                343.13-0ubuntu1~xedgers14.04.1                         amd64        NVIDIA CUDA runtime library
rc  libcudart5.5:amd64                          5.5.22-3ubuntu1                                        amd64        NVIDIA CUDA runtime library

If there is anything else that would be useful, let me know.

Well typical, now it works.

sudo ./deviceQuery 
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'librrfaker.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce 840M"
  CUDA Driver Version / Runtime Version          6.5 / 5.5
  CUDA Capability Major/Minor version number:    5.0
  Total amount of global memory:                 2048 MBytes (2147352576 bytes)
MapSMtoCores for SM 5.0 is undefined.  Default to use 192 Cores/SM
MapSMtoCores for SM 5.0 is undefined.  Default to use 192 Cores/SM
  ( 3) Multiprocessors, (192) CUDA Cores/MP:     576 CUDA Cores
  GPU Clock rate:                                1124 MHz (1.12 GHz)
  Memory Clock rate:                             900 Mhz
  Memory Bus Width:                              64-bit
  L2 Cache Size:                                 1048576 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Bus ID / PCI location ID:           3 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 5.5, NumDevs = 1, Device0 = GeForce 840M
Result = PASS

Why do I need to use sudo?

Does your user have access to the /dev/nvidia* device files?

Thank you for your reply, I’m sorry I couldn’t get back to you sooner.

There is only one device file that match on my system: “nvidia-uvm”. This has access pattern 666 and is owned by root.

That means that the /dev/nvidiactl and /dev/nvidia[0-9]* files couldn’t be created by your user, which typically means that nvidia-modprobe was not installed correctly. Since you’re using the Linux Mint packages rather than the .run installer, you’ll need to contact them to find out how to properly install it.