Linux blacklist nouveau driver

Nouveau

This article covers the open-source Nouveau driver for NVIDIA graphics cards. For information about the proprietary driver, see NVIDIA.

Find your card’s code name (a more detailed list is available on Wikipedia), and compare it with the feature matrix for supported features.

Installation

Install the mesa package, which provides the DRI driver for 3D acceleration.

  • For 32-bit application support, also install the lib32-mesa package from the multilib repository.
  • For the DDX driver (which provides 2D acceleration in Xorg), install the xf86-video-nouveau package.

Note: It has been suggested that not installing the xf86-video-nouveau driver, and instead falling back on the modesetting driver for NV50 (G80) and newer hardware is beneficial. For example see a user report from 2021.

Loading

The Nouveau kernel module should load automatically on system boot. If it does not happen, then:

  • Make sure you do not have nomodeset or vga= as a kernel parameter, since Nouveau requires kernel mode-setting.
  • Also, check that you do not have Nouveau disabled using any modprobe blacklisting technique within /etc/modprobe.d/ or /usr/lib/modprobe.d/ .
  • If everything above still fails to load nouveau, check dmesg for an opcode error. Add nouveau.config=NvBios=PRAMIN to your Kernel parameters to prevent module unloading.[1]
  • Check if /etc/X11/xorg.conf or any file in /etc/X11/xorg.conf.d/ exists and is referencing the nvidia driver. It is probably a good idea to rename the file.

Enable early KMS

This article or section is being considered for removal.

Reason: Since mkinitcpio v32, the kms hook is included by default, therefore most setups will have early loading enabled by default. (Discuss in Talk:Nouveau)

Kernel mode setting (KMS) is required by the Nouveau driver. By default, the KMS is done after the other kernel modules are loaded. You will see the text «Loading modules» and the size of the text may change, possibly with an undesirable flicker. See the Nouveau KernelModeSetting page for more details.

It is also possible to start the KMS as early as possible in the boot process, when the initramfs is loaded.

To do this, add nouveau to the MODULES array in /etc/mkinitcpio.conf (module names are separated by spaces):

If you are using a custom EDID file, you should embed it into initramfs as well:

FILES="/lib/firmware/edid/your_edid.bin"

Tips and tricks

Keep NVIDIA driver installed

If you want to keep the proprietary NVIDIA driver installed (and are not using OpenGL), but want to use the Nouveau driver, comment out nouveau blacklisting in /etc/modprobe.d/nouveau_blacklist.conf , /usr/lib/modprobe.d/nvidia.conf , or /usr/lib/modprobe.d/nvidia-dkms.conf modifying it as follows:

And tell Xorg to load nouveau instead of nvidia by creating the file /etc/X11/xorg.conf.d/20-nouveau.conf with the following content:

Section "Device" Identifier "Nvidia card" Driver "nouveau" EndSection

If you already used the NVIDIA driver, and want to test Nouveau without reboot, make sure the ‘nvidia’ module is no longer loaded:

Читайте также:  Linux source command path

Then load the ‘nouveau’ module:

And check that it loaded fine by looking at kernel messages:

Installing the latest development packages

To get the latest Nouveau improvements

Dual head

See Multihead#RandR how to setup multiple monitors by using RandR.

Setting console resolution

You can pass the resolution to nouveau with the video= kernel line option (see KMS).

Power management

The lack of proper power management in the nouveau driver is one of the most important causes of performance issues, since most cards will remain in their lower power state with lower clocks during their use. Experimental support for GPU reclocking is available for some cards (see the Nouveau PowerManagement page) and since kernel 4.5 can be controlled through a debugfs interface located at /sys/kernel/debug/dri/*/pstate .

For example, to check the available power states and the current setting for the first card in your system, run:

# cat /sys/kernel/debug/dri/0/pstate

It is also possible to manually set/force a certain power state by writing to said interface:

# echo pstate > /sys/kernel/debug/dri/0/pstate

Warning: The support for reclocking is highly experimental. Manually setting the power state may hang your system, cause corruption or overheat your card.

Fan control

If it is implemented for your card, you can configure fan control via /sys .

$ find /sys -name pwm1_enable /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/pwm1_enable $ readlink /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/driver ../../../../bus/pci/drivers/nouveau

pwm1_enable can be set to 0, 1 or 2 meaning NONE, MANUAL and AUTO fan control. If set to manual fan control, you can set pwm1 manually, for example to 40 for 40%.

You can also set it by udev rule:

$ cat /etc/udev/rules.d/50-nouveau-hwmon.rules ACTION=="add", SUBSYSTEM=="hwmon", DRIVERS=="nouveau", ATTR="2"

Optimus

You have two solutions to use Optimus on a laptop (aka hybrid graphics, when you have two GPUs on your laptop): bumblebee and PRIME

Vertical Sync

Xorg compositors are prone to show issues with Nouveau. Unlike most of them, Picom offers lots of options to tweak for a smoother and tearing free result. A configuration which is expected to deliver a good result would be the following:

$ picom -b --unredir-if-possible --backend xr_glx_hybrid --vsync --use-damage --glx-no-stencil

Tip: Do not forget to turn off compositing of your DE’s window manager like KWin when using a different compositor.

Troubleshooting

Add drm.debug=14 and log_buf_len=16M to your kernel parameters to turn on video debugging:

$ startx -- -logverbose 9 -verbose 9

View loaded video module parameters and values:

Disable MSI

If you are still having problems loading the module or starting the X server, append nouveau.config=NvMSI=0 to your Kernel parameters.

Phantom output issue

It is possible for the nouveau driver to detect «phantom» outputs. For example, both VGA-1 and LVDS-1 are shown as connected but only LVDS-1 is present.

This causes display problems and/or prevent suspending on lid closure.

Kernel parameters

The problem can be overcome by disabling the phantom output (VGA-1 in the examples given) with Kernel parameters:

Читайте также:  Топ популярных линукс дистрибутивов

The nouveau kernel module also has an option to disable TV-out detection [2]:

Xorg configuration

The phantom output can be disabled in Xorg by adding the following to /etc/X11/xorg.conf.d/20-nouveau.conf :

Section "Monitor" Identifier "VGA-1" Option "Ignore" "1" EndSection

Xrandr

This can be added to the xinit configuration.

Random lockups with kernel error messages

Specific Nvidia chips with Nouveau may give random system lockups and more commonly throw many kernel messages, seen with dmesg. Try adding the nouveau.noaccel=1 kernel parameter. See Fedora:Common kernel problems#Systems with nVidia adapters using the nouveau driver lock up randomly for more information.

As an alternative, you can also use the QT_XCB_FORCE_SOFTWARE_OPENGL=1 environment variable to disable OpenGL acceleration in Qt applications.

Flat Panel Table Invalid

NVIDIA graphics cards with recent chipsets can cause startup issues — this includes X11 being unable to start and lspci freezing indefinitely[3][4][5][6][7].

This can break live distributions/installation media. This can be detected either by running lspci, or checking the systemd journal for the error:

nouveau E[ DRM]Pointer to flat panel table invalid

The system may start if the Nouveau driver is disabled by passing the following kernel parameters:

The Nouveau driver can then be loaded using

The system should then function correctly. If you have another Nvidia graphics card, or just want to be safe, you can disable the offending card using:

$ echo 1 > /sys/bus/pci/devices/[card device id]/remove

Источник

Отключение модуля nouveau

thumb

Бывает появляется необходимость отключить модуль nouveau , например если необходимо использовать универсальный модуль vesafb или перед установкой проприетарного видео-драйвера NVIDIA.

«nouveau ([nuvo]) — проект по созданию свободных драйверов видеокарт компании nVIDIA с поддержкой ускорения вывода трёхмерной графики. Изначально основан на распространяемом по свободной лицензии, но нечитаемом драйвере «nv» 2D-графики от nVIDIA.»

Если установщик nvidia-installer обнаружит активный драйвер Nouveau, он предложит создать файл настроек modprobe для отключения Nouveau. После чего потребуется перезагрузить компьютер и снова запустить nvidia-installer . Но мы пойдём инным путём и создадим такой файл настроек modprobe вручную.

Можно отредактировать уже имеющийся файл /etc/modprobe.d/blacklist.conf но тогда при обновление системы файл может быть обновлён и изменения будут потеряны.

Поэтому вместо редактирования уже имеющегося файла создадим новый файл, например /etc/modprobe.d/disable-nouveau.conf и впишем в него две строки.

Вне зависимости от того, создаете ли вы новый файл или редактируете имеющийся, в него должны быть добавлены следующие строки:

blacklist nouveau options nouveau modeset=0 

Первая строка запрещает модулю Nouveau уровня ядра автоматически загружаться при загрузке операционной системы. Она не предотвратит загрузку модуля по требованию, как и загрузку модуля сервером Х-интерфейса. Вторая строка запретит драйверу Nouveau осуществлять операции смены видеорежима через ядро.

Просто копируйте команды ниже, вставьте их в терминале (для тех кто вдруг ещё не знает, это тот который открывается после одновременного нажатия CTRL+ALT+T) и нажмите ENTER, а когда попросит ввести пароль сделайте это.

sudo echo “blacklist nouveau” &;gt; /etc/modprobe.d/disable-nouveau.conf sudo echo “options nouveau modeset=0” &;gt;&;gt; /etc/modprobe.d/disable-nouveau.conf reboot 

Если эта статья помогла вам, пожалуйста, оставьте комментарий

Читайте также:  Линукс нет драйверов сетевого принтера

Buy me a coffee!

Если этот пост помог вам, и вы хотели бы показать свою поддержку, подумайте о том, чтобы заправить будущие посты, купив мне чашку кофе!

Артур Гарегинян

Arthur is a designer and full stack software engineer. He is the founder of Space X-Chimp and the blog My Cyber Universe. His personal website can be found at arthurgareginyan.com.

Источник

How to disable Nouveau kernel driver

When installing CUDA in Ubuntu 16.04 by executing cuda_8.0.44_linux.run, I got the following error message in /var/log/nvidia-installer.log enter image description here Then I checked /etc/modprobe.d/nvidia-installer-disable-nouveau.conf and got enter image description here Any suggestion to disable Nouveau Kernel Driver? I found this 2012 discussion but didn’t work for me.

2 Answers 2

According to the NVIDIA developer zone: Create a file:

sudo nano /etc/modprobe.d/blacklist-nouveau.conf 

With the following contents:

blacklist nouveau options nouveau modeset=0 

Regenerate the kernel initramfs:

It worked, thanks! BTW, in Arch Environment, the update-initramfs -u is different. You will need to find your kernel preset in /etc/mkinitcpio.d/ (e.g. linux417.preset), and run sudo mkinitcpio -p linux417 , and reboot. All done!

FYI on Fedora, this worked for me! (1) Downloaded the NVIDIA drivers/script for my video card. Executed it. It then generated files in /usr/lib/modprobe.d/nvidia-installer-disable-nouveau.conf and /etc/modprobe.d/nvidia-installer-disable-nouveau.conf with the above contents. (2) Then, I had to run dracut —regenerate-all -f on Fedora as sudo update-initramfs -u does not work on Fedora. (3) Reboot and that’s it!

maybe it is too late ,but hope can help for others. the follow tips worked for ubuntu 16.04 and elementary os 0.4.

    remove all nvidia packages ,skip this if your system is fresh installed

sudo apt-get remove nvidia* && sudo apt autoremove 
sudo apt-get install dkms build-essential linux-headers-generic 
sudo vim /etc/modprobe.d/blacklist.conf 

Insert follow lines to the blacklist.conf:

blacklist nouveau blacklist lbm-nouveau options nouveau modeset=0 alias nouveau off alias lbm-nouveau off 

    Disable the Kernel nouveau by typing the following commands( nouveau-kms.conf may not exist,it is ok):

echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf 

Is item 4 necessary? It looks to be a repeat of «options nouveau modeset=0» that was added to /etc/modprobe.d/blacklist.conf mentioned in your item 3.

I did this, then CTRL+ALT+F1, sudo service lightdm stop,then was able to run the installer. I don’t know if it was essential to do this, but I did and I was able to run the installer successfully. Thanks!

This just killed my system. After rebooting now i see an endless blackscreen, not even a darn cursor ;(

@revolutionary that’s odd, you must not have a fallback driver. do you have a spare vga monitor anywhere??

well, you can’t undo your changes and rerun sudo update-initramfs -u to re-enable nouveau. I did just that like an idiot and had to reinstall xubuntu because I screwed everything up to where any nvidia driver installation failed. best thing I can recommend for @revolutionary is to grab a vga monitor (lcd, crt, doesn’t matter). that should at least run off the fallback mode and help get you somewhere.

Источник

Оцените статью
Adblock
detector