Как удалить nouveau driver fedora
In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
Table of Contents
Install NVIDIA Graphics Driver via apt-get
In Ubuntu systems, drivers for NVIDIA Graphics Cards are already provided in the official repository. Installation is as simple as one command.
For ubuntu 14.04.5 LTS, the latest version is 352. To install the driver, excute sudo apt-get nvidia-352 nvidia-modprobe , and then reboot the machine.
For ubuntu 16.04.3 LTS, the latest version is 375. To install the driver, excute sudo apt-get nvidia-375 nvidia-modprobe , and then reboot the machine.
The nvidia-modprobe utility is used to load NVIDIA kernel modules and create NVIDIA character device files automatically everytime your machine boots up.
It is recommended for new users to install the driver via this way because it is simple. However, it has some drawbacks:
- The driver included in official Ubuntu repository is usually not the latest.
- There would be some naming conflicts when other repositories (e.g. ones from CUDA) are added to the system.
- One has to reinstall the driver after Linux kernel are updated.
Install NVIDIA Graphics Driver via runfile
For advanced user who wants to get the latest version of the driver, get rid of the reinstallation issue caused bby dkms, or using Linux distributions that do not have nvidia drivers provided in the repositories, installing from runfile is recommended.
Remove Previous Installations (Important)
One might have installed the driver via apt-get . So before reinstall the driver from runfile, uninstalling previous installations is required. Executing the following scripts carefully one by one.
Download the Driver
The latest NVIDIA driver for Linux OS can be fetched from NVIDIA's official website. The first one in the list, i.e. Latest Long Lived Branch version for Linux x86_64/AMD64/EM64T, is suitable for most case.
If you want to down load the driver directly in a Linux shell, the script below would be useful.
Detailed installation instruction can be found in the download page via a README hyperlink in the ADDITIONAL INFORMATION tab. I have also summarized key steps below.
Software required for the runfile are officially listed here. But this page seems to be stale and not easy to follow.
For Ubuntu, installing the following dependencies is enough.
- build-essential -- For building the driver
- (Optional) gcc-multilib -- For providing 32-bit support
- dkms -- For providing dkms support
- (Optional) xorg and xorg-dev . On a workstation with GUI, this is require but usually have already been installed, because you have already got the graphic display. On headless servers without GUI, this is not a must.
As a summary, excuting sudo apt-get install build-essential gcc-multilib dkms to install all dependencies.
Required packages for CentOS are epel-release dkms libstdc++.i686 . Execute yum install epel-release dkms libstdc++.i686 .
Required packages for Fedora are dkms libstdc++.i686 kernel-devel . Execute dnf install dkms libstdc++.i686 kernel-devel .
Creat Blacklist for Nouveau Driver
Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
Note: It is also possible for the NVIDIA installation runfile to creat this blacklist file automatically. Excute the runfile and follow instructions when an error realted Nouveau appears.
- for Ubuntu 14.04 LTS, reboot the computer;
- for Ubuntu 16.04 LTS, excute sudo update-initramfs -u and reboot the computer;
- for CentOS/Fedora, excute sudo dracut --force and reboot the computer.
After the computer is rebooted. We need to stop the desktop manager before excuting the runfile to install the driver. lightdm is the default desktop manager in Ubuntu. If GNOME or KDE desktop environment is used, installed desktop manager will then be gdm or kdm .
- For Ubuntu 14.04 / 16.04, excuting sudo service lightdm stop (or use gdm or kdm instead of lightdm )
- For Ubuntu 16.04 / Fedora / CentOS, excuting sudo systemctl stop lightdm (or use gdm or kdm instead of lightdm )
Excuting the Runfile
After above batch of preparition, we can eventually start excuting the runfile. So this is why I, from the very begining, recommend new users to install the driver via apt-get .
Check the Installation
After a succesful installation, nvidia-smi command will report all your CUDA-capable devices in the system.
Common Errors and Solutions
- ERROR: Unable to load the 'nvidia-drm' kernel module.
- One probable reason is that the system is boot from UEFI but Secure Boot option is turned on in the BIOS setting. Turn it off and the problem will be solved.
nvidia-smi -pm 1 can enable the persistent mode, which will save some time from loading the driver. It will have significant effect on machines with more than 4 GPUs.
nvidia-smi -e 0 can disable ECC on TESLA products, which will provide about 1/15 more video memory. Reboot is reqired for taking effect. nvidia-smi -e 1 can be used to enable ECC again.
nvidia-smi -pl can be used for increasing or decrasing the TDP limit of the GPU. Increasing will encourage higher GPU Boost frequency, but is somehow DANGEROUS and HARMFUL to the GPU. Decreasing will help to same some power, which is useful for machines that does not have enough power supply and will shutdown unintendedly when pull all GPU to their maximum load.
-i can be added after above commands to specify individual GPU.
These commands can be added to /etc/rc.local for excuting at system boot.
Installing CUDA from runfile is much simpler and smoother than installing the NVIDIA driver. It just involves copying files to system directories and has nothing to do with the system kernel or online compilation. Removing CUDA is simply removing the installation directory. So I personally does not recommend adding NVIDIA's repositories and install CUDA via apt-get or other package managers as it will not reduce the complexity of installation or uninstallation but increase the risk of messing up the configurations for repositories.
The CUDA runfile installer can be downloaded from NVIDIA's websie. But what you download is a package the following three components:
- an NVIDIA driver installer, but usually of stale version;
- the actual CUDA installer;
- the CUDA samples installer;
To extract above three components, one can execute the runfile installer with --extract option. Then, executing the second one will finish the CUDA installation. Installation of the samples are also recommended because useful tool such as deviceQuery and p2pBandwidthLatencyTest are provided.
Scripts for installing CUDA Toolkit are summarized below.
After the installation finishes, configure runtime library.
It is also recommended for Ubuntu users to append string /usr/local/cuda/bin to system file /etc/environments so that nvcc will be included in $PATH . This will take effect after reboot.
The recommended way for installing cuDNN is to first copy the tgz file to /usr/local and then extract it, and then remove the tgz file if necessary. This method will preserve symbolic links. At last, execute sudo ldconfig to update the shared library cache.
Бывает появляется необходимость отключить модуль 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 и впишем в него две строки.
Вне зависимости от того, создаете ли вы новый файл или редактируете имеющийся, в него должны быть добавлены следующие строки:
Первая строка запрещает модулю Nouveau уровня ядра автоматически загружаться при загрузке операционной системы. Она не предотвратит загрузку модуля по требованию, как и загрузку модуля сервером Х-интерфейса. Вторая строка запретит драйверу Nouveau осуществлять операции смены видеорежима через ядро.
Просто копируйте команды ниже, вставьте их в терминале (для тех кто вдруг ещё не знает, это тот который открывается после одновременного нажатия CTRL+ALT+T) и нажмите ENTER, а когда попросит ввести пароль сделайте это.
Если эта статья помогла вам, пожалуйста, оставьте комментарий
Спасибо за прочтение!
5. Fedora 36/35/34/33/32 Uninstall NVIDIA drivers and Enable Nouveau
I assume here that you have used this guide install part to install your NVIDIA drivers. This whole process is good to run on runlevel 3. When there is no X running. So first boot to runlevel 3 using direct parameter (3) on Grub linux/linuxefi line or using “systemctl set-default multi-user.target”.
Check video version of guide:
5.1 Change root user
5.2 Start NVIDIA Uninstall Process
5.3 Restore xorg.conf
You can restore xorg.conf backup or remove /etc/X11/xorg.conf if you don’t have any special configuration.
5.4 NVIDIA Uninstall Warning
You might see following warning if you have updated some packages since nvidia drivers installation. Just select “OK”.
5.5 NVIDIA Installer Uninstalling
5.6 Fedora NVIDIA Uninstall Complete
5.7 Remove blacklist nouveau
Remove ‘blacklist nouveau’ line from /etc/modprobe.d/blacklist.conf
5.8 Edit /etc/default/grub
Remove ‘rd.driver.blacklist=nouveau’ from end of ‘GRUB_CMDLINE_LINUX=”…”‘
5.9 Update grub2 conf
5.10 Install xorg-x11-drv-nouveau
5.11 Generate initramfs
5.12 Reinstall xorg, mesa and libglvnd packages
5.13 Reboot
Run systemctl set-default graphical.target first or if you used direct grub parameter, then just:
This is guide, howto install nVidia proprietary drivers on Fedora 14 and disable Nouveau driver. I write this guide about two weeks ago, but I Delayed the publication of this guide, because of pyxf86config bug, which cause following livna-config-display errors on boot:
Checking for module nvidia.ko: [ OK ]
Enabling the nvidia driver: Traceback (most recent call last):
File “/usr/sbin/nvidia-config-display”, line 28, in
import livnaConfigDisplay.ConfigDisplay
File “/usr/lib/python2.7/site-packages/livnaConfigDisplay/ConfigDisplay.py”, line 29, in
import xf86config
File “/usr/lib/python2.7/site-packages/xf86config.py”, line 1, in
import ixf86config
ImportError: /usr/lib/python2.7/site-packages/ixf86configmodule.so: undefined symbol: xstrtokenize
[FAILED]
But now, on my own testing and others testing, everything seems to work well with pyxf86config and livna-config-display when pyxf86config bug has been fixed.
This guide works with GeForce 6/7/8/9/200/300 series cards and also with GeForce FX cards.
Install nVidia proprietary drivers on Fedora 14 and disable the nouveau driver
1. Change root user
2. Make sure that you are running latest kernel
If not then update kernel and reboot
3. Add RPMFusion Repositories (Free and Non-Free)
4. Install nVidia proprietary drivers
4a. Install nVidia proprietary drivers for GeForce 6/7/8/9/200/300 series cards
Select kmod, kmod-PAE or akmod from following.
kmod-nvidia
kmod-nvidia-PAE kernel
akmod-nvidia
kmod works fine for most people, but it doesn’t work on systems with different kernel
- like a self-compiled kernel
- an older Fedora kernel
- the quickly changing kernels from updates-testing/rawhide
Full spec of kmod and akmod differences, check this.
4b. Install nVidia proprietary drivers for GeForce FX cards
Select kmod, kmod-PAE or akmod from following.
kmod-nvidia and kmod-nvidia-PAE
kmod-nvidia-PAE kernel
akmod-nvidia
kmod works fine for most people, but it doesn’t work on systems with different kernel
- like a self-compiled kernel
- an older Fedora kernel
- the quickly changing kernels from updates-testing/rawhide
Full spec of kmod and akmod differences, check this.
5. Check /etc/X11/xorg.conf file
This should not be necessary, but I recommend this, because of pyxf86config bug.
Open /etc/X11/xorg.conf file and check following rows:
32-bit
If section files is missing then it have to be added manually.
6. Check /boot/grub/grub.conf file
This should not be necessary, but missing rdblacklist=nouveau nouveau.modeset=0 is the most common reason which causes black screen / blank screen on boot with nVidia drivers. So it’s good to check followin also. ;)
Open /boot/grub/grub.conf file and check that the kernel row have following rdblacklist=nouveau nouveau.modeset=0:
7. Finally all is done and then reboot
Please let me know if you have some problems with nVidia drivers installation. You could also tell you if you got the drivers installed using this guide and what graphics card you have?
This is guide, howto install nVidia proprietary drivers on Fedora 16 and disable Nouveau driver. This guide works with GeForce 6/7/8/9/200/300 series cards.
Fedora 16 nVidia driver installation is not much different from previous Fedora versions. I have tested this guide with a couple computers, so let me know, if you have some problems.
Before nVidia drivers installation
Check is your nVidia card supported
List of Supported NVIDIA GPU Products, your card should found before 173.14.xx driver section.
NVIDIA Optimus Technology
If your lspci |grep -i VGA output looks like following:
Or you know that your computer have NVIDIA Optimus Technology, and it is impossible to turn Intel Graphics / NVDIDIA Optimus off in the BIOS then try If !1 0 user Viger excellent NVIDIA Optimus (Bumblebee) guide for Fedora 16 users.
Install nVidia proprietary drivers on Fedora 16 “Verne” and disable the nouveau driver
1. Change root user
2. Make sure that you are running latest kernel and have latest SELinux policy packages
If not then update kernel and reboot
3. Add RPMFusion Repositories (Free and Non-Free)
32-bit and 64-bit
4. Install nVidia proprietary drivers for GeForce 6/7/8/9/200/300/400/500 series cards
Select akmod, kmod or kmod-PAE from following.
akmod-nvidia
Extra package for kernel-PAE users
kmod-nvidia
kmod-nvidia-PAE and kernel-PAE-devel
akmod is good option and easy way avoid problems on kernel updates and is best and only option if you use:
- self-compiled kernel
- older Fedora kernel
- quickly changing kernels from updates-testing/rawhide
Full spec of kmod and akmod differences, check this.
5. Remove / disable nouveau drivers from kernel initramfs
6. All is done and then just reboot
Troubleshooting
rdblacklist=nouveau nouveau.modeset=0 missing
Some users have reported that the rdblacklist=nouveau nouveau.modeset=0 might be missing on grub2 “linux” row, after NVIDIA drivers installation. Add rdblacklist=nouveau nouveau.modeset=0 to /etc/default/grub file.
Then make grub2 config with grub2-mkconfig command:
Please let me know if you have some problems with nVidia drivers installation. You could also tell you if you got the drivers installed using this guide and what graphics card you have?
Читайте также: