-   Slackware (
-   -   Nouveau driver + KMS on Slackware64-13.0: it works! (mostly) (

Didier Spaier 12-01-2009 07:01 PM

Nouveau driver + KMS on Slackware64-13.0: it works! (mostly)
Hello everybody,

Let me share my (shiny new) experience in installing the nouveau driver on Slackware63-13.0 with KMS (kernel mode setting) enabled.

But what is KMS anyway ?


When we talk about "mode setting", we mean setting up things like the screen resolution and depth mode, in other words, configuring whatever it's necessary in the graphics card to get it ready to display things on the screen.
Until recently, it was X drivers' job.

In recent kernels most of this job can be done by the kernel. This has many advantages, among which faster X startup as well as safer suspend to RAM or disk and resume. For this to work kernel and X drivers for the graphic cards have to be modified accordingly. This has not been done for nVidia cards (nv open source driver and nvidia proprietary one) but is possible with the new (and still work-in-progress) open-source nouveau driver. "nouveau" means new in French. ;)

I installed it on my Lenovo T61 laptop including a nVidia Corporation Quadro NVS 140M (rev a1) graphical card and running Slackware64-13.0.

I followed the steps indicated here. Keep in mind that you need to install two drivers for your card: a kernel driver (configured as a module) and an X driver.

To make a long story short I did this:
1) Following the InstallDRM document I downloaded a recent kernel source including the Nouveau driver:

git clone --depth 1 git://
There are other ways to install the Nouveau kernel driver than installing a new kernel including it but this one seems to be the safer.

2) I configured, compiled and installed it as usual. Be careful to include the Nouveau driver during configuration, see aforementioned document for detailed instructions.

3) Then I followed remaining steps of the installation

- Before you begin, uninstall the libdrm Slackware package but keep it at hand to install it back in case you'd like to uninstall Nouveau -- though libdrm be used neither by nv nor by nvidia drivers anyway.
- To be able to uninstall the specific libdrm for Nouveau (see InstallNouveau step 4), keep the drm folder which was created so you can cd to it and "make uninstall" before installing back the Slackware package.
- Of course it'd be much better to make a package for Slackware of specific libdrm to be used with Nouveau but I'm too lazy now. May be later...
- As stated in InstallNouveau, if you were previously using the binary driver by nVidia and want to get back this binary driver, edit xorg.conf and either copy NVIDIA's proprietary back or run the installer again. Well, it could be a little more complicated than that as according to "slackpkg search" this file is installed with the xorg-server package...
- Preferably perform most install steps in console mode (run level 3). Print aforementioned documents first.
- At step 4) of installation in InstallNouveau you are told to run:

./ ; ./configure --enable-nouveau-experimental-api --prefix=/usr/; make ; make install
But if you run Slackware64-13.0 you should add --libdir=/usr/lib64 to the configure options so preceding line become:

./ ; ./configure --enable-nouveau-experimental-api --prefix=/usr/  --libdir=/usr/lib64; make ; make install
- At first I couldn't properly start X. After some investigation I suspected that inserting thinkpad_acpi and nouveau modules at the same time was problematic. To avoid that I blacklisted nouveau but added following line at the end of /etc/rc.d/rc.local

/sbin/modprobe nouveau
[EDIT]Adding aforementioned line is not even necessary as the X driver loads the kernel driver anyway ;)

Now X starts well -- and very fast !

Only remaining problem for now : VLC crashes whilst I watch TV (through ADSL) or DVD with it [EDIT] but only with the XVideo video output.

I'm ready to help you, would you encounter difficulties during installation.

Caveat: as already said the "nouveau" driver is still work-in-progress and it is very possible that it doesn't work with some graphical cards.

uppman 12-02-2009 02:23 AM

It would be nice to get this stuff into current..
I do look forward to ditch the proprietary nvidia and ati drivers!

Didier Spaier 12-02-2009 03:30 AM

Not sure you will get Nouveau any time soon in -current because PV will judge it not to be stable enough and rightly so, IMHO. My guess is we'll have to wait until the kernel driver be in mainline and the X driver officially released :(

But if you have an ATI Radeon card you could benefit of KMS if you use a recent enough kernel as stated in changelog for 2.6.31:

1.4. ATI Radeon Kernel Mode Setting support

This version adds Kernel Mode Setting (KMS) support for ATI Radeon. Hardware supported is R1XX,R2XX,R3XX,R4XX,R5XX (radeon up to X1950). Works is underway to provide support for R6XX, R7XX and newer hardware (radeon from HD2XXX to HD4XXX).

[EDIT] You already knew that as this thread is referenced in your wiki -- but may be some other people didn't notice ...

mkoco 12-03-2009 04:01 PM

Hey Didier,

I just installed nouveau my old Dell Box, its a P3 500 MHz, 384 RAM, and a 32mb TNT2.

The nv driver was just garbage on an older system, so I went for nouveau as well. Compiled the kernel with the nouveau tree, installed the xorg driver, and its functioning.

I'm having two issues though:
1) my mouse dies when I use nouveau, but not nv. I have no mouse support in X, keyboard only. And,

2) how do you set resolutions when they are managed by the kernel? Is it preferred to still set them in xorg.conf? But what about the frame buffer? When I boot up my system it initially uses the vesafb module to manage the frame buffer (at 1280x1024), but as soon as drm and nouveau are initialized in the boot process, my kernel tells me its going back down to 800x600, (which doesn't look so hot on a 19" CRT). There must be a setting for this somewhere, but where is it?

Thanks, I'll post more later.

Best, :)

Didier Spaier 12-04-2009 04:18 AM

hey Enkoan,

1) For the mouse I don't know. Anything interesting in /var/log/Xorg.0.log ?

2) I use an xorg.conf file to set up X, as I don't use HAL anyway -- and need it too to use the proprietary nvidia driver every now and then.

Nothing special about it, I just run xorgsetup (at runlevel 3) to write it in /etc/X11.

On my box:

bash-3.1$ lspci -k|grep -A3 VGA
01:00.0 VGA compatible controller: nVidia Corporation Quadro NVS 140M (rev a1)
        Subsystem: Lenovo ThinkPad T61
        Kernel driver in use: nouveau
        Kernel modules: nouveau, nvidiafb

Most kernel configuration settings went from the Slackware configuration for generic kernel:

zcat /proc/config.gz > ./.config
make oldconfig

My specific kernel configuration's settings with menuconfig follow:

Devices drivers
        =>  Graphics support
                => <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
                        <M> Nouveau (nVidia) cards
                        [*}    Enable modesetting on nouveau by default
                        [*]    Support for backlight control
                        [*]    Build in Nouveau's debugfs support
Devices drivers
        =>  Graphics support
                => {*} Support for frame buffer devices
                        <M> NVidia FrameBuffer Support
Devices drivers
        => Graphics support
                => Console display driver support
                        * Framebuffer Console support

[EDIT] I compiled a kernel with the nouveau tree already merged in it, it shows as 2.6.31-rc9-g91f44d6 (g91f44d6 being the LOCALVERSION as I use a git-based tree and configured the kernel with LOCALVERSION_AUTO = Yes in General setup). Not sure that it makes any difference though.

- Please note that I have enabled Framebuffer Console support in kernel configuration. And AFAIK you need NVidia FrameBuffer Support configured as a module as well. If you already have it may be blacklist vesafb ? (not sure about that though)
- To set resolution under X I use xrandr which works well with Nouveau :

bash-3.1$ xrandr
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
LVDS-0 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
  1680x1050      60.0*+  60.0    50.0 
  1400x1050      60.0 
  1280x1024      59.9 
  1280x960      59.9 
  1152x864      60.0 
  1024x768      59.9 
  800x600        59.9 
  640x480        59.4 
  720x400        59.6 
  640x400        60.0 
  640x350        59.8 
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-D-0 disconnected (normal left inverted right x axis y axis)

As you can see I get automatically maximum resolution for my card which is indeed 1680x1050. LVDS-0 is the LCD screen of my laptop but I tried to connect it to a TV set through the VGA output too and this works as well (see man xrandr).


Didier Spaier 12-11-2009 06:04 PM

Nouveau To Go Into Linux 2.6.33 Kernel!
As posted by Michael Larabel today:

That's good news for those of us owning a nVidia graphics card :cool:

GazL 12-11-2009 06:18 PM

Yep, looks like there's been a lot of fuss about it on lkml recently. I look forward to the day that there's a viable alternative to nvidia's blob though I still think that's a while off yet, so I won't hold my breath. Still, it's heading in the right direction. :)

Didier Spaier 12-11-2009 06:24 PM


Originally Posted by GazL (Post 3788325)
Yep, looks like there's been a lot of fuss about it on lkml recently.

Yes! here is most recent post from Linus himself:

Didier Spaier 12-12-2009 04:08 AM

For the adventurers, Nouveau is already included in 2.6.32-git8, go grab the patch here.

PS I kindly remind you that you still need other parts, that is to say up to date libdrm and xf86-video-nouveau driver for X, IOW only step 2 of Install Nouveau should be updated now.
PS2 Nouveau config options are under Devices Drivers => Staging drivers. Config help for DRM_NOUVEAU follows:

Nouveau (nVidia) cards


Choose this option for open-source nVidia support.

Symbol: DRM_NOUVEAU [=m]
Prompt: Nouveau (nVidia) cards
  Defined at drivers/gpu/drm/nouveau/Kconfig:1
  Depends on: STAGING [=y] && !STAGING_EXCLUDE_BUILD [=n] && DRM [=m]
    -> Device Drivers
      -> Staging drivers (STAGING [=y])
        -> Exclude Staging drivers from being built (STAGING_EXCLUDE_BUILD [=n])
  Selects: FW_LOADER [=y] && DRM_KMS_HELPER [=m] && DRM_TTM [=m] && FB_CFB_FILLRECT [=y] && FB_CFB_COPYAREA [=y] && FB_CFB_IMAGEBLIT [=y] && FB [=y] && FRAMEBUFFER_CONSOLE [=y] && FB_BACKLIGHT [=y]

KMS is automatically enabled at module loading and built-in option is not available because of the loading firmware issue if I understand well.
PS3 Works here but now I can't connet to the internet with my wireless card :( I noticed updates of iwl-* in the change log, just wait for somebody to fix something or (more probable) I find my config error... Meanwhile I'm back to 2.6.32 with an out-of-tree build of Nouveau.

All times are GMT -5. The time now is 06:37 PM.