This page contains the commands for building the now-obsolete nouvau Mesa driver (pre-Gallium3D):
git clone git://anongit.freedesktop.org/git/mesa/mesa And do make linux-dri-x86 DRI_DIRS=nouveau. (That should be make linux-dri-x86-64 DRI_DIRS=nouveau if you are on a 64-bit machine; also you can add PKG_CONFIG_PATH=/path/to/drmgitinstall/lib/pkgconfig before make if you didn't install drm in /usr)
Now open an xterm (or whatever you use) and type:
export LIBGL_DRIVERS_PATH=/path/to/mesagit/lib/export LD_LIBRARY_PATH=/path/to/mesagit/lib/
Please replace /path/to/mesagit/ (note the trailing /lib !) with the correct path to your directory. After that you can start glxgears
Note that the nouveau-1 branch used previously is merged into master and no longer used. Also if you change content of some file, it is not necessary to do make realclean for rebuilding, If you use make DRI_DIRS=nouveau, it will rebuild libraries for you in a fraction of time necessary for complete rebuilding.
See also: http://dri.freedesktop.org/wiki/Building
The GL libraries - how to switch between nvidia and Mesa
Does not apply to Gallium3D so far because it's nouveau_dri.so has it's mesa/gallium libraries statically linked into it.
If you plan to use the binary driver to help with renouveau and you are currently running one of the free drivers, nouveau or nv, then you should read the following information to seamlessly restore your system later.
The binary driver uses custom GL libraries to implement its 3D support, and these differ, conflict and replace the versions provided by the Mesa project (used by Xorg and Nouveau) when the driver is installed. The libraries that get replaced are glx, GL and GLcore.
They usually reside in /usr/lib/xorg/modules/ while the mesa versions may reside in /usr/lib/xorg/modules/extensions/ in the xorg tree. All these paths may be distro-specific, so you should check in your particular case.
It's said that the nvidia driver can be uninstalled and would, in some cases, restore the original mesa versions if they had been replaced and handle this process, but it's not working in all cases. You could also keep backup copies of the original files to allow a straightforward reinstallation of the free drivers and avoid having to rebuild them from sources (Mesa project) in case the uninstall doesn't work. If no mesa versions of those libraries are avaliable to nouveau it will crash if 3D features are used, but it will do fine for 2D.
To get the free drivers again you have to:
- restore the backed up GL files or unistall the nvidia binary driver
- use the steps provided for installation of the nouveau driver (no need to recompile drm or nouveau as the modules will still be around)
- rmmod nvidia and edit xorg.conf to use Driver "nv" or "nouveau" instead of "nvidia".
Gentoo users are lucky because they have eselect opengl to switch between OpenGL implementations installed by the distribution's package manager.
Is AIGLX disabled?
Applies also to Gallium3D so far, to be used in the Gallium3D when we crate it:
AIGLX will cause problems for the moment, it does similar things to an opengl app and that is bad at the moment
Add this at the bottom of your xorg.conf (or add it to the existing serverflags):
Section "ServerFlags"
Option "AIGLX" "off"
EndSection
