I have a MSI GT60 Laptop with an Optimus enabled GTX 670M GPU, and I have been trying to get CUDA going in Ubuntu 12.04 environment. I realize that Optimus is not supported in Linux, but I have read the following post suggesting that CUDA works for hybrid GPUs.
I installed the NVIDIA driver via
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates sudo apt-get update sudo apt-get install nvidia-currentThe resulting driver version is 302.17, and supposedly GTX 670M is supported since 295.59. I also downloaded CUDA 4.2 from the NVIDIA site, and compiled it against nvidia-current libraries.
Unfortunately, when I run deviceQuery in the CUDA SDK, I get the following output
cudaGetDeviceCount returned 38 -> no CUDA-capable device is detectedChecking /proc/driver/nvidia/gpus/0/information gives the following
Model: GeForce GTX 670M IRQ: 16 GPU UUID: GPU-????????-????-????-????-???????????? Video BIOS: ??.??.??.??.?? Bus Type: PCI-E DMA Size: 32 bits DMA Mask: 0xffffffffff Bus Location: 0000:01.00.0Here is the output of "lspci | grep VGA"
00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation Device 1213 (rev ff)So... what am I doing wrong?
Thanks!
2 Answers
OK I had the same problem. The following worked for me:
installing the NVIDIA developer drivers (295.41) without it overwriting the opengl files:
sudo stop lightdm sudo ./devdriver_4.2_linx_64_295.41.run --no-opengl-filesIt's important not to tick the option to change the
xorg.conffileinstall the CUDA toolkit (4.2. for me since I need OpenCL) and the code samples as per usual
if you run
deviceQueryas a super user it should work:sudo ./deviceQuery
It's all written in the doc file for the device drivers, in /usr/share/doc/NVIDIA_GLX-1.0/ (chapter 19).
I have exactly the same problem as you and although I don't know whether it will work for you, there is one solution. You can install the Bumblebee or Ironhide drivers to enable Optimus for Linux. Optimus uses your laptop to switch between the 2 video cards and so improve the performance of the battery.
1