# What is x11-base/nouveau-drm for? Do I need it?

## benneque

Hey guys,

I've got a (hopefully) simple question:

I want to use nouveau from the ebuilds (not the in-kernel driver). Though I typed "emerge xf86-video-nouveau". Compiles fine, but then I noticed that there's also an ebuild called "nouveau-drm". Do I need this? And what is it for? In-Kernel DRM is disabled and should stay so, because I want and up do date nouveau driver.

Thanks

EDIT: okay. found it:

 * Nouveau DRM not detected. If you want any kind of

 * acceleration with nouveau, emerge x11-base/nouveau-drm or

 * enable CONFIG_DRM_NOUVEAU in the kernel.

Now the 2nd problem: I can't compile nouveau-drm  :Sad: 

 * For newer kernels newer than 2.6.32 there is integrated nouveau DRM.

 * Use that if you experience build issues.

I have build issues:

```
make -j3 LINUXDIR=/usr/src/linux NOUVEAUROOTDIR=/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master -f /usr/portage/ebuilds/portage/x11-base/nouveau-drm/files/nouveau-drm-20100212-Makefile 

make -C /usr/src/linux KCPPFLAGS="-I/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm" SUBDIRS="/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm" CONFIG_DRM=m CONFIG_DRM_KMS_HELPER=m CONFIG_DRM_TTM=m CONFIG_DRM_NOUVEAU=m CONFIG_DRM_NOUVEAU_KMS=n CONFIG_DRM_NOUVEAU_BACKLIGHT=y CONFIG_DRM_NOUVEAU_DEBUG=y CONFIG_DRM_I2C_CH7006=m CONFIG_DRM_TDFX=n CONFIG_DRM_R128=n CONFIG_DRM_RADEON=n CONFIG_DRM_MGA=n CONFIG_DRM_I810=n CONFIG_DRM_I830=n CONFIG_DRM_I915=n CONFIG_DRM_SIS=n CONFIG_DRM_SAVAGE=n CONFIG_DRM_VIA=n EXTRA_CFLAGS=" -DCONFIG_DRM_NOUVEAU_BACKLIGHT -DCONFIG_DRM_NOUVEAU_DEBUG " modules

make[1]: Entering directory `/usr/src/linux-2.6.35-zen2'

Makefile:595: "WARNING: Appending $KCPPFLAGS (-I/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm) from command line to kernel $CPPFLAGS"

  CC [M]  /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_buffer.o

  CC [M]  /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_bufs.o

  CC [M]  /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_auth.o

In file included from /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm/drmP.h:653:0,

                 from /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_bufs.c:40:

/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm/drm_crtc.h:598:27: error: field ‘output_poll_slow_work’ has incomplete type

In file included from /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm/drmP.h:653:0,

                 from /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm/drm_buffer.h:38,

                 from /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_buffer.c:35:

/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm/drm_crtc.h:598:27: error: field ‘output_poll_slow_work’ has incomplete type

In file included from /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm/drmP.h:653:0,

                 from /var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_auth.c:36:

/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/include/drm/drm_crtc.h:598:27: error: field ‘output_poll_slow_work’ has incomplete type

make[2]: *** [/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_buffer.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[2]: *** [/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_auth.o] Error 1

make[2]: *** [/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm/drm_bufs.o] Error 1

make[1]: *** [_module_/var/tmp/portage/x11-base/nouveau-drm-20100811/work/master/drivers/gpu/drm] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.35-zen2'

make: *** [modules] Error 2

emake failed
```

EDIT2: okay... I'd like to use now in-kernel DRM , but I can only find DRM for 3dfx, ATi, Matrox, Via and Savage... No NVidia ?!

----------

## benneque

okay. got it myself.

shame that there's no complete nouveau how to!

So here's mine short:

1. Activate DRM under Graphics support

2. Enable Staging Drivers

3. say Yes to Nouveau Cards

4. compile kernel

5. emerge xf86-video-nouveau

(optionally you can enable debug fs and enable debug output under staging drivers)

Finished!

----------

## paulusbrand

I think: Or you build the nouveau drm in kernel, or you install the nouveau-drm package.

----------

## benneque

yeah that's right.

one MUST use nouveau drm for acceleration (else it's not much better than vesa).

though one has to choose nouveau-drm ebuild or in-kernel nouveau-drm.

the ebuild won't compile for me, so i chose in-kernel DRM and xf86-video-nouveau ebuild. works pretty well!

some minor distortions when watching 1080p video and enabling 3d kwin causes major distortions (but it is said on nouveau homepage).

xrandr works well too. don't know about power saving and suspend yet.

----------

## chithanh

The Xorg config guide will show where to enable nouveau DRM in the kernel.

```
(Enable DRM)

Device Drivers --->

  Graphics support --->

  <*>  Direct Rendering Manager --->

(Nouveau is currently in the Staging drivers section)

Device Drivers --->

  Staging drivers --->

  [ ]  Exclude Staging drivers from being built

  <*>    Nouveau (nVidia) cards

```

----------

