About · Blog · Projects · Papers · Contact

I said I'd never blog

DeforaOS, NetBSD, reverse-engineering and stuff
Using xf86-video-nouveau on NetBSD
Blog post by khorben
on Sunday, February 21 2010, 01:10

Member of

With pkgsrc-2009Q4 out [1], it's time to upgrade your packages on NetBSD [2]! If like me you got stuck with a quite modern NVidia card on your desktop machine, xf86-video-nv [3] may not work well enough to let you, erm, work (I can't complain either). Fortunately, there is xf86-video-nouveau [4], but the situation is still far from being trivial:
  • there are no official releases;
  • KernelModeSetting (KMS) is mandatory;
  • xorg-server 1.7 is mandatory, too;
  • in-kernel DRM support is mandatory as well;
  • libdrm_nouveau is mandatory again.
These are tough requirements, since NetBSD has no DRM support for nouveau yet, no KMS support whatsoever, and pkgsrc-2009Q4 contains Xorg 1.6.5nb1, and no libdrm_nouveau at all.

I have good news though: it's possible to make it work anyway. Here's how:
  • obtain xf86-video-nouveau's git code just before DRM was made compulsory;
  • fetch and install the corresponding libdrm_nouveau sources;
  • configure Xorg accordingly.
Follow this:
$ wget http://dri.freedesktop.org/libdrm/libdrm-2.4.12.tar.bz2
$ tar xzvf libdrm-2.4.12.tar.bz2
$ cd libdrm-2.4.12
$ ./configure --enable-nouveau-experimental-api
$ make install
$ cd ..
You now have libdrm_nouveau 2.4.12 installed. You can already take care of xf86-video-nouveau:

$ git clone git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau
$ cd xf86-video-nouveau
$ git checkout master
$ git checkout e259925bbdcebe4c3d136f476fc54f426eea9261
$ ./autogen.sh
$ make install
$ cd ..
It's now time to tell Xorg to use the nouveau driver. Edit xorg.conf this way, adding the following line:
        ModulePath   "/usr/local/lib/xorg/modules"
to the "Files" section, and then of course changing the "Driver" option of the relevant "Device" section as follows:
        Driver      "nouveau"
It works. Cool...

[1] http://mail-index.netbsd.org/pkgsrc-users/2010/01/31/msg011603.html
[2] http://www.netbsd.org/
[3] http://cgit.freedesktop.org/xorg/driver/xf86-video-nv/
[4] http://nouveau.freedesktop.org/

Come back...

Creative Commons License RSS