Page 1 of 8 123 ... LastLast
Results 1 to 10 of 77

Thread: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

  1. #1
    Join Date
    Nov 2006
    Location
    Denmark
    Beans
    83

    Lightbulb HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards
    Updated 2011-10-18
    Ubuntu 10.04 or later required

    Intro

    Nouveau is a project which aims at producing Open Source 3D drivers for nVidia cards. In this tutorial I would like to explain how to compile and install latest version of nouveau drivers.
    You can find nouveau developement news and chat with other nouveau users at phoronix.

    This guide is meant for people who would like to test the latest nouveau 3D drivers (if you are interested only in 2D driver, it would be safer to just use stable drivers that can be installed from ubuntu repository or install the latest version from xorg-edgers ppa). As these drivers are not considered 100% stable yet, this guide is targeted at advanced users.

    To have a better vision of what to expect from nouveau drivers take a look at feature matrix (some nvidia chip code names can be found here. Also "lspci | grep VGA" can be used to find out the codename).

    Part A: Removing nvidia drivers
    1. Uninstall it
      • If you installed the drivers using ubuntu official repository:
        Code:
        sudo apt-get --purge remove nvidia-glx-* nvidia-settings
      • If you used nvidia installer from nvidia website(replace VERSION with nvidia driver version!):
        Code:
        sudo sh NVIDIA-Linux-x86-VERSION-pkg1.run --uninstall
    2. Save all the important things you were working on, switch to virtual console by pressing by pressing Ctrl+Alt+F1 (you can switch back by pressing Ctrl+Alt+F7), login and stop gnome display manager
      Code:
      sudo service gdm stop
    3. Run the following command to generate xorg.conf file
      Code:
      sudo Xorg -configure
    4. Copy the generated file to /etc/X11
      Code:
      sudo cp xorg.conf /etc/X11
    5. Open the file with nano editor
      Code:
      sudo nano /etc/X11/xorg.conf
    6. Search for Driver "nvidia" line in Device section (editor's search functionality can be activated by pressing Ctrl+W) and if you can find it replace it with Driver "nouveau" and press Ctrl+O and Ctrl+X to save and exit.
    7. Restart computer.
      Code:
      sudo reboot


    Part B: Installing DRM kernel modules

    1. First of all, to compile latest DRM modules kernel version requirements should be fulfilled. Take a look at this Makefile(first 3 lines) to find out the required kernel version (for example, if it states "VERSION = 3", "PATCHLEVEL = 1" & "SUBLEVEL = 0" kernel version 3.1.0 is required).
    2. Once you know the required kernel version, download needed packages depending on your architecture (32bit or 64bit) (you can find your architecture by running uname -m - if it replies i686, you are running 32bit ubuntu, otherwise if it says x86_64, you are running 64bit version) from this page:
      • 32bit:
        1. linux-headers-***_i386.deb
        2. linux-headers-***_all.deb
        3. linux-image-***_i386.deb
      • 64bit:
        1. linux-headers-***_amd64.deb
        2. linux-headers-***_all.deb
        3. linux-image-***_amd64.deb
    3. After installing the kernel restart to boot the newly installed kernel
    4. Now we have two options
      • to clone whole nouveau kernel repository which takes really a lot of time even with high speed i-net connection and requires git installation (--depth 1 is used to avoid downloading history)
        Code:
        sudo apt-get install git-core
        git clone --depth 1 git://anongit.freedesktop.org/nouveau/linux-2.6 master
      • or just download daily snapshot which should be pretty fast
        Code:
        wget http://people.freedesktop.org/~pq/nouveau-drm/master.tar.gz
    5. If you downloaded the daily snapshot, you can use the following command to unpack it, otherwise just skip to next step
      Code:
      tar -xzvf master.tar.gz
    6. Enter master/drivers/gpu/drm/nouveau directory
      Code:
      cd master/drivers/gpu/drm/nouveau
    7. Exchange Makefile in the directory with one that will be used to compile the modules
      Code:
      mv Makefile Makefile.orig 
      wget -O Makefile "http://cgit.freedesktop.org/nouveau/linux-2.6/plain/nouveau/Makefile?h=master-compat"
    8. Compile the modules
      Code:
      NOUVEAUROOTDIR=../../../.. make
    9. Install them
      Code:
      sudo make install NOUVEAUROOTDIR=../../../..
    10. Go back to the directory you downloaded the source code
      Code:
      cd ../../../../..


    Part C: Installing libdrm
    1. Dependency installation
      Code:
      sudo apt-get install git-core autoconf libtool libpthread-stubs0-dev libpciaccess-dev
    2. Download libdrm sources
      Code:
      git clone git://anongit.freedesktop.org/git/mesa/drm/
    3. Enter drm directory
      Code:
      cd drm
    4. Run autogeneration and configuration scripts with some flags (libdir flag is used because libdrm is installed in none standard directory in ubuntu)
      Code:
      ./autogen.sh --enable-nouveau-experimental-api --prefix=/usr --libdir=/lib --disable-intel --disable-radeon
    5. Compile the library
      Code:
      make
    6. Install it
      Code:
      sudo make install
    7. Return to parent directory
      Code:
      cd ..


    Part D: 2D driver installation
    1. Dependency installation
      Code:
      sudo apt-get install xorg-dev xutils-dev
    2. Download the sources
      Code:
      git clone --depth 1 git://anongit.freedesktop.org/nouveau/xf86-video-nouveau
    3. Enter the source directory
      Code:
      cd xf86-video-nouveau
    4. Run autogeneration and configuration scripts
      Code:
      ./autogen.sh PKG_CONFIG_PATH=/lib/pkgconfig
    5. Compile the drivers
      Code:
      make
    6. Copy the driver to /usr/lib/xorg/modules/drivers directory
      Code:
      sudo cp src/.libs/nouveau_drv.so /usr/lib/xorg/modules/drivers
    7. Let's tell to the system about new libraries
      Code:
      sudo ldconfig
    8. Back to parent directory
      Code:
      cd ..


    Part E: 3D driver installation
    1. More dependencies
      Code:
      sudo apt-get install g++ libtalloc-dev bison flex
    2. Acquire the sources
      Code:
      git clone git://anongit.freedesktop.org/git/mesa/mesa
    3. Enter mesa directory
      Code:
      cd mesa
    4. Run autogeneration and configuration scripts
      Code:
      ./autogen.sh --enable-glx-tls --disable-asm --with-dri-drivers= --with-gallium-drivers=swrast,nouveau --enable-texture-float --disable-asm --enable-opengl --disable-gles2 --disable-openvg --enable-dri --enable-glx --enable-xvmc --disable-va --disable-vdpau --disable-osmesa --disable-egl --disable-xorg --disable-d3d1x --disable-xa --disable-gbm --disable-xlib-glx --disable-gallium-egl --disable-gallium-gbm --disable-gallium-llvm --disable-xcb --enable-driglx-direct --enable-glx-tls --enable-glu PKG_CONFIG_PATH=/lib/pkgconfig
    5. Compile the driver
      Code:
      make PKG_CONFIG_PATH=/lib/pkgconfig
    6. Copy the required file to /usr/lib and make a link in /usr/lib/dri
      Code:
      sudo cp lib/gallium/nouveau_dri.so /usr/lib
      sudo ln -s /usr/lib/nouveau_dri.so /usr/lib/dri/nouveau_dri.so
      If after running "sudo ln -s /usr/lib/nouveau_dri.so /usr/lib/dri/nouveau_dri.so" you get an error saying "No such file or directory" create "dri" folder inside "/usr/lib" and try again:
      Code:
      sudo mkdir /usr/lib/dri
      sudo ln -s /usr/lib/nouveau_dri.so /usr/lib/dri/nouveau_dri.so
    7. Tell to the system about new libraries
      Code:
      sudo ldconfig
    8. Because in this tutorial we replaced nouveau 2D drivers that come with Ubuntu, we'll need to take additional step to make sure that the drivers we just installed are not overwritten by the ones provided by ubuntu during software update. We'll have to lock driver version with apt-get and synaptic:
      1. Run the following commands (to unlock package version replace "hold" with "install")
        Code:
        echo libdrm-nouveau1 hold | sudo dpkg --set-selections
        echo xserver-xorg-video-nouveau hold | sudo dpkg --set-selections
        echo libdrm2 hold | sudo dpkg --set-selections
      2. Use instructions in this ubuntu help tutorial to lock libdrm-nouveau1, xserver-xorg-video-nouveau and libdrm2 package versions.
    9. That's it. Now you can restart your pc to see if the drivers work (If something goes wrong, don't panic - just take a look at "If graphical environment doesn't start" section in Appendix). You can check if the 3D driver loaded correctly by taking a look at /var/log/Xorg.0.log
      Code:
      grep nouveau_dri /var/log/Xorg.0.log
      the output should be something similar to:
      Code:
      [  1639.620] (II) AIGLX: Loaded and initialized /usr/lib/dri/nouveau_dri.so


    Appendix: If graphical environment doesn't start
    1. This step is only needed if you are on wireless network and can only connect to internet when network manager applet is running. In that case you'll have to boot up ubuntu live cd and download the following deb packages for ubuntu version and architecture you have installed:
      1. libdrm-nouveau1
      2. xserver-xorg-video-nouveau
      3. libdrm2
    2. Boot up to recovery mode of the official ubuntu kernel
    3. Unlock package versions which contents we have overwritten
      Code:
      echo libdrm-nouveau1 install | sudo dpkg --set-selections
      echo xserver-xorg-video-nouveau install | sudo dpkg --set-selections
      echo libdrm2 install | sudo dpkg --set-selections
    4. Now depending if you have downloaded the deb packages or will just be using apt-get run the following commands:
      • deb package installation (replace '/directory/with deb packages' with the real path):
        Code:
        cd '/directory/with deb packages'
        sudo dpkg -i *.deb
      • apt-get:
        Code:
        sudo apt-get install --reinstall libdrm-nouveau1 xserver-xorg-video-nouveau libdrm2
    5. Reboot
      Code:
      sudo reboot
    6. Select kernel that is provided by ubuntu developers
    7. Finally you can remove kernel packages you have installed when following this guide


    Resources
    Install Nouveau
    Gallium3D How to
    Nouveau FAQ
    Last edited by Hakimio; October 18th, 2011 at 05:17 PM.

  2. #2
    Join Date
    Jul 2005
    Location
    Lafayette, IN
    Beans
    143
    Distro
    Kubuntu 10.04 Lucid Lynx

    Smile Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    Thanks for compiling this. It's fun playing with new code. I actually have it working half decent on jaunty.
    -Jason

  3. #3
    Join Date
    Apr 2005
    Location
    Koblenz, Germany
    Beans
    102
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    When these drivers will be stable, would this then enable future Xen Dom0 to use more then 800x600 px resolution when using nvidia cards?

  4. #4
    Join Date
    Nov 2006
    Location
    Denmark
    Beans
    83

    Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    Quote Originally Posted by TSJason View Post
    Thanks for compiling this. It's fun playing with new code. I actually have it working half decent on jaunty.
    Nice to see that it was helpful to you
    Just curious: did you try the 3d driver or just the 2d. If 3d, what VGA you have and how was the overall experience? Did you try running some 3d apps?
    Quote Originally Posted by floogy View Post
    When these drivers will be stable, would this then enable future Xen Dom0 to use more then 800x600 px resolution when using nvidia cards?
    Quote Originally Posted by Nouveau FAQ
    It really is not easy to predict any dates, as showstoppers may appear anytime. Very few, usually none, of the developers are paid to work on Nouveau, so all progress depends on their free time and interests.
    Don't know anything about Xen issues though.

  5. #5
    Join Date
    Apr 2005
    Location
    Koblenz, Germany
    Beans
    102
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    I asked that, because Xen-Kernels and nvidia-modules have to be patched to work together. But I read that these patches are using workarounds like IGNORE_XEN_PRESENCE=1. Therefor these so called solutions are very unstable or unuseable. Some people reported system halt and crashes all 3 or 5 hours.
    http://www.nvnews.net/vbulletin/showthread.php?t=122900
    http://www.meinews.net/nvidia-t266401.html (sorry, german)

    I'm not able to get useful resolutions with the nv driver at all.

    I got a GeForce 6600 GT, and tested yesterday the ppa nouveau packages from launchpad for hardy, but that didn't work either.
    Code:
    01:00.0 VGA compatible controller: nVidia Corporation NV43 [GeForce 6600 GT] (rev a2) (prog-if 00 [VGA controller])
    Also I wasn't able to set up the nouveau driver to get X running. Started by startx I got a blank black screen and couldn't go back to any tty so I must reset the computer and reboot. With gdm it failed too, but offered the failsafe vesa configuration tool (failsafeDexconf).

    http://nouveau.freedesktop.org/wiki/UbuntuPackages
    https://launchpad.net/~raof/+archive/ppa

    xorg.conf nv and nouveau:
    http://paste.pocoo.org/show/107880/

    Xorg.0.log nouveau:
    http://paste.pocoo.org/show/107881/
    There was no backtrace: output. That's the EOF.
    Code:
    # egrep '(\(EE|\(WW|\(!!)' /var/log/Xorg.0.log.nouveau_1	(++) from command line, (!!) notice, (II) informational,
    	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
    (WW) NOUVEAU(0): Bad V_BIOS checksum
    (EE) NOUVEAU(0): wrong DRM version
    (EE) NOUVEAU(0): DRI pre-initialisation failed.  Setting NoAccel
    (!!) NOUVEAU(0): ... BIOS signature not found
    (!!) NOUVEAU(0): Raw DCB entry 0: 01000300 00000028
    (!!) NOUVEAU(0): Raw DCB entry 1: 04010312 00000000
    (!!) NOUVEAU(0): Raw DCB entry 2: 04010310 00000028
    (!!) NOUVEAU(0): Raw DCB entry 3: 02020321 0000c080
    (WW) NOUVEAU(0): Failed to set up write-combining range (0xc000001a,0x1)
    (WW) NOUVEAU(0): Failed to set up write-combining range (0xc0000018,0x3)
    (WW) NOUVEAU(0): Failed to set up write-combining range (0xc0000010,0xb)
    (WW) NOUVEAU(0): Failed to set up write-combining range (0xc0000000,0x1b)
    (WW) Configured Mouse: No Device specified, looking for one...
    I guess the problem is the wrong drm version in the ppa repo:
    (EE) NOUVEAU(0): wrong DRM version

    Code:
    libdrm2:
      Installed: 2.4.1+git20090212-0~ppa1~hardy
      Candidate: 2.4.1+git20090212-0~ppa1~hardy
      Version table:
     *** 2.4.1+git20090212-0~ppa1~hardy 0
            500 http://ppa.launchpad.net hardy/main Packages
            100 /var/lib/dpkg/status
         2.3.0-4ubuntu1 0
            500 http://de.archive.ubuntu.com hardy/main Packages
            500 http://archive.ubuntu.com hardy/main Packages
    Unfortunatly I got svere problems with my package sytem yesterday when removing nouveau packages and downgrading libdrm2 to hardy back again I wasn't no more able to reinstall the removed nvidia-glx-new because of dpkg-diversion conflicts with the old traces of nvidia-glx.

    The diversion problem was somewhat complex:
    http://paste.pocoo.org/show/107883/

    Now I got the propritary binary driver running again.
    Last edited by floogy; March 14th, 2009 at 02:01 PM.

  6. #6
    Join Date
    Nov 2006
    Location
    Denmark
    Beans
    83

    Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    Quote Originally Posted by floogy View Post
    I guess the problem is the wrong drm version in the ppa repo:
    (EE) NOUVEAU(0): wrong DRM version
    Instead of using precompiled packages, try installing the latest 2d driver using my guide.

  7. #7
    Join Date
    Apr 2009
    Beans
    2

    Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    Great Guide.

    I got to step 17. Then I get this msg.

    checking for LIBDRM_NOUVEAU... configure: error: Package requirements (libdrm_nouveau) were not met:

    No package 'libdrm_nouveau' found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables LIBDRM_NOUVEAU_CFLAGS
    and LIBDRM_NOUVEAU_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    I'm a complete noob so any help would be greatly appreciated.

    Cheers,

  8. #8
    Join Date
    Nov 2006
    Location
    Denmark
    Beans
    83

    Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    Quote Originally Posted by tonyturbo23 View Post
    Great Guide.

    I got to step 17. Then I get this msg.

    checking for LIBDRM_NOUVEAU... configure: error: Package requirements (libdrm_nouveau) were not met:

    No package 'libdrm_nouveau' found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables LIBDRM_NOUVEAU_CFLAGS
    and LIBDRM_NOUVEAU_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    I'm a complete noob so any help would be greatly appreciated.

    Cheers,
    Please try to CAREFULLY follow steps 1-6 in part B. It seems that you ever skipped some step or drm compilation/installation was unseccessful. If that doesn't help, please report and I'll check if the guide needs to be updated.

  9. #9
    Join Date
    Nov 2006
    Location
    India
    Beans
    813
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    Seeing Nouveau in action will be a delight to the eyes once its final version is released..
    Will Unity break the Unity of the Community?...
    Only Time Will Tell...

  10. #10
    Join Date
    Apr 2009
    Beans
    2

    Re: HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards

    After step 4, I got this error

    libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
    libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
    libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
    autoreconf: running: /usr/bin/autoconf
    autoreconf: running: /usr/bin/autoheader
    autoreconf: running: automake --add-missing --copy --no-force
    configure.ac:24: installing `./missing'
    tests/Makefile.am: installing `./depcomp'
    configure.ac:130: required file `libdrm/intel/Makefile.in' not found
    configure.ac:130: required file `libdrm/nouveau/Makefile.in' not found
    configure.ac:130: required file `libdrm/nouveau/libdrm_nouveau.pc.in' not found
    autoreconf: automake failed with exit status: 1[/I]

    I might just downgrade to 8.04 and hope that my nvidia card works with that.

Page 1 of 8 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •