My system contains 2 Nvidia cards. What i'm trying to achieve is one card driven by nouveau driver while the other by the official nvidia blob driver.

Both drivers successfully cohabit if the nvidia one is launched automatically on boot, using a specific nvidia driver option "nvidia_340.NVreg_AssignGpus=0:02:00." that make the driver to probe only a specific device, and the nouveau driver is launched manually with modprobe, probing the other unused device.

I would like to automate things by making both modules to load on boot but i have not managed to tell nouveau driver to probe only one of the two graphic cards. Loading order of modules seems nondeterministic and when nouveau module is loaded before nvidia module it probes both and prevents the official nvidia to access to the other.

I know i could do a systemd service task to execute modprobe nouveau during boot phase (that is executed well after the load of nvidia module) but i guess there is a better way to do that. I think of udev but as i don't know it much i'm not sure it is the way to go.

What is the proper way to handle this ?

1 Answer 1


So, the path to the solution was not easy, but the solution in itself is surprisingly straightfoward:

The idea is to use the install directive in a /etc/modprobe.d/ configuration file that redefine the way the nvidia driver is run through modprobe. I set the following inside a file /etc/modprobe.d/nvidia-with-nouveau.conf:

install nvidia_340 /sbin/modprobe --ignore-install nvidia_340; /sbin/modprobe nouveau

which instructs the kernel how to start the module nvidia (mine is version 340). Through this instruction i tell it to start nvidia first, then nouveau. --ignore-install is needed to prevent the kernel to reuse the install directive to launch the nvidia module that could result in some kind of infinite loop i presume.

install and others available directives in /etc/modprobe.d configuration files is well explained in man modprode.d.

It is important to stay the nouveau driver blacklisted to prevent it to be started by its own. On Ubuntu, Nvidia drivers, when installed through deb packages from official Ubuntu repositories, blacklist the nouveau module by installing the file /etc/modprobe.d/nvidia-340_hybrid.conf (it applies for me , it can be different on other OS and driver version).

This file contains the following:

blacklist nouveau
blacklist lbm-nouveau
alias nouveau off
alias lbm-nouveau off

The following lines create an alias for nouveau to off and must be commented:

#alias nouveau off
#alias lbm-nouveau off

Finally, i guess, updating the initramfs is required for theses changes to be taken in account:

sudo update-initramfs -u

I can now enjoy a Multi-seat config with one seat on nouveau and the other on nvidia-driver.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .