Announcement

Collapse
No announcement yet.

Updated and Optimized Ubuntu Free Graphics Drivers

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Updated and Optimized Ubuntu Free Graphics Drivers

    Note: Phoronix disabled editing forum posts some time ago, so check the main PPA page for updated informations!

    0 - Introduction

    Some year ago I wrote a guide on Installing latest Open Source ATI drivers under Ubuntu to provide the new - at the time - Radeon R500 support with free drivers.

    Now Ubuntu 11.04 (natty) just get released shipping latest official mesa release 7.10.2. However current mesa snapshots have a huge amount of new features which make feel old this official release. Ubuntu 10.10 (maverick) ships an older pre-release snapshot of mesa 7.9.

    So I am now providing a PPA with updated mesa and X drivers as an easy way for users to try all the new features developed in the past months and early detect eventual bugs to report to developers. This is somewhat inspired by the xorg-edgers PPA but it only provides graphics drivers to lower the risk of breakage. Also I want to provide some packaging improvements and possibly new features (e.g. integrate testing branches like glsl-130 or pipe-video) when they'll be sufficient stable.

    Supported Ubuntu versions: 10.10 (maverick) and 11.04 (natty).

    1 - Improvements

    Mesa improvements:Note that being snapshots they may also have new bugs.

    Mesa packaging improvements:
    • support for S3TC texture compression* (Recommends included libtxc-dxtn)
    • support for floating-point textures*
    • llvm support (for faster gallium drivers)
    • gallium llvmpipe as the default software renderer rather than classic swrast
    • i915 and nouveau gallium drivers in the experimental package
    • --enable-debug flag (to better debug mesa and games bugs)
    • better package compression with 50% binary size reduction (for faster download)
    • custom OpenGL version string to make sure you are running drivers from this PPA
    *these are patented features that can be used after agreeing the related IP: ARB_texture_float and EXT_texture_compression_s3tc. They are provided here for testing purpose only, anyway.

    For more details check the changelog.

    Updated drivers and libdrm from git:
    Only free drivers will be provided. No binary fglrx and nvidia drivers.

    2 - Installing
    Just type this in a terminal:

    Code:
    sudo add-apt-repository ppa:oibaf/graphics-drivers
    sudo apt-get update
    sudo apt-get dist-upgrade
    Alternatively, add:
    Code:
    ppa:oibaf/graphics-drivers
    to your system's Software Sources and update the package from here.

    If all goes well, and if glxinfo is installed, typing in a shell:
    Code:
    glxinfo | grep OpenGL
    will print the driver type and version with the PPA custom string.

    3 - Using alternative drivers
    Examples on how to run your OpenGL program (in this case glxgears -info) with non default drivers.

    To force the use of gallium llvmpipe software render:
    Code:
    LIBGL_ALWAYS_SOFTWARE=1 glxgears -info
    To force the use of old non-gallium software render:
    Code:
    LIBGL_ALWAYS_SOFTWARE=1 LIBGL_DRIVERS_PATH=/usr/lib/dri-alternates glxgears -info
    To force the use of old non-gallium r300/r600 radeon drivers:
    Code:
    LIBGL_DRIVERS_PATH=/usr/lib/dri-alternates glxgears -info
    Experimental drivers:
    If you want to use the gallium nouveau or i915 driver install also the experimental package:
    Code:
    sudo apt-get install libgl1-mesa-dri-experimental
    The gallium nouveau driver will then be used by default rather than using llvmpipe.

    To force the use of gallium i915 driver (classic driver will still be the default):
    Code:
    LIBGL_DRIVERS_PATH=/usr/lib/dri-alternates glxgears -info
    4 - Debugging and reporting problems

    If you have some problem with the drivers try running the application from the command line and see if there are any graphics related warnings (note that mesa is built with --enable-debug which can provide useful debug informations). Also type dmesg to see if there are other related informations here. If you get crashes install the relevant -dbg pacakges (libgl1-mesa-dri-dbg or libgl1-mesa-dri-experimental-dbg for 3D drivers and xserver-xorg-video-intel-dbg , xserver-xorg-video-nouveau-dbg or xserver-xorg-video-radeon-dbg for X drivers) and reproduce the crash with gdb. Example:
    Code:
    $ gdb glxgears
    [...make your application crash and then get a backtrace with:]
    (gdb) bt
    If X.org crashes look at /var/log/Xorg.0.log (or /var/log/Xorg.0.log.old when a new X session is started after the crash).

    With the gathered informations try querying freedesktop bugzilla for similar bugs (also try with google). If no bugs were already reported, you may want to report a new one:
    5 - Revert to original drivers
    To revert to standard Ubuntu drivers (strongly suggested before an Ubuntu release upgrade) type the following in a prompt shell:
    Code:
    sudo apt-get install ppa-purge
    sudo ppa-purge ppa:oibaf/graphics-drivers
    6 - Requests and suggestions
    Feel free to request new features or propose any suggestions here!

    7 - Support this graphic archive
    If you want to support this drivers archive consider making a donation:


  • #2
    Thanks for putting this PPA together. I just added you PPA to my system instead of xorg-edgers. I like that it defaults to LLVMpipe instead of swrast.

    I'll definitely be donating something if you keep on updating it and if it proves useful when, for example, the Gallium VP8 decoder starts producing useful code and you package this too.

    BTW, has glxgears been updated recently? I see the brightness of the gears constantly alternating between dark and bright, is this intentional?

    Comment


    • #3
      @oibaf

      Why not use

      update-alternative --config gl_conf

      when you use Ubuntu to select the gallium/non-gallium drivers as default? I prefer to compile a snapshot on my own, but basically a nice idea. How do you build the 32 bit mesa libs for a 64 bit system? Since llvm is forced i could not build em...

      Comment


      • #4
        Originally posted by runeks View Post
        Thanks for putting this PPA together. I just added you PPA to my system instead of xorg-edgers. I like that it defaults to LLVMpipe instead of swrast.
        Glad you like it
        I'll definitely be donating something if you keep on updating it and if it proves useful when, for example, the Gallium VP8 decoder starts producing useful code and you package this too.
        That's the plan.
        BTW, has glxgears been updated recently? I see the brightness of the gears constantly alternating between dark and bright, is this intentional?
        Are you sure you are using my mesa packages? This looks like a bug when building mesa with --enable-shared-api :
        https://bugs.freedesktop.org/show_bug.cgi?id=36282
        xorg-edgers packages are building with this flag but I disabled it just to avoid this bug. So I suspect you are still using xorg-edgers packages (they have a higher version then mine because they incorrectly use version numbers like 7.11.0+git..., but since final mesa 7.11 is still not released they should use 7.11.0~git... like mine do).

        To make sure you are running my packages try:
        Code:
        glxinfo | grep OpenGL
        you should see something like:
        Code:
        ...
        OpenGL version string: 2.1 Mesa 7.11-devel (git-fb8786b ubuntu-maverick-graphics-drivers-ppa)
        ...
        If not try
        Code:
        dpkg -l | grep libgl1-mesa-dri
        and if you see a version like:
        Code:
        7.11.0+git20110222.7aeb610f-0ubuntu0sarvatt
        than you are still using xorg-edgers pacakges.
        Then try:
        Code:
        sudo ppa-purge ppa:xorg-edgers/ppa
        to remove it and then make sure you are then using my packages using the glxinfo trick.

        Comment


        • #5
          You are right, there was a package left over after purging xorg-edgers, I had to downgrade it manually and all is fine now.

          Comment


          • #6
            Originally posted by Kano View Post
            @oibaf

            Why not use

            update-alternative --config gl_conf

            when you use Ubuntu to select the gallium/non-gallium drivers as default? I prefer to compile a snapshot on my own, but basically a nice idea.
            Nice idea. Ideally there should be a dri_conf to select between /usr/lib/dri and /usr/lib/dri-alternates (then using the same libGL) but I suppose libGL can't use something like ld.so.conf to configure the dri directory.

            Alternatively gl_conf could be used but the package should build two libGL (and put them in different directory), each one with its own different dri path.

            Actually I base my package on the Ubuntu one and they don't have anything like this. I'd like to not diverge too much from their packaging, but maybe I could take a look at it in the future.

            How do you build the 32 bit mesa libs for a 64 bit system? Since llvm is forced i could not build em...
            I have a 32 bit system and I never did that. I think you should build a 32 bit llvm (I suppose you already built a 32 bit libdrm and installed ia32?).

            Comment


            • #7
              From the PPA desc:

              "--enable-debug flag (to better debug mesa and games bugs)"

              Dude, I'm sorry to tell you, but that's not what this flag does. If you want debug information, you simply compile with "-g" and create debug information files from the resulting build. You should NOT --enable-debug since it enables extra codepaths that hurt performance.

              Comment


              • #8
                PS:
                I only wrote the above because the title says "Updated and Optimized". If you --enable-debug, at least remove the "optimized" part from the title.

                Comment


                • #9
                  Originally posted by RealNC View Post
                  From the PPA desc:

                  "--enable-debug flag (to better debug mesa and games bugs)"

                  Dude, I'm sorry to tell you, but that's not what this flag does. If you want debug information, you simply compile with "-g" and create debug information files from the resulting build.
                  Debug informations are already enabled and are available in -dbg packages. --enable-debug is unrelated to debug symbols and it helped me to find a whole numbers of game and mesa bugs. Just some examples (the ones I still remember right now...) of bug I reported and that were debugged and fixed thanks to this mesa flag:As you can see it proved to be useful

                  You should NOT --enable-debug since it enables extra codepaths that hurt performance.
                  Tests I did didn't show any noticeable performance drop. If you have some other data please let we know.

                  I only wrote the above because the title says "Updated and Optimized". If you --enable-debug, at least remove the "optimized" part from the title.
                  As I wrote in the first thread there are other improvements not available in Ubuntu mesa (only the nouveau in experimental is) that qualify for the "Optimized" word:
                  • support for S3TC texture compression (Recommends included libtxc-dxtn)
                  • support for floating-point textures
                  • llvm support (for faster gallium drivers)
                  • gallium llvmpipe as the default software renderer rather than classic swrast
                  • i915 and nouveau gallium drivers in the experimental package
                  • better package compression with 50% binary size reduction (for faster download)

                  Comment


                  • #10
                    Updates

                    Some status updated for the previous week:

                    Mesa
                    Xserver
                    X drivers
                    • xf86-video-ati: fusion fixes.
                    • xf86-video-intel: fixes.

                    Comment


                    • #11
                      I'm getting some screen freezes using this PPA.
                      It started happening when I added this PPA, then I tried reverting to the standard packages in Natty and it went away. I started using this PPA again yesterday and the freezes are back.

                      What happens is that the screen freezes, nothing updates, but the cursor I am able to move around. I can switch to another VT and restart gdm, which then loads on a new VT and I am able to work again.
                      Also, the freezes usually happen when I perform some action. It can be anything really, opening a new program, clicking something, in other words, they don't happen when the computer sits around doing nothing, it's as if some action triggers it. Usually it's a new window opening, if I recall correctly.

                      Any idea how to debug this?

                      Comment


                      • #12
                        What card/driver are you using?
                        Do you have compiz enabled?
                        Which Ubuntu version are you running?

                        You may want to post the dmesg output and /var/log/Xorg.0.log (the one relative to the freeze). If you have compiz enabled you could try installing only the x driver from this PPA (keeping the Ubuntu mesa) to try to identify the source of the problem (mesa or x driver).

                        Comment


                        • #13
                          OK, I added to the mesa package the patch from fdo bug #35268, which may be related to this problem. Let me know if you are still experiencing it after upgrading to mesa 7.11.0~git1105101331.d6b248 or later.

                          Comment


                          • #14
                            Originally posted by oibaf View Post
                            What card/driver are you using?
                            Do you have compiz enabled?
                            Which Ubuntu version are you running?

                            You may want to post the dmesg output and /var/log/Xorg.0.log (the one relative to the freeze). If you have compiz enabled you could try installing only the x driver from this PPA (keeping the Ubuntu mesa) to try to identify the source of the problem (mesa or x driver).
                            I am using a RV670 (HD3870) with r600g and running Natty with Compiz enabled.

                            Neither dmesg nor the Xorg log seem like much help, here are the relevant lines of dmesg around the crash (the crash happened somewhere around 10500s post boot:
                            Code:
                            [ 7528.128984] usbcore: registered new interface driver snd-usb-audio
                            [10051.040040] usb 4-1: USB disconnect, device number 8
                            [10195.070019] usb 4-1: new full speed USB device number 9 using uhci_hcd
                            [10195.262736] input: www.hirestech.com 2010 REV 1.5 Music Streamer II as /devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.2/input/input5
                            [10195.262831] generic-usb 0003:4852:0003.0004: input,hidraw1: USB HID v1.00 Device [www.hirestech.com 2010 REV 1.5 Music Streamer II] on usb-0000:00:1a.1-1/input2
                            [10195.267839] generic-usb 0003:4852:0003.0005: hiddev0,hidraw2: USB HID v1.00 Device [www.hirestech.com 2010 REV 1.5 Music Streamer II] on usb-0000:00:1a.1-1/input3
                            [10927.569177] r8169 0000:02:01.0: eth0: link down
                            [10929.326813] r8169 0000:02:01.0: eth0: link up
                            Xorg.0.log doesn't seem to have any relevant info either: http://pastebin.com/Qjp2m4UC. The crash seemed to have happened between these two lines in Xorg.0.log:
                            Code:
                            [ 10195.330] (**) Option "xkb_layout" "dk"
                            [ 10562.922] (II) AIGLX: Suspending AIGLX clients for VT switch
                            The first line being when I plugged in a USB DAC (before the freeze happened), and the second line being me switching to VT1 after the freeze has happened.

                            I will try with the updated packages in your PPA. But the bug description in question seems to describe a crash, and all I'm seeing is a freeze.

                            Since I'm using Compiz I think I will try restarting only compiz the next time the freeze happens, to see if this is the program that freezes.

                            If the freeze still happens with your updated packages I'll try to switch out the X driver and mesa driver, one at a time, from your PPA with the one from Natty.

                            Comment


                            • #15
                              hey i test out your ppa

                              i first purge xorg-edgers and then install yours.

                              the good side: HON shows the skins of the cratures/heroes and your ppa works as good as xorg-edgers

                              the general bad but its not your fauld is hon is extremly slow less than 1 fps per second and shadowground suvivor do have the same ALL goes Withe bug as the normal Radeon...

                              Comment

                              Working...
                              X