2

[Background]

I am running Ubuntu 12.04, my computer contains an NVIDIA Quadro K4100M and Intel HD Graphics.

[Usage Scenario]

My usage scenarios include training deep neural networks which require an NVIDIA GPU, and when not training, using the computer for development and web browsing.

[The Main Question]

I would like to leverage the Intel HD Graphics for just the desktop usage to cut down on a loud fan and high energy usage. While just reserving the GPU for DNN training. How can I achieve this?

[About Related Setups and Questions]

I have this set up in a Windows machine, and using NVIDIA's control panel, I can easily switch between the graphics modes for desktop. But I can't find anything like this on Ubuntu. I see people have mentioned things about Bios updates but it seems it means choosing one you cannot access the other no matter what.

Evan W.
  • 23
  • 3

1 Answers1

0

You can install the prime indicator and it allows you to switch manually without a password. More information can be found here. This works with the Unity desktop but you will need nvidia-331 or greater.

Open a terminal and type the following commands one at a time to install:

sudo apt-get update
sudo apt-get install gdebi nvidia-prime nvidia-331 nvidia-settings python-appindicator
wget http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/pool/main/p/prime-indicator/prime-indicator_0.1-1+git20140109~webupd8~0_all.deb
sudo gdebi prime-indicator_0.1-1+git20140109~webupd8~0_all.deb

UPDATE: NEW INSTRUCTIONS

purge nvidia-331 and the prime-indicator with this command:

sudo apt-get purge nvidia-331 prime-indicator

Reinstall your old drivers (340 cuda etc...) and reboot the system using your preferred drivers.

Now, install git if not already installed on your system with this command:

sudo apt-get install git

Then, clone into the source code and install prime-indicator from source using the following commands (also, make sure your firewall is open to git I believe it's port:9418):

git clone https://github.com/beidl/prime-indicator.git
cd prime-indicator
chmod a+x setup.sh
sudo ./setup.sh

You can select y to start the indicator automatically or if it doesn't show up right away in your Unity panel up top, run the following command to get it started (no need to reboot):

nohup prime-indicator

You may now close the terminal.

Click here for more info>

mchid
  • 43,546
  • 8
  • 97
  • 150
  • Unfortunately did not work and put my system in a bad state. Unpacking prime-indicator (from prime-indicator_0.1-1+git20140109~webupd8~0_all.deb) ... dpkg: dependency problems prevent configuration of prime-indicator: prime-indicator depends on nvidia-331 (>= 331.20); however: Package nvidia-331 is not installed. dpkg: error processing prime-indicator (--install): dependency problems - leaving unconfigured Errors were encountered while processing: prime-indicator – Evan W. Sep 30 '14 at 10:51
  • I had nvidia-340 installed, not sure why it thinks 331 was needed. So the bad state is my drivers are uninstalled now. Here's the list: Removing cuda ... Removing cuda-6-0 ... Removing cuda-6-5 ... Removing cuda-runtime-6-5 ... Removing cuda-drivers ... Removing nvidia-340-uvm ... Removing all DKMS Modules Done. Removing nvidia-340-dev ... Removing nvidia-340 ... – Evan W. Sep 30 '14 at 10:54
  • After the install failed, it didn't roll back. so now I'm left in a state without drivers. – Evan W. Sep 30 '14 at 10:54
  • after running "sudo apt-get install nvidia-prime nvidia-331 nvidia-settings python-appindicator" it seems the install worked. but when I type prime-indicator from terminal nothing happens – Evan W. Sep 30 '14 at 10:55
  • Got it - thank you. So I read the page seems it will work after logging out and back in. Fingers crossed I don't get a black screen. – Evan W. Sep 30 '14 at 11:04
  • @EvanW. you may have to run sudo gdebi prime-indicator_0.1-1+git20140109~webupd8~0_all.deb again if it didn't install last time you tried. – mchid Sep 30 '14 at 11:05
  • It worked - thanks mchid. The thing is though I really needed to use a higher nvidia driver, because the nvidia 331.* CUDA driver series has a critical performance issue. – Evan W. Oct 01 '14 at 04:12
  • @EvanW. HEY! I just tested this out with the new instructions provided above and you can install it this way regardless of if your dependencies are satisfied or not. (I just installed it on an Intel laptop with no Nvidia drivers and it works). Just make sure nvidia-settings, python-appindicator and nvidia-prime are all installed along with your preferred 340 cuda and other drivers and it should work just fine. – mchid Oct 01 '14 at 11:47