I am using Ubuntu 16.04, since it is the OS that I found more convenient for working with convolutional neural networks (CNN). The process of installing Ubuntu was fine until I wanted to setup two graphic cards on the same system:
- NVIDIA 970 GTX
- AMD R9 380
I wanted to use my NVIDIA card only for CUDA in order to be able to use all its graphic memory and the AMD for the graphical user interface. To this end all monitors will be plugged into this card.
Problems:
- When I install the nvidia and cuda 8.0 drivers all seems OK, but when
I install the AMD driver I can not login to lightdm. - If I plug the monitors on the AMD cards it says that lightdm is
running in low graphic mode and nothing work. - Modify the xorg.conf file do not makes any difference since it is
overwritten by the gpu-manager
I could not find any tutorial explaining how to do so.
Best Answer
Before starting I recommend to install ssh in order to be able to shutdown the system remotely if something goes wrong. To do so use this command:
and to shutdown your system you have to ssh with another computer or mobile device and use this command:
Step 1
First of all you have to remove the AMD card physically, keep your NVIDIA card and install CUDA and the NVIDIA driver. You can download cuda from here: https://developer.nvidia.com/cuda-downloads
Make sure that all is working using this command:
Step 2
At this point we have to modify grub in order to start in console mode since we are messing with graphic cards.
Using your favorite editor (in my case joe) edit the default grub configuration file:
And change these lines:
to these ones:
Finally update grub using this command:
Step 3
Shutdown your system and remove the NVIDIA card and plugin the AMD card. Turn on your computer and install the latest AMD graphic drivers. In my case I installed the drivers using these commands:
Restart your computer. Now you can start lightdm (the user interface) using this command:
All should work as expected and now you can setup your displays using the system settings.
Step 4
Shutdown your system and now add your NVIDIA card and do not remove the AMD (at this points you will have two graphic cards in your system). Turn on you computer and log in using your user name but DO NOT START LIGHTDM!!
At this point the gpu-manager has automatically setup both graphic cards for the console mode and only AMD for lightdm (since we started lightdm in the previous step). If we run lightdm at this point gpu-manager will make a mess. So now we have to completely disable the gpu-manager. To this end we have to modify grub again:
and replace these lines:
by these ones:
Finally update grub using this command:
Step 5
Restart your system and if the lightdm do not start correctly (it appears a black screen) then you have to press Ctrl+F1, login in console mode and add this command to the rc.local file:
add this line before "exit 0":
restart your system and all should work fine now ...
In a console you can check that both graphics cads are in use using this command:
and nvidia-smi should work fine. showing that you are using 0 megabytes of memory: