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.

  • Ragool
    replied
    Originally posted by Pitabred View Post
    With 99%/50%, that means you've got a single thread pegged for decoding 1080p. Since there's no hardware H.264/VC-1 decode acceleration for ATI under Linux yet, if you have a multi-core CPU I'd suggest hitting up mplayerhq.hu for the multithreaded mplayer. I ran into the same problem... if the 720p is smooth, that's almost certainly your problem, and not Xv.
    I missed you post earlier. Will try it out next week and let you know.

    Thanks.

    Regards

    Leave a comment:


  • tormod
    replied
    Originally posted by oibaf View Post
    What about dropping all the packages for Jaunty and older Ubuntu from xorg-edgers PPA? Or you want to keep them for history purposes?
    Yes, we have been thinking about it. But if someone is happily using the last updates we pushed for Hardy or Intrepid, it does not hurt to keep it there. Personally I used the Hardy packages really long on my work machine with r500

    Leave a comment:


  • oibaf
    replied
    Originally posted by tormod View Post
    Anyway, doing on-the-edge testing with a year old distribution does not make sense, so this thread should die anyway. Maybe somebody can unstickify it?
    What about dropping all the packages for Jaunty and older Ubuntu from xorg-edgers PPA? Or you want to keep them for history purposes?

    Leave a comment:


  • bridgman
    replied
    Originally posted by Kjella View Post
    An accelerator could be written using shaders like any GPGPU application but noone's got a working implementation, only a few unfinished summer of code projects. All that could seem busy trying to make 3D acceleration work instead.
    General consensus is that implementing shader-based video decode over Gallium3D makes more sense than doing a hardware-specific implementation for every different GPU family. The current focus on 3D work reflects that :

    Classic 3D => Gallium3D => video decode over Gallium3D

    One thing I haven't had time to check is whether XvMC can be useful for H.264 and VC-1 if only the MC portion of the API were used (ie not IDCT, where the MPEG-2 coefficients definitely won't work). My guess is that XvMC in its current form simply won't fit with the newer video formats, so there's a strong argument for implementing a Gallium3D backend directly in the existing decoder stacks.
    Last edited by bridgman; 09-08-2009, 09:33 AM.

    Leave a comment:


  • Kjella
    replied
    Originally posted by Ragool View Post
    The short story is that it's not the interface that's important but what's powering it. Ranking from best to worst:

    a) Fixed-function hardware
    b) GPU shaders
    c) CPU decoding

    Radeon HAS fixed-function hardware for h.264/vc-1 decoding, but it's not available under Linux because AMD has not, and probably can not release specs. An accelerator could be written using shaders like any GPGPU application but noone's got a working implementation, only a few unfinished summer of code projects. All that could seem busy trying to make 3D acceleration work instead.

    Basically, you'll probably have to wait a long time. It's one of the areas where being closed source helps as nVidia has full fixed-function hardware decoding in their blob.

    Leave a comment:


  • nanonyme
    replied
    Originally posted by Ragool View Post
    Does the current XVideo in this driver have XvMC working with mpeg-2 atleast? Is VA API coming for radeon or is XvMC going to be implemented with XVideo for mpeg4/VC-1?
    No XvMC yet. XvMC is coming at latest as a Gallium3D feature (some day) and I got the impression open drivers would eventually get VDPAU too with Gallium3D. (everyone's free to implement more video decoding API's on Gallium3D if they have spare time)

    Leave a comment:


  • Pitabred
    replied
    Originally posted by Ragool View Post
    works now!
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 7, (OK)

    720p runs full screen with 50%/40% per cpu core, 1080p runs at 99%/50% per core!!

    fglrx used to run 1080p @60%/45% per core. This is also what AMD/ATI promised with the chipset without phenom+1066 RAM. Clearly the XVideo accel needs working on.

    cpu is BE-2350 2.1 ghz with Dell 2408wfp @1920x1200.

    But atleast its mostly working (except audio which appears to be a ffmpeg issue)

    Thanks for your assistance. Please update when XVideo improvements need to be tested. I will be happy to test and report.

    Regards
    With 99%/50%, that means you've got a single thread pegged for decoding 1080p. Since there's no hardware H.264/VC-1 decode acceleration for ATI under Linux yet, if you have a multi-core CPU I'd suggest hitting up mplayerhq.hu for the multithreaded mplayer. I ran into the same problem... if the 720p is smooth, that's almost certainly your problem, and not Xv.

    Leave a comment:


  • Ragool
    replied
    Originally posted by bridgman View Post
    Some of the CPU usage is from the tear-free code waiting for vblank. If you use xvattr to turn off the XV_VSYNC option that will probably cut down your CPU utilization but increase tearing. The rest of the CPU use probably is from decoding, and accelerated decoding (mostly motion comp) would help there.

    The latest driver code has been updated to look for the r600 driver, but that was probably done a bit after the 6.2.1 release.
    Does the current XVideo in this driver have XvMC working with mpeg-2 atleast? Is VA API coming for radeon or is XvMC going to be implemented with XVideo for mpeg4/VC-1?

    I read this but am not clear: http://xorg.freedesktop.org/wiki/RadeonFeature

    Sorry if this is OT in this thread, please point me to the correct one.

    TIA

    Leave a comment:


  • bridgman
    replied
    Some of the CPU usage is from the tear-free code waiting for vblank. If you use xvattr to turn off the XV_VSYNC option that will probably cut down your CPU utilization but increase tearing. The rest of the CPU use probably is from decoding, and accelerated decoding (mostly motion comp) would help there.

    The latest driver code has been updated to look for the r600 driver, but that was probably done a bit after the 6.2.1 release.

    Leave a comment:

Working...
X