How to install NVIDIA drivers on system with multiple nvidia GPUs and displays on Centos 7

Hi.
I am a VFX artist and I want to try Linux for work. In the past I used Ubuntu and Fedora as secondary os for fun. I love tweaking things and have control over my PC, but I dont have much time to getting os to work on my worstations in work. I did not find too much performance test in VFX apps that I am using with direct comparison - same HW with same SW on Windows vs on Linux. That is why I want to try it and to release my test to other people.

I need rpm based Linux. Centos or maybe Fedora is suited for me. I dont have problem to get it working with nvidia drivers and some apps on simple PC. One GPU, one display. But I am using multiple nvidia GPUs, Threadripper, 10G LAN, multiple monitors, etc.
I dedicated two days to tests and I wasn’t able to get nvidia drivers running on my main workstations without unplugging GPUs and monitors to 1 GPU 1 display per PC.

My issues are mainly from not having enough experience with linux :wink:
My attempts:
Fedora 29 + nouveau
Two GPUs + 3 displays can be plugged on both cards

Fedora 29 + nvidia driver from RPM fusion
One GPU + 1 display = Fedora is OK.
One GPU + 3 displays = Not tested but probably will work.
Two and more GPUs + 1 or more displays = Fedora is unable to output GUI to any of plugged displays.

Centos 7 1810 + updates to this day + nouveau
Two GPUs + 3 displays = Centos is picking one display on one GPU on DVI for GUI. Other displays are showing “command line”. If mouse cross to other display it can’t go back to GUI display. Display properties can see only one display (with GUI).
Two GPUs + 1 display = Centos is outputting black screen. I tried all outputs.

Centos 7 1810 + updates to this day + elrepo nvidia driver
Two GPUs + 3 displays - one working before nvidia driver = black screen

Centos 7 1810 + updates to this day + manual nvidia driver install
Two GPUs + 3 displays = I don’t know how to properly blacklist nouveau. I found lot of guides but lot of them was for older Centos, or had some files in place at the start, or was using vim and other tools without explanation. I tried to google shortcuts for it, but I run out of time :slight_smile:

Can I ask someone for help?
I need good guide for installing nvidia driver with two and more nvidia gpus and multiple monitors ideally plugged in multiple graphic cards on Centos.
Fedora can be second choise, but there i need some help about running aps like Blackmagick design Davinci Resolve Studio. Som of them was searching for dependencies on other places, because they was ment for Centos. I tried some symlinks but I don’t see problem with Centos if I can have more then one display :smiley:

Thanks.

On Ubuntu it would be done with the following two with a reboot after. Can’t remember, but think you have to install the nvidia drivers before you blacklist nouveau.

sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

For this you’ll have to fiddle around a bit with /etc/X11/xorg.conf. Backup your original file. If you can get into GUI, you can use the nvidia screen config tool to set it all up. If you have trouble with user rights, Then take a preview of the xorg.conf it makes for you, copy it and paste it into /etc/X11/xorg.conf. Make sure you have the following snipped in your xorg.conf, without Xinerama it’s not much fun.

Section "ServerLayout"
    ...
    Option         "Xinerama" "1"
EndSection

Also, I had no luck getting it to work well with Gnome and KDE. Xfce and LXDE handles it without problems. I have attached a copy of my xorg.conf. And here’s a link to them running.

If you want to run games, disable Xinerama and reboot.

I have attached a copy of my setup with six screens.xorg.conf.txt (6.4 KB)

GRUB in CentOS is configured automatically using /etc/default/grub.
Configuration is then saved using grub owns mkconfig.

Here is the default wiki:
https://wiki.centos.org/HowTos/Grub2

Installing NVIDIA drivers have 2 popular routes:
EPEL repo+DKMS and then installing the officially packages from nvidia web.
ELRepo + kernel mod build for you

Both ways have their advantages, but I will try to expand the description shortly

Thanks for your answers guys.

I will try some new thinks from your posts, but I still dont know what exactly do to make it working with two GPUs and multiple displays.

1 Like