Apologies to our regular visitors for the spam. Thanks to all those helping to keep our pages clear.

Spammers might like to note that we're still deleting all their additions.

nouveau

From Gentoo Linux Wiki

Jump to: navigation, search

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

Contents

[hide]

[edit] Installation

[edit] Kernel

You need at least version 2.6.34 of sys-kernel/gentoo-sources. Enable Nouveau support in the Staging drivers sub menu. Do NOT enable any framebuffer devices.

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

(Re)build and (re)install.

If you have installed the x11-drivers/nvidia-drivers in parallel, make sure that the nvidia kernel module does not load by blacklisting it:

File: /etc/modprobe.d/blacklist.conf
...
blacklist nvidia

before booting the nouveau-enabled kernel.

[edit] Userspace

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.

If you have x11-drivers/nvidia-drivers installed as well make sure to select the xorg-x11 OpenGL profile with eselect:

eselect opengl set xorg-x11

[edit] Links

Personal tools
In other languages
nouveau Wiki - InstallNouveau

InstallNouveau

English/Español/Português

Specific instructions for distribution

Introduction

If you use one of the distributions listed above, check if the packages there are recent and try them. Nouveau packages and the instructions here currently only provide accelerated 2D rendering using EXA (with RENDER acceleration), Randr 1.2 for dual-head and dynamic monitor configuration, and accelerated Xvideo.

3D rendering would be software rendering only with these instructions and packages. Pure Hardware 3D is working for some developers (with some games) on NV30, NV40 and NV50. Look for the latest Nouveau Companion on http://phoronix.com or on our IrcChatLogs page for the latest info. If you are willing to try our Gallium driver, look for the GalliumHowto. Please note: This is unsupported by us, if things break for you: though luck, but don't come crying. For some early 3d support on NV10 and NV20, you will have to use the classic mesa driver instead.

Install Nouveau

NOTE: If you ever plan to go back to your previous driver, especially if it is the nvidia proprietary driver (the blob), read the Uninstall chapter before actually doing anything.

Now, if you want to try out nouveau, please follow these steps carefully :

  1. Install xorg-server version 1.8 or later (appears in Xorg 7.6) - Versions prior to this won't work due to difference in some internal structures. Read the Xorg Modular Developer's Guide for help with building from source.

  2. Install the Nouveau kernel modules by following InstallDRM guide.

  3. Download the drm git tree

    Use git clone git://anongit.freedesktop.org/git/mesa/drm/ to obtain the current sources. If you already have downloaded the repository update it via git fetch ; git rebase origin. You can use this sequence to update all git repositories.

  4. Now compile libdrm via :
    • ./autogen.sh ; ./configure --enable-nouveau-experimental-api --prefix=/usr/; make ; make install

      The make install would by default install to /usr/local/ which may create problems when compiling xf86-video-nouveau, therefore we added --prefix=/usr/. This will overwrite the libdrm installed by your distribution. Note that libdrm might also be installed in /lib/ (Ubuntu 10.04) or some place else in your distribution. In that case you have to use --libdir=/lib (or where your libdrm is installed) with the configure command.

  5. Make sure, that neither DRM nor nvidia (binary version) kernel drivers are loaded. Use lsmod and rmmod nvidia should you still have it loaded.

  6. Now insert the kernel modules. If you installed the modules, modprobe nouveau should be enough. If not, do

    • insmod /path/to/drm.ko
      insmod /path/to/ttm.ko
      insmod /path/to/nouveau.ko

      Using insmod drm.ko debug=1 would spam your syslog with some more messages, which could be useful for us.

  7. Now edit your /etc/X11/xorg.conf to use the nouveau driver:

    Change in Section "Device" the Driver line to Driver "nouveau"

    • The minimal xorg.conf file, which you should try, if you encounter any problems, is:
      Section "Device"
      Identifier "n"
      Driver "nouveau"
      EndSection
  8. leave directory drm and get the Xorg nouveau driver:

    git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau/ 

  9. Switch into xf86-video-nouveau and compile:

    ./autogen.sh ; make and copy the nouveau_drv.so to the drivers directory of Xorg: cp src/.libs/nouveau_drv.so /usr/lib/xorg/modules/drivers

  10. Now start Xorg and run for cover. If you used the the nvidia blob before, the X server may possibly not start because NVIDIA overwrites the X server's libglx.so with a proprietary libglx.so. If that happens, install the X server package from your distribution again to restore the original libglx.so and make a backup copy of it in case you install the blob again.

Troubleshooting

See TroubleShooting.

Currently we can help you only with 2D and related problems, not with 3D. If you chose to install the Gallium driver you are on your own!

Uninstall Nouveau / Reinstall previous driver

The nouveau installation process involves updating the drm kernel module, adding a new kernel module (nouveau.ko) and a new X module (nouveau_drv.so).

The drm kernel module is needed to get new features still not merged in upstream kernels and it shouldn't be a problem when using the previous drivers you had installed, as neither nv nor nvidia use it. Do disable Nouveau KMS, if you used it.

The new nouveau.ko and nouveau_drv.so files don't overwrite any previous existing files, so you just need to rmmod the nouveau driver and restore your previous xorg.conf.

Libdrm installation will overwrite existing files. Libdrm Makefile should offer an uninstall command: make uninstall, after which you can reinstall the distribution packaged libdrm.

If you were previously using the free nv driver

Change your xorg.conf to use 'nv' as driver again and restart X.

If you were previously using the binary driver by nvidia

To get the binary driver back you edit xorg.conf and either copy NVIDIA's proprietary libglx.so back or run the installer again.

nouveau Wiki - GentooEbuilds

GentooEbuilds

English/Español

Ebuilds:

Previously, the nouveau ebuilds where in the nouveau overlay, which is now unmaintained. Use the x11 overlay instead, which is also availiable via layman

Recommended ebuilds:

The x11 overlay also has a mesa git ebuild, which contains the gallium based nouveau 3d driver, but it is still in a very early stage and using it is discouraged and unsupported

Unmaintained ebuilds:

Additionally, the now unmaintained nouveau overlay still contains the renouveau and mmio-trace utilities, which you will need if you want to help the development

These ebuilds do not have any keyword, as it is usual with cvs/svn/git releases. To be able to install them, you have to mark them with ** in package.keywords.

These are the steps which are necessary in order to get the nouveau driver working on gentoo:

  1. Disable the nvidia proprietary kernel module.
  2. eselect opengl set xorg-x11

  3. Make sure you have USE="dri" and VIDEO_CARDS="nouveau"
  4. emerge -va nouveau-drm libdrm xorg-server xf86-video-nouveau

    • Make sure you use the overlay ebuilds. You may have to unmask them.
    • xorg-server recompilation is sometimes necessary after DRM changes, but not always. If you are not sure, re-emerge it
  5. Update xorg.conf to use driver "nouveau".
  6. modprobe drm

  7. modprobe nouveau

  8. startx

No, you will not have accelerated 3D support.

glxgears.png

Not yours.