4

Here it goes,

I have a laptop with an Nvidia GT520M card and I am running ubuntu 11.10. When I first installed ubuntu on my pc, I was able to use gnome3 and all was well (I suppose my laptop was using the intel card instead of the Nvidia one).

Because I wanted to develop some things in CUDA from my own machine, I started to look around on what I could do, so that I could use the discrete card just for CUDA and leave the other one to handle gnome. By installing nvidia's current drivers and bumblebee, I am now able to run programs in CUDA using optirun but my machine uses the simple version of gnome, without any effects whatsoever. Of course, when I removed nvidia's drivers, optirun couldn't run CUDA programs and stopped with :

[ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "nouveau" (module does not exist, 0)

Is there something I can do so that I can have both worlds?

Kostis
  • 175

3 Answers3

1

Getting both cards to work is highly problematic as stated in this question with 4000 views. One of the answers to that question references this one which has a bounty attached and over 26000 views.

So I do believe your question is mostly answered as "No, there is no documented way for this to work well at this point." in the previous questions.

RobotHumans
  • 29,530
  • Thanks aking. I did read both posts before writing my question here but I hoped for something new on this. – Kostis Mar 30 '12 at 21:17
  • I wish it were another way. It's a creative way to get around needing a desktop. It just isn't any other way. – RobotHumans Mar 31 '12 at 00:07
  • I think I did it! Ubuntu 12.04, downloaded the cuda toolkit for the previous version and the SDK, along with bumblebee and now it seems that everything is working. – Kostis May 19 '12 at 23:45
  • 1
    Neat. I suspect with the bumblebee solution that you're switching from one to the other in order to get CUDA working, but if you have something to add, I would definitely suggest posting your how-to here and on the other questions. – RobotHumans May 20 '12 at 00:02
0

OK. So, just to make it plain for everyone who might be interested. My system is an optimus laptop with an NVidia 520M card. What I wanted to do was to have both a moderate hardware acceleration for gnome and to be able to run CUDA.

Here's what I did.

  1. After a fresh install of ubuntu 12.04, I downloaded from here the 32bit version of the toolkit and the SDK but not the drivers (last time that I tried to do something with them, I got either a corrupted X or a not so functional desktop).

  2. Then I installed bumblebee, so that I could run my programs on the discrete card.

  3. Installed the toolkit.

  4. Included the two lines to .bashrc

    export PATH=$PATH:/usr/local/cuda/bin
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib
    
  5. Run sudo ldconfig

  6. And last but not least, logout and login.

Now you should be able to compile your programs with nvcc and run them via optirun.

Hope that helps. As you can see, it's actually pretty straightforward. I don't know why I didn't do it this way when I had an 11.10 system though.

Kostis
  • 175
0

By default it will probably be using both the CPU and Nvidia, in 13.10 and older.

However, as you can see here, better support for second video card (Optimus) is coming in 14.04.

Rather than tweak the current setup it may be better to try the beta/RC in a month or two.

NoBugs
  • 1,400