Announcement

Collapse
No announcement yet.

Installing latest Open Source ATI drivers under Ubuntu 8.04

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

  • Installing latest Open Source ATI drivers under Ubuntu 8.04

    NOTE: Ubuntu 8.10 already have all these updated drivers. Compiz is also supported (up to R500).
    • if you have some problem after upgrading to 8.10, make sure to remove all packages installed from the PPAs while in Ubuntu 8.04 with dpkg (ignoring eventual dependencies) and, before rebooting, reinstall all these packages from 8.10 official repositories with apt-get;
    • if compiz still isn't working, make sure you have compiz and compiz-gnome packages installed.


    WARNING: the following guide is no longer actively supported. Please upgrade to Ubuntu 8.10 if you need updated radeon drivers.


    This is a quick guide on installing latest versions of open source radeon drivers for Ubuntu 8.04.

    0 - Introduction and status
    • This guide uses prebuilt - by the Ubuntu community - packages for mesa, libdrm, xserver-xorg-video-radeonhd, xserver-xorg-video-ati, so that they can be easily replaced with original ones if you want to revert this.
    • DRM modules are built and installed from sources using a script. Old ones are backupped with .orig extension.
    • Keep in mind that this is experimental code. If you fear to break something don't try it. Anyway, it works well for many users. Ideally, you should first try these packages on the LiveCD, following HowTo test newest radeon/radeonhd/mesa from a live CD guide.
    • Driver packages status:
      • ati (radeon):
        • all Radeon card should be supported
        • fast 2D with Option "AccelMethod" "EXA" in xorg.conf (require DRM module)
        • 3D support
        • basic scalers (for full screen games in not native resolution) support
        • textured video Xv support with bicubic filtering
        • DynamicClocks (but not Powerplay) power saving support
      • radeonhd:
        • all Radeon card from Radeon X1xxx (R500) and later should be supported
        • fast 2D with Option "AccelMethod" "ShadowFB" in xorg.conf (XAA and EXA are slower; DRM module not required)
        • experimental, disabled by default 3D support
        • configurable scalers (for full screen games in not native resolution) support
        • Xv not yet supported
        • power savings not yet supported
    • 3D packages status:
      • all Radeon card <R600 (so, not Radeon HD 2XXX) should be supported.
      • See RadeonProgram WikiPage for the status of many games with current code.
      • AIGLX (and therefore Compiz) is not supported when using mesa 7.1 packages unless you also upgrade your xserver (for example using packages at PPA for xorg crack pushers: enable the repository and do a sudo apt-get dist-upgrade - WARNING: this is untested and may break your system, see also comment 20 and laters)
    • Feature Matrix for Radeons Wiki Page
    • Supported Program List for Radeons Wiki Page

    1 - Installing latest 2D ati and radeonhd drivers
    • Add
      Code:
      deb http://ppa.launchpad.net/tormodvolden/ubuntu hardy main
      to System -> Administration -> Software sources -> Third party software
    • In a shell (one or both of the followings, depending on your desired driver):
      Code:
      sudo apt-get install xserver-xorg-video-radeon xserver-xorg-video-ati
      sudo apt-get install xserver-xorg-video-radeonhd
    • Disable
      Code:
      deb http://ppa.launchpad.net/tormodvolden/ubuntu hardy main
      in System -> Administration -> Software sources -> Third party software

    2 - Installing latest drm modules
    1. Add
      Code:
      deb-src http://ppa.launchpad.net/xorg-edgers/ubuntu hardy main
      to System -> Administration -> Software sources -> Third party software
    2. In a shell:
      Code:
      apt-get source libdrm2
    3. Disable
      Code:
      deb-src http://ppa.launchpad.net/xorg-edgers/ubuntu hardy main
      in System -> Administration -> Software sources -> Third party software
    4. Download easy-drm-modules-installer from here and put it in the same directory of the libdrm2 sources:
      http://bazaar.launchpad.net/~xorg-ed...kg-tools/files
    5. In a shell:
      Code:
      chmod +x easy-drm-modules-installer
      ./easy-drm-modules-installer radeon
      Answer N when asked to download newest git version and y when asked to install (backup of original modules will be created in
      Code:
      /lib/modules/`uname -r`/kernel/drivers/char/drm
      directory with .orig extension).
    6. Note that after every kernel upgrade and its reboot you should redo this step.

    3 - Upgrading to latest libdrm and mesa packages
    1. Remember that after installing the following mesa 7.1 packages AIGLX (and therefore Compiz) will not work (obliviously this is not a problem on R500 where Compiz never worked before), unless you also upgrade your xserver. If you have already working 3D and Compiz or you have a RS480 or RS690 with 3D or Compiz broken try first the updated mesa 7.0 packages at PPA for Andrius Štikonas that should also work with AIGLX/Compiz.
    2. Add
      Code:
      deb http://ppa.launchpad.net/xorg-edgers/ubuntu hardy main
      to System -> Administration -> Software sources -> Third party software
    3. In a shell:
      Code:
      sudo apt-get install libdrm2
      sudo apt-get install libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa mesa-utils
      This should upgrade all libdrm and mesa libraries.
    4. Disable
      Code:
      deb http://ppa.launchpad.net/xorg-edgers/ubuntu hardy main
      in System -> Administration -> Software sources -> Third party software

    4 - Customize your "Device" section of /etc/X11/xorg.conf
    • ati (radeon) driver fully supports 3D and EXA acceleration:
      Code:
      Section "Device"
              Identifier      "Configured Video Device"
              Driver          "ati"
              Option          "AccelMethod"   "EXA"
      EndSection
    • if you want to use radeonhd driver (note that in radeonhd XAA and EXA are a lot slower than ShadowFB AccelMethod):
      Code:
      Section "Device"
              Identifier      "Configured Video Device"
              Driver          "radeonhd"
              Option          "AccelMethod"   "ShadowFB"
              # Un-comment the following to enable experimental 3D support:
              #Option         "DRI"
      EndSection

    5 - Reboot

    6 - Test
    1. You can test 2D performance with gtkperf (download and install the "Debian i386" packages if you are on x86)
    2. If you installed also 3D packages, to make sure you really are using 3D try running glxgears. This is what I get:
      Code:
      glxgears
      9787 frames in 5.0 seconds = 1957.329 FPS
      9890 frames in 5.0 seconds = 1977.899 FPS
    3. Testing openarena:
      Install it from Ubuntu repositories:
      Code:
      sudo apt-get install openarena
      Edit openarena settings (under SETUP -> SYSTEM) to your taste; I only changed "Graphics Settings" to "Very High Quality" and "Video Mode" to "1024x768", then quit and download the demo:
      Code:
      mkdir -p $HOME/.openarena/baseoa/demos
      cd $HOME/.openarena/baseoa/
      wget http://people.freedesktop.org/~anholt/benchmarking/anholt.cfg
      cd demos/
      wget http://people.freedesktop.org/~anholt/benchmarking/anholt.dm_68
      To execute the test:
      Code:
      openarena +exec anholt 2>&1 | egrep -e '[0-9]+ frames'
      On my RV530 with "Very High Quality" setting I get a very nice :
      Code:
      840 frames 13.6 seconds 61.9 fps 7.0/16.2/31.0/3.6 ms

    7 - For more info:
    8 - Suggestions welcomed
    • If you have some useful suggestions post a reply in this thread!
    Last edited by oibaf; 10-27-2008, 01:10 PM.

  • #2
    That's great... thanks.

    Although, I would really like to see a guide on how to install the radeon driver from git, because there already exists one for radeonhd, here at Phoronix. From personal expereince I know that the steps from the radeonhd guide don't exactly work for radeon because it required some other devel packages to be installed.
    Last edited by sundown; 05-20-2008, 03:31 PM.

    Comment


    • #3
      Thanks for the guide. I did this before "manually", but I never got 3D to work, so I decided to give this method a try.

      I followed the instructions, and 2D works normally, but I get this from glxgears:

      ~$ glxgears
      unknown chip id 0x7145, can't guess.
      libGL error: InitDriver failed
      libGL error: reverting to (slow) indirect rendering
      Error: couldn't get an RGB, Double-buffered visual

      Some more output below from glxinfo with LIBGL_DEBUG. I have an x1400, I guess I need to add my chip id somewhere... This is the same problem I've had before.

      libGL: XF86DRIGetClientDriverName: 5.3.0 r300 (screen 0)
      libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/r300_dri.so
      drmOpenDevice: node name is /dev/dri/card0
      drmOpenDevice: open result is 4, (OK)
      drmOpenByBusid: Searching for BusID pci:0000:01:00.0
      drmOpenDevice: node name is /dev/dri/card0
      drmOpenDevice: open result is 4, (OK)
      drmOpenByBusid: drmOpenMinor returns 4
      drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
      unknown chip id 0x7145, can't guess.
      libGL error: InitDriver failed
      libGL error: reverting to (slow) indirect rendering

      Comment


      • #4
        elenius, if you have a 5xx family card you'll probably need to add the IDs yourself.

        Right now the IDs in the 500-support branch pretty much represent the cards owned by developers working on the code

        Comment


        • #5
          Right. I don't mind getting my hands dirty. I'm trying to figure out which branch of Mesa to check out and how to get it. The main one doesn't have any R500 chip ids, so I assume that's not what I want.

          This article

          http://www.phoronix.com/scan.php?pag...item&px=NjQ1Ng

          mentions an r500-support branch in Mesa. Is that what i want? I tried

          git clone git://anongit.freedesktop.org/git/mesa/mesa

          followed by

          cd mesa; git checkout r500-support

          but that didn't do it. Obviously, I'm just guessing here.

          Comment


          • #6
            The 500-support branch in mesa is the right one. Not sure about the exact git commands to pull from a branch but may have time to tinker today. Best bet would be to hop onto the #radeon IRC channel and ask there since that's where most of the 5xx 3D discussion is happening. Alex is away for a few days but airlied and MostAwesomeDude have been making huge progress on the remaining fragment shader work and Mr Cooper and airlied have been working on some vblank issues. It's looking pretty good !

            Comment


            • #7
              Hi oibaf,

              thanks for your How-to, unfortunately i can't seem to get it work on my Thinkpad T60p. I followed *exactly* your instructions and here is what i get:

              Code:
              #/var/log/Xorg.0.log|grep RADEONHD
              ....
              (--) RADEONHD(0): Detected an M66 on a Lenovo Thinkpad T60p V5250
              (II) RADEONHD(0): Mapped IO at 0xb7ae4000 (size 0x00010000)
              (II) RADEONHD(0): Getting BIOS copy from legacy VBIOS location
              (II) RADEONHD(0): ATOM BIOS Rom: 
              	SubsystemVendorID: 0x1002 SubsystemID: 0x71c4
              	IOBaseAddress: 0x2000
              	Filename: BR25044.BIN 
              	BIOS Bootup Message: 
              Lenovo M56/M66CSP256GL ATOM BIOS 400e/330m LCD/CRT/DFP/TV                   
              
              (II) RADEONHD(0): Analog TV Default Mode: 135075026
              (--) RADEONHD(0): VideoRAM: 262144 kByte
              (II) RADEONHD(0): Framebuffer space used by Firmware (kb): 20
              (II) RADEONHD(0): Start of VRAM area used by Firmware: 0xfffb000
              (II) RADEONHD(0): AtomBIOS requests 20kB of VRAM scratch space
              (II) RADEONHD(0): AtomBIOS VRAM scratch base: 0xfffb000
              (II) RADEONHD(0): Default Engine Clock: 432000
              (II) RADEONHD(0): Default Memory Clock: 330000
              (II) RADEONHD(0): Maximum Pixel ClockPLL Frequency Output: 1100000
              (II) RADEONHD(0): Minimum Pixel ClockPLL Frequency Output: 0
              (II) RADEONHD(0): Maximum Pixel ClockPLL Frequency Input: 13500
              (II) RADEONHD(0): Minimum Pixel ClockPLL Frequency Input: 1000
              (II) RADEONHD(0): Maximum Pixel Clock: 400000
              ....
              Code:
              $glxinfo
              name of display: :0.0
              display: :0  screen: 0
              direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
              server glx vendor string: SGI
              server glx version string: 1.2
              server glx extensions:
                  GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
                  GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
                  GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe, 
                  GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
              client glx vendor string: SGI
              client glx version string: 1.4
              client glx extensions:
                  GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
                  GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory, 
                  GLX_MESA_copy_sub_buffer, GLX_MESA_swap_control, 
                  GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_OML_sync_control, 
                  GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
                  GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
                  GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
              GLX version: 1.2
              GLX extensions:
                  GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
                  GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
                  GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGIS_multisample, 
                  GLX_SGIX_fbconfig, GLX_EXT_texture_from_pixmap
              OpenGL vendor string: Mesa project: www.mesa3d.org
              OpenGL renderer string: Mesa GLX Indirect
              OpenGL version string: 1.4 (2.1 Mesa 7.0.3-rc2)
              ...
              Code:
              #cat /etc/X11/xorg.conf
              Section "InputDevice"
              	Identifier	"Generic Keyboard"
              	Driver		"kbd"
              	Option		"XkbRules"	"xorg"
              	Option		"XkbModel"	"pc105"
              	Option		"XkbLayout"	"de"
              EndSection
              
              Section "InputDevice"
              	Identifier	"Configured Mouse"
              	Driver		"mouse"
              EndSection
              
              Section "Device"
              	Identifier	"Configured Video Device"
              	Driver		"radeonhd"
              	Option		"AccelMethod"	"EXA"
              EndSection
              
              Section "Monitor"
              	Identifier	"Configured Monitor"
              EndSection
              
              Section "Screen"
              	Identifier	"Default Screen"
              	Monitor		"Configured Monitor"
              EndSection
              any clues? what am i doing wrong?

              Thanks!
              tzu

              Comment


              • #8
                Originally posted by tzu23 View Post
                Hi oibaf,

                thanks for your How-to, unfortunately i can't seem to get it work on my Thinkpad T60p. I followed *exactly* your instructions and here is what i get:


                any clues? what am i doing wrong?

                Thanks!
                tzu
                I don't see nothing wrong in what you post. If your problem is that you don't have 3D, you should use the ati driver, as now it's not yet supported in radeonhd as stated in section 0.

                Edit: also, it appears that you didn't upgraded mesa libraries:
                Code:
                OpenGL version string: 1.4 (2.1 Mesa 7.0.3-rc2)
                you should see
                Code:
                OpenGL version string: 1.3 Mesa 7.1
                And also remeber that radeonhd with EXA acceleration is very very slow. If you want to use radeonhd you should use ShadowFB. Or if you want use EXA you have to use ati driver.
                Last edited by oibaf; 05-23-2008, 11:25 AM.

                Comment


                • #9
                  Originally posted by oibaf View Post
                  I don't see nothing wrong in what you post. If your problem is that you don't have 3D, you should use the ati driver, as now it's not yet supported in radeonhd as stated in section 0.
                  Thanks for the quick reply!
                  Sorry, i'm not that familiar with that. What 'section 0' do you refer to? My T60p has an ATI r500 Chip:
                  Code:
                  M66: Mobility Radeon X1700, X1700 XT; FireGL V5250
                  Originally posted by oibaf View Post
                  Edit: also, it appears that you didn't upgraded mesa libraries:
                  Code:
                  OpenGL version string: 1.4 (2.1 Mesa 7.0.3-rc2)
                  you should see
                  Code:
                  OpenGL version string: 1.3 Mesa 7.1
                  that's strange indeed:
                  Code:
                  #dpkg -l |grep mesa
                  ii  libgl1-mesa-dev                            7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  A free implementation of the OpenGL API -- G
                  ii  libgl1-mesa-dri                            7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  A free implementation of the OpenGL API -- D
                  ii  libgl1-mesa-glx                            7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  A free implementation of the OpenGL API -- G
                  ii  libglu1-mesa                               7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  The OpenGL utility library (GLU)
                  ii  libglu1-mesa-dev                           7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  The OpenGL utility library -- development fi
                  ii  mesa-common-dev                            7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  Developer documentation for Mesa
                  ii  mesa-utils                                 7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  Miscellaneous Mesa GL utilities
                  i'll have to dig further on this one

                  Greetings,
                  tzu

                  Comment


                  • #10
                    Originally posted by tzu23 View Post
                    Thanks for the quick reply!
                    Sorry, i'm not that familiar with that. What 'section 0' do you refer to?
                    Section 0 of my first post: 0 - Introduction and status

                    that's strange indeed:
                    Code:
                    #dpkg -l |grep mesa
                    ii  libgl1-mesa-dev                            7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  A free implementation of the OpenGL API -- G
                    ii  libgl1-mesa-dri                            7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  A free implementation of the OpenGL API -- D
                    ii  libgl1-mesa-glx                            7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  A free implementation of the OpenGL API -- G
                    ii  libglu1-mesa                               7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  The OpenGL utility library (GLU)
                    ii  libglu1-mesa-dev                           7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  The OpenGL utility library -- development fi
                    ii  mesa-common-dev                            7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  Developer documentation for Mesa
                    ii  mesa-utils                                 7.1.0~git20080523+r500-support.9ab7a2df-0.1tormod  Miscellaneous Mesa GL utilities
                    i'll have to dig further on this one

                    Greetings,
                    tzu
                    Did you reboot after mesa installation?

                    Comment


                    • #11
                      Originally posted by oibaf View Post
                      Section 0 of my first post: 0 - Introduction and status
                      oh...

                      i changed to 'radeon' and it works now! glxinfo even shows: OpenGL version string: 1.3 Mesa 7.1.
                      Though i find it odd, that when i change back to radeonhd, glxinfo shows the old mesa version.

                      Anyway, thanks for the help!
                      tzu

                      Comment


                      • #12
                        I think that makes sense. DRI support for radeonhd is in a side branch, not master, so you're probably falling back to software rendering with radeonhd right now.

                        If you *really* want to live dangerously, you could try Matthias's radeonhd repo with DRI support along with drm master and mesa r500-support.

                        I think there's a Phoronix article with details.

                        Comment


                        • #13
                          I tried the above post in #1 for a R420 card just for the helluva it on ubuntu 8.04.

                          It semi-works, im getting 5000+ fps in glxgears, and that openarena bencmark is gibing 100+ fps, but aiglx now seems to be screwed?

                          (EE) AIGLX error: dlsym for __driCreateNewScreen_20050727 failed (/usr/lib/dri/r300_dri.so: undefined symbol: __driCreateNewScreen_20050727)
                          (EE) AIGLX: reverting to software rendering

                          glxinfo says:
                          OpenGL vendor string: DRI R300 Project
                          OpenGL renderer string: Mesa DRI R300 20060815 AGP 8x x86/MMX+/3DNow!+/SSE2 TCL
                          OpenGL version string: 1.3 Mesa 7.1

                          Im guessing my r300_dri.so is wrong?

                          ls -al /usr/lib/dri/r300_dri.so
                          -rw-r--r-- 1 root root 2233076 2008-05-25 16:38 /usr/lib/dri/r300_dri.so

                          Comment


                          • #14
                            Originally posted by grazzt View Post
                            I tried the above post in #1 for a R420 card just for the helluva it on ubuntu 8.04.

                            It semi-works, im getting 5000+ fps in glxgears, and that openarena bencmark is gibing 100+ fps, but aiglx now seems to be screwed?

                            (EE) AIGLX error: dlsym for __driCreateNewScreen_20050727 failed (/usr/lib/dri/r300_dri.so: undefined symbol: __driCreateNewScreen_20050727)
                            (EE) AIGLX: reverting to software rendering

                            glxinfo says:
                            OpenGL vendor string: DRI R300 Project
                            OpenGL renderer string: Mesa DRI R300 20060815 AGP 8x x86/MMX+/3DNow!+/SSE2 TCL
                            OpenGL version string: 1.3 Mesa 7.1

                            Im guessing my r300_dri.so is wrong?

                            ls -al /usr/lib/dri/r300_dri.so
                            -rw-r--r-- 1 root root 2233076 2008-05-25 16:38 /usr/lib/dri/r300_dri.so
                            Hi, this is a know limitation. To "fix" this you should upgrade your xserver to a git version. Packages can be found here (WARNING: THESE PACKAGES APPEARS TO BE VERY EXPERIMENTAL AND MAY BROKE YOUR SYSTEM):
                            https://edge.launchpad.net/~xorg-edgers/+archive

                            See also the post of airlied:
                            http://airlied.livejournal.com/60149.html

                            I'll add this info on first post.

                            Comment


                            • #15
                              Thanks for the quick response.

                              And youre right, it may break your system, it did with me. Well, compiz+cube running glxgears doesnt work well together.

                              Comment

                              Working...
                              X