Replace nouveau by nvidia

Bouteiller < A2N > Alan
3 min readJun 12, 2023

--

Last week I had display problems on an external screen (2560 * 1440), the image was “cut” in the diagonal during certain movements and I had inputs lags. After looking at my settings, I realized that I had reinstalled EOS with “nouveau” as graphics driver.

Having a Lenovo laptop (Legion Y530–151CH) I have an NVIDIA and Intel card.

We can check this with the command lspci -k | grep -A 2 -E "(VGA|3D)" which lists the two options available to me:

00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] 
Subsystem: Lenovo CoffeeLake-H GT2 [UHD Graphics 630]
Kernel driver in use: i915
-
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
Subsystem: Lenovo GP107M [GeForce GTX 1050 Ti Mobile]
Kernel driver in use: nouveau

I see here that I actually use “nouveau” for the NVIDIA card.

By going to the settings and then to “about this system” I can see that the card used is from “intel”.

On the EOS website we can see that they offer a package from their repo that allows you to manage the installation of NVIDIA plugins in a quick and easy way. (https://discovery.endeavouros.com/nvidia/new-nvidia-driver-installer-nvidia-inst/2022/03/)

So I simply installed this package via their repo:

sudo pacman -S nvidia-inst

Then simply run nvidia-inst

The advantage is that this package takes care of regenerating everything by itself, like for example the initramfs, in our case, with dracut.

If you ever have trouble with this build, you can use the nvidia-hook package to manually rebuild.

sudo pacman -S nvidia-hook 
sudo dracut-rebuild

Here you must not forget to reboot so that everything is well loaded!

For the moment we are still using the wrong card (checkable in the settings) but the driver used is the right one:

lspci -k | grep -A 2 -E "(VGA|3D)"

01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)
Subsystem: Lenovo GP107M [GeForce GTX 1050 Ti Mobile]
Kernel driver in use: nvidia

Because my computer offers me two cards I can choose which one I want to use. For this I can use a number of packages, each with its own advantages and disadvantages. See the wiki.

For my part I chose envycontrol because it is natively supported by NVIDIA. The package is contained in the AUR.

yay -S envycontrol

I don’t have any worries about the life of my battery (the PC is not really meant to be unplugged since the battery is dead anyway) so I chose to use only the NVIDIA card.

If you want to implement this solution and optimize your battery, it is better to configure this package to automatically choose between NVIDIA and intel depending on the program used. See the wiki.

For my part, I just ran the following command:

sudo envycontrol -s nvidia

For more options, you can check the repo on GitHub: https://github.com/bayasdev/envycontrol

Then we have to reboot and here we are using the NVIDIA card.

--

--