3

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.

How can I get nVidia CUDA or OpenCL working on a laptop with nVidia discrete card/Intel Integrated Graphics?

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-current

The 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 detected

Checking /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.0

Here 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 Answers2

1

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-files
    

    It's important not to tick the option to change the xorg.conf file

  • install the CUDA toolkit (4.2. for me since I need OpenCL) and the code samples as per usual

  • if you run deviceQuery as 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).

Matthias
  • 11
  • 1
0

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.

Ivan
  • 1
  • I've read that bumblebee is not required for CUDA to work on Optimus GPUs, but tried it anyways. Installed bumblebee and bumblebee-nvidia packages, but ended up with the following error: [ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.

    [ERROR]Aborting because fallback start is disabled.

    – user1076693 Aug 01 '12 at 14:54