nouveau

From Gentoo-en
Jump to: navigation, search

Nouveau is a reverse engineered free/open-source driver for nVidia chips. See Nouveau Feature Matrix for further details.

Installation

Kernel

You need at least sys-kernel/gentoo-sources-2.6.34. nouveau is a staging driver, so set CONFIG_STAGING=y, Enable Direct Rendering Manager (DRM) by setting CONFIG_DRM=y Select CONFIG_DRM_NOUVEAU=m.

Linux Kernel Configuration: DRM kernel config
Device Drivers  --->
	Graphics support  --->
		<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
	[*] Staging drivers --->
		<M> Nouveau (nVidia) cards

The Direct Rendering Manager (DRM) and Kernel Modesetting drivers are a superset of the framebuffer system. You do not need to enable any framebuffer support, and in particular, DO NOT compile the rivafb (CONFIG_FB_RIVA) or nvidiafb (CONFIG_FB_NVIDIA) into the kernel. They may be compiled as modules if so desired, but they need to be blacklisted.

Linux Kernel Configuration: Just say NO to rivafb and nvidiafb
Device Drivers  --->
        Graphics support  --->
                -*- Support for framebuffer devices  --->
                     < > nVidia framebuffer support
                     < > nVidia Riva support

Build and install your kernel.

Nouveau and nvidia-drivers

If you have installed the x11-drivers/nvidia-drivers in parallel, make sure that the nvidia kernel module does not load before rebooting into your nouveau-enabled kernel.

If you still have an xorg.conf file with a Device section for the video card, change the Driver name:

File: /etc/X11/xorg.conf
Section "Device"
    Identifier     "Device0"
    Driver         "nouveau"
    VendorName     "NVIDIA Corporation"
    BoardName      "Quadro NVS 285"
EndSection

Userspace

Blacklisting other nvidia modules

There are a total of 4 different modules for nvidia cards: rivafb, nvidiafb, nvidia and nouveau. we need to blacklist everything except nouveau:

File: /etc/modprobe.d/blacklist.conf
...
blacklist nvidia
blacklist rivafb
blacklist nvidiafb
---

Adding module options

The nouveau module can take several options, but the most important is the modeset parameter. It can either be passed via modprobe.d or via the kernel command line:

File: /etc/modprobe.d/nouveau.conf
options nouveau modeset=1

Or, on the kernel command line, append nouveau.modeset=1

Portage

Add nouveau to your VIDEO_CARDS in /etc/make.conf:

File: /etc/make.conf
VIDEO_CARDS="nouveau"

Reemerge x11-base/xorg-drivers to pull in x11-drivers/xf86-video-nouveau. Reemerge media-libs/mesa to build the dri module for nouveau

emerge -DN1 x11-base/xorg-drivers media-libs/mesa

Make sure that you are using the X11 implementation of OpenGL.

eselect opengl set xorg-x11

Genkernel

Remember to rebuild the initramfs so that the module options and blacklists are copied into the initramfs.

Troubleshooting

Phantom and unpopulated output connector issues

Sometimes the nouveau driver detects outputs that aren't really there (or output that do exist but aren't populated), and this can cause all kinds of problems. Phantom outputs can be disabled on the kernel command line. To figure out which output are detected, look in /sys/class/drm, they'll be listed in the form 'cardX-PORT-NUMBER', like card0-VGA-1. The part after cardX is the value of interest

To disable the output on the kernel command line, specify "video=PORT-NUMBER:d" for each output to be disable. So, if the kernel detects 3 outputs: VGA-1, TV-1, DVI-D-1, but only VGA-1 really exists, pass video=TV-1:d video=DVI-D-1:d to the kernel command line.

In addition, disable the output in X too. For each output, create a Monitor section, with an Identifier of the same name as the output, and add the line Option "Ignore" "True" Continuing with the above example, xorg.conf would look as follows:

File: /etc/X11/xorg.conf
Section "Monitor"
        Identifier "TV-1"
        Option "Ignore" "True"
EndSection

Section "Monitor"
        Identifier "DVI-D-1"
        Option "Ignore" "True"
EndSection

Machine locks up as soon as X starts

This is caused by problem with graphics acceleration. As a workaround, disable all acceleration:

File: /etc/modprobe.d/nouveau.conf
options nouveau noaccel=1

Or pass nouveau.noaccel=1 to the kernel command line.

Framebuffer is distorted, but X does not lock up

This is caused by a problem with the framebuffer acceleration. As a workaround, disable framebuffer acceleration only.

File: /etc/modprobe.d/nouveau.conf
options nouveau nofbaccel=1

Or pass nouveau.nofbaccel=1 to the kernel command line.

Syslog spammed with "Load detected on output X"

This can be caused by phantom outputs. If it a real output, upgrade sys-power/upower to at least 0.9.9 [1] .

Framebuffer does not fill screen or is larger than screen

This can be caused by phantom outputs. Also try specifying the resolution for the desired output explicitly. For example VGA output with a desired resolution of 1280x1024, specify video=VGA-1:1280x1024.

*ERROR* failed to set mode on [CRTC:6] OR detected unhandled fb_set_par error, error code -22

Try the same fix for the "Framebuffer does not fill screen or is larger than screen"

If that does not work, make the xorg and framebuffer console resolution identical. So if the output is VGA-1 and the framebuffer resolution is 1280x1024, specify the following:

File: /etc/X11/xorg.conf
Section "Monitor"
	Identifier "VGA-1"
	Option "PreferredMode" "1280x1024"
EndSection

(EE) [drm] No DRICreatePCIBusID symbol

An error message stating (EE) [drm] No DRICreatePCIBusID symbol can be caused by a disabled dri module, i.e. if you have this configuration:

File: /etc/X11/xorg.conf
Section "Module"
	Disable "dri"
EndSection

This can happen if you are switching from x11-drivers/nvidia-drivers. Change the Disable into a Load.

Additionally, this error can occur if using the wrong implementation of OpenGL.

See also

Links