LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Nouveau kernel driver (https://www.linuxquestions.org/questions/ubuntu-63/nouveau-kernel-driver-825432/)

Ordinary12 08-10-2010 04:28 PM

Nouveau kernel driver
 
I can't install the nvidia driver I need until I find a way to disable the Nouveau kernel driver. Here is a copy of the log message nvidia generated when I tried to install it.

"ERROR: The Nouveau kernel driver is currently in use by your system. This
driver is incompatible with the NVIDIA driver, and must be disabled
before proceeding. Please consult the NVIDIA driver README and your
Linux distribution's documentation for details on how to correctly
disable the Nouveau kernel driver."

Does anyone know how to fix this?

samkraju 08-11-2010 12:37 AM

Here are the steps to install the NVidia Driver in Fedora 13. If you are using any other distribution then the steps may vary.


How to install NVidia driver in Fedora 13
-----------------------------------------

Fedora 13 comes with open source NOUVEAU driver for NVidia graphics card. To install the NVidia propriteray driver follow the below steps.

1) Blacklist the nouveau driver: Add below line to /etc/modprobe.d/blacklist.conf file
blacklist nouveau
2) Rebuild the initramfs image file using dracut:
* Backup the initramfs file
$ sudo mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
* Rebuild the initramfs file
$ sudo dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
3) Reboot the system to runlevel 3 (without graphics)
4) Check that nouveau driver is not loaded
$ lsmod | grep nouveau
5) Run the NVidia driver package
$ sudo ./NVIDIA-Linux-x86_64-195.36.15-pkg2.run
Above command will create xorg.conf file in /etc/X11 directory which is responsible to use NVidia driver in X.
6) Restart the system and NVidia driver will be used now.


Note 1: If nouveau driver is loaded in step 4, then follow any of the below step to prevent the loading of the driver
** Add below line to kernel parameter in grub while rebooting the system
rdblacklist=nouveau
** Rename the nouveau driver file
$ sudo mv /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/nouveau/nouveau.ko /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/nouveau/nouveau.ko.txt


Note 2: If a kernel update is installed then rerun the NVidia package again to rebuild the NVidia driver module against the new kernel.

craigevil 08-11-2010 01:50 AM

Edit /etc/default/grub change GRUB_CMDLINE_LINUX_DEFAULT= to GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"

Reboot and install nvidia

tommcd 08-11-2010 08:20 AM

Quote:

Originally Posted by Ordinary12 (Post 4062368)
I can't install the nvidia driver I need until I find a way to disable the Nouveau kernel driver. ...

Are you able to boot to the Ubuntu desktop? If you can, just install the nvidia driver from the Ubuntu repos. The nvidia driver from the Ubuntu repos should always be your first choice.
This will blacklist the nouveau driver for you. The nvidia driver from the Ubuntu repos will also automatically be reinstalled whenever there is a kernel update for Ubuntu.
See this on using Ubuntu's hardware manager to install restricted drivers:
https://help.ubuntu.com/community/Bi...erHowto/Nvidia
If you have a nvidia gforce 6 or newer card, just install nvidia-current from the Ubuntu repos:
http://packages.ubuntu.com/lucid/nvidia-current
This is the nvidia 195.36.15 driver. This is what I did for my nvidia 8600GT card in Ubuntu 10.04:
Code:

sudo apt-get install nvidia-current nvidia-settings
sudo nvidia-xconfig
sudo reboot

It works perfectly.
Write back if you need more help.

Ordinary12 08-11-2010 09:48 AM

Okay....I tried everything you guys suggested and none of it worked. I did find out how to remove the Nouveau Kernel driver from here:
https://help.ubuntu.com/community/Bi...erHowto/Nvidia

It gave me a list of steps to install the current version of the nvidia driver and everything worked until I got to the "sudo nvidia-xconfig" command. At that point I kept getting "sudo: nvidia-xconfig: command not found"

I researched this issue further and found a lot of people who are having the same problem but no one has been able to solve it yet. I can install the driver that Ubuntu 10.04 offers through the restricted drivers program and it installs without any problems but when I reboot it always says that it can't find the settings it needs. When I run the "sudo nvidia-xconfig" command it tells me that it encountered an error but it has written the new setting to its directory. The only problem with that is when it reboots I keep getting the same error. Its like it can't find the directory that it save the settings in. Anyone know what's going on?

tredegar 08-11-2010 10:07 AM

Quote:

At that point I kept getting "sudo: nvidia-xconfig: command not found"
Try giving the /full/path/to/nvidia-xconfig (though I did not have to use it).

Note that I could not get the NVIDIA driver working until I had blacklisted the nouveau driver:

In the file /etc/modprobe.d/blacklist.conf add these two lines:
Code:

# Blacklist nouveau so NVIDIA will work
blacklist nouveau

Then reboot.

I wrote a little script to reinstall the driver when the kernel is updated:

Code:

#!/bin/bash
# Re-install the NVIDIA driver
echo Stopping gdm
service gdm stop
echo Starting NVIDIA installer
sleep 2
/root/NVIDIA-Linux-whatever
service gdm start
exit

That's all there is to it.

tommcd 08-11-2010 12:26 PM

Quote:

Originally Posted by Ordinary12 (Post 4063033)
Okay....I tried everything you guys suggested and none of it worked. I did find out how to remove the Nouveau Kernel driver from here:
https://help.ubuntu.com/community/Bi...erHowto/Nvidia
It gave me a list of steps to install the current version of the nvidia driver and everything worked until I got to the "sudo nvidia-xconfig" command.

Can you post exactly what you did to install the nvidia driver. Also post the
/var/log/nvidia-installer.log if you can.
Also post the output of:
Code:

aptitude search nvidia
This will tell us what nvidia packages from the Ubuntu repo you have installed.
Also, what does it say about the nvidia driver when you go to: system > administration > hardware drivers?

If you had previously installed the nvidia driver from the nvidia website, you should remove that first before installing the nvidia driver from the Ubuntu repos.
The commands I gave in my last post about installing nvidia-current, nvidia-settings, and running nvidia-xconfig have never failed me.

EDIT: Also post your /etc/X11/xorg.conf

Ordinary12 08-11-2010 02:54 PM

kendall@Prisoner2:/etc/X11$ ls
app-defaults X Xreset Xsession.options
cursors xinit Xreset.d Xwrapper.config
default-display-manager xkb Xresources
fonts xorg.conf.backup Xsession
rgb.txt xorg.conf.failsafe Xsession.d

Ordinary12 08-11-2010 02:55 PM

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Wed Aug 11 08:51:12 2010
installer version: 256.44

option status:
license pre-accepted : false
update : false
force update : false
expert : false
uninstall : false
driver info : false
precompiled interfaces : true
no ncurses color : false
query latest version : false
OpenGL header files : true
no questions : false
silent : false
no recursion : false
no backup : false
kernel module only : false
sanity : false
add this kernel : false
no runlevel check : false
no network : false
no ABI note : false
no RPMs : false
no kernel module : false
force SELinux : default
no X server check : false
no cc version check : false
force tls : (not specified)
force compat32 tls : (not specified)
X install prefix : (not specified)
X library install path : (not specified)
X module install path : (not specified)
OpenGL install prefix : (not specified)
OpenGL install libdir : (not specified)
compat32 install chroot : (not specified)
compat32 install prefix : (not specified)
compat32 install libdir : (not specified)
utility install prefix : (not specified)
utility install libdir : (not specified)
doc install prefix : (not specified)
kernel name : (not specified)
kernel include path : (not specified)
kernel source path : (not specified)
kernel output path : (not specified)
kernel install path : (not specified)
proc mount point : /proc
ui : (not specified)
tmpdir : /tmp
ftp mirror : ftp://download.nvidia.com
RPM file list : (not specified)

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 256.44.
-> Running distribution scripts
executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed! Continue installation
anyway? (Answer: Yes)
ERROR: The Nouveau kernel driver is currently in use by your system. This
driver is incompatible with the NVIDIA driver, and must be disabled
before proceeding. Please consult the NVIDIA driver README and your
Linux distribution's documentation for details on how to correctly
disable the Nouveau kernel driver.
WARNING: The modprobe configuration file to disable Nouveau,
/etc/modprobe.d/nvidia-installer-disable-nouveau.conf, is already
present. Please be sure you have rebooted your system since that file
was written. If you have rebooted, then Nouveau may be enabled for
other reasons, such as being included in the system initial ramdisk or
in your X configuration file. Please consult the NVIDIA driver README
and your Linux distribution's documentation for details on how to
correctly disable the Nouveau kernel driver.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at www.nvidia.com.

Ordinary12 08-11-2010 02:56 PM

kendall@Prisoner2:/etc/X11$ aptitude search nvidia
p nvidia-173 - NVIDIA binary Xorg driver, kernel module and VDPAU library
p nvidia-173-dev - NVIDIA binary Xorg driver development files
p nvidia-173-kernel-source - Transitional package for nvidia-glx-173-kernel-source
i nvidia-173-modaliases - Modaliases for the NVIDIA binary X.Org driver
p nvidia-180-kernel-source - Transitional package for nvidia-glx-185-kernel-source
p nvidia-180-libvdpau - Transitional package for nvidia-185-libvdpau
p nvidia-180-libvdpau-dev - Transitional package for nvidia-185-libvdpau-dev
p nvidia-180-modaliases - Transitional package for nvidia-185-modaliases
p nvidia-185-kernel-source - Transitional package for nvidia-glx-185-kernel-source
p nvidia-185-libvdpau - Transitional package for nvidia-185-libvdpau
p nvidia-185-libvdpau-dev - Transitional package for nvidia-185-libvdpau-dev
p nvidia-185-modaliases - Transitional package for nvidia-185-modaliases
p nvidia-96 - NVIDIA binary Xorg driver, kernel module and VDPAU library
p nvidia-96-dev - NVIDIA binary Xorg driver development files
p nvidia-96-kernel-source - Transitional package for nvidia-glx-96-kernel-source
i nvidia-96-modaliases - Modaliases for the NVIDIA binary X.Org driver
p nvidia-cg-toolkit - NVIDIA Cg Toolkit Installer
i nvidia-common - Find obsolete NVIDIA drivers
i nvidia-current - NVIDIA binary Xorg driver, kernel module and VDPAU library
p nvidia-current-dev - NVIDIA binary Xorg driver development files
i nvidia-current-modaliases - Modaliases for the NVIDIA binary X.Org driver
p nvidia-glx-173 - Transitional package for nvidia-glx-173
p nvidia-glx-173-dev - Transitional package for nvidia-glx-173-dev
p nvidia-glx-180 - Transitional package for nvidia-glx-185
p nvidia-glx-180-dev - Transitional package for nvidia-glx-185-dev
p nvidia-glx-185 - Transitional package for nvidia-glx-185
p nvidia-glx-185-dev - Transitional package for nvidia-glx-185-dev
p nvidia-glx-96 - Transitional package for nvidia-glx-96
p nvidia-glx-96-dev - Transitional package for nvidia-glx-96-dev
p nvidia-kernel-common - NVIDIA binary kernel module common files
i A nvidia-settings - Tool of configuring the NVIDIA graphics driver

Ordinary12 08-11-2010 02:59 PM

I followed your directions first, Tom.

sudo apt-get install nvidia-current nvidia-settings
sudo nvidia-xconfig
sudo reboot

When I got to the nvidia-xconfig command I recieved the message that the command wasn't found. At that point I found the other web page that Ubuntu posted for people trying to do the same thing I am and it also did not work.

craigevil 08-11-2010 03:31 PM

BinaryDriverHowto - Community Ubuntu Documentation : https://help.ubuntu.com/community/BinaryDriverHowto

tredegar 08-11-2010 03:59 PM

@Ordinary12,
You emailed me, thank you, but discussions are better kept on this forum so everybody can learn, and see what works, or doesn't.

There are two ways to install the NVIDIA driver to your (ubuntu 10.04) distro:

1] The Ubuntu clicky-clicky way (Did not work for me)
2] The manual command line way (Did work for me :) )

I appreciate that lots of different people here on LQ are offering you seemingly inconsistent advice, but you need to understand that while we are all just trying to help you, with linux there are always multiple ways to achieve the result you'd like.

They are all different, and one (or more) of them will certainly work for you.

Regarding your post (above) it does not help us help you if you just say "It did not work".

Unlike win, linux usually has something sensible to say about errors, and if you told us exactly what the errors were, it might be easier for us to help you to find out just where you went wrong, and set you on the right path.

PTrenholme 08-11-2010 04:02 PM

Strange. :scratch: I followed the steps suggested by Tom, and everything worked flawlessly. Although I did just use the nvidia-settings command. Of course, I hadn't tried to run the nVidia installer (even on my Fedora installation) since I'm lazy enough that I prefer to use canned solutions when they're available.

Perhaps you should remove all traces of nvidia on your system (as suggested above), reboot with the nouveau driver, and then follow Tom's suggested method. (A locate nvidia should list every file on your system with "nvidia" in its name.)

tommcd 08-11-2010 04:51 PM

Quote:

Originally Posted by Ordinary12 (Post 4063342)
I followed your directions first, Tom.
sudo apt-get install nvidia-current nvidia-settings
sudo nvidia-xconfig
sudo reboot

The end if your nvidia-installer log indicates that the install failed for some reason:
Quote:

ERROR: The Nouveau kernel driver is currently in use by your system. This
driver is incompatible with the NVIDIA driver, and must be disabled
before proceeding. ...
If you had previously installed the driver from nvidia.com, remove that first.
Then try booting to recovery mode. This can be entered from the grub2 menu on boot up. If you do not see the grub2 menu on boot up, hold down the SHIFT key and you will see the grub2 menu. Then select recovery mode.
In recovery mode X, and hence the nouveau driver, will not be running.
Then run:
Code:

sudo apt-get install --reinstall nvidia-current nvidia-settings
sudo nvidia-xconfig

Then edit etc/modprobe.d/blacklist.conf and at the end of the file add:
Quote:

blacklist nouveau
to the end of the file.
You can use a simple text editor like nano to edit the file from recovery mode:
Code:

sudo nano -w /etc/modprobe.d/blacklist.conf
Scroll to the end of the file and add
Quote:

blacklist nouveau
to the end of the file.
Then hit Ctrl + X, then hit Y when prompted to save the file.
Then just:
Code:

sudo reboot
Note: You may not need to use sudo in recovery mode. It has been a long time since I needed to boot to recovery mode so I am not sure about this. Try those commands without sudo first.

EDIT: See my post on the next page of this thread first!


All times are GMT -5. The time now is 02:35 PM.