Ubuntu – How to use Intel HD Graphics for regular desktop usage, while just using the NVIDIA GPU for DNN training

driversgraphicsintel graphicsnvidia

[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.

Best Answer

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>

Related Question