Results 1 to 10 of 23

Thread: RadeonHD open-source 3D Guide (EXPERIMENTAL)

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Beans
    14,788

    RadeonHD open-source 3D Guide (EXPERIMENTAL)

    PURPOSE AND OVERVIEW
    ----------------------------------------
    - This guide is for people who want to try the latest open-source, hardware-accelerated 3D code on their ATI RadeonHD (R600/R700) GPU. At the time of this writing, the r600 mesa driver only supports OpenGL 1.4, DO NOT expect 3D performance gains or extra features over fglrx/Catalyst drivers (though the open-source drivers may work better in other areas).
    - I have personally used this guide (successfully) on Ubuntu 9.04, Ubuntu 9.10, and Debian sid(ux).
    ----------------------------------------

    STATUS OF SOME 3D PROGRAMS
    ----------------------------------------
    Reference: http://wiki.x.org/wiki/radeonhd%3Aexperimental_3D
    Code:
    # googleearth: runs ok, start this program from the terminal with vblank_mode=0 (thanks to John Bridgman @ AMD for the tip)
    # glxgears: runs, I get ~1800fps on a RadeonHD4550, (glxgears isn't a good benchmark to compare different systems because of its CPU dependence)
    # neverball: runs, nice!
    # savage2: doesn't run,
        * Savage2 - Fatal Error: OpenGL 2.0 not available.
        * Savage2 - Fatal Error: Segmentation Fault
        * Segmentation fault (core dumped) 
    # ETQW: doesn't run;
        * ERROR: The current video card / driver combination does not support the necessary features: GL_ARB_occlusion_query 
    # sauerbraten: starts, switches to graphics mode, starts initialize shaders and hangs after a while (Alt-SysRq-B only works)
    # trophy: runs, playable, ok
    # tremulous: works, playable, fast! 
    # compiz: starts and runs, most effects work (blur may not), gnome-terminal suffers from invisible characters (I personally have not noticed this)
    # openarena: works, playable, fast, ok!
    ----------------------------------------


    ISSUES/DISCLAIMER
    ----------------------------------------
    - DO NOT do this on production systems. You probably shouldn't do this on your main install if borking it would be a huge problem for you. I wouldn't even recommend this to anyone but those that like to experiment and don't mind if their install gets messed up. BOTTOM LINE: Please don't send me angry PM's if this screws up your system.
    - This guide overwrites Ubuntu's default mesa install. I believe there is a way to keep the git code and the Ubuntu stuff separate (suggestions welcome).
    - A special note for LAPTOP and owners of PASSIVELY-cooled GPU's: The open-source drivers currently only have limited dynamic power management. This can cause your GPU to run significantly warmer than it would with the proprietary drivers, which use AMD/ATI's PowerPlay technology for dynamic volting/clocking. (The open-source devs are currently working on implementing PowerPlay features, but they face a lack of documentation on this feature). BOTTOM LINE: You've been warned. Please don't send me angry PM's if this burns up your GPU.
    ----------------------------------------


    PURGING PROPRIETARY DRIVERS (skip to the next section if you've never installed fglrx/Catalyst on your system)
    ----------------------------------------
    - Previous or current installations of ATI's proprietary Catalyst/fglrx drivers are known to interfere with the installation of the open-source drivers. If you manually downloaded and installed drivers from AMD/ATI, run the following command first:
    Code:
    sudo sh /usr/share/ati/fglrx-uninstall.sh
    - Now purge the Ubuntu fglrx packages (you WILL lose any custom configuration settings of these packages):
    Code:
    sudo apt-get purge xorg-driver-fglrx fglrx-amdcccle fglrx-kernel-source xorg-driver-fglrx-dev
    - This command is necessary to replace some proprietary libraries that fglrx leaves behind.
    Code:
    sudo apt-get --reinstall install libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
    - Finally, use this command to make sure you have a "clean" xorg.conf file (and back up your existing one)
    Code:
    sudo dpkg-reconfigure -phigh xserver-xorg
    - If you had special options for your input devices in your previous xorg.conf, you'll probably want to put them in the new one. At this point, restart your system and make sure you get the correct resolution and direct rendering works (look at /var/log/Xorg.0.log if you're unsure).
    ----------------------------------------


    PREREQUISITES
    ----------------------------------------
    - Before you begin, make sure your package information and system are updated.
    Code:
    sudo apt-get install linux-headers-`uname -r` freeglut3-dev x11proto* xutils-dev autoconf libltdl7-dev libpciaccess-dev libdrm-dev git-core gawk xorg-dev libgl1-mesa-dev pciutils-dev libglu1-mesa-dev pkg-config
    - Before you build the DRM kernel modules, I suggest you back up your existing ones:
    Code:
    cd /lib/modules/`uname -r`/kernel/drivers/gpu/drm/
    cp drm.ko radeon/radeon.ko ~/
    cd ~/
    tar -czf drm-modules.tar.gz drm.ko radeon.ko
    ----------------------------------------

    GETTING A RECENT 2D/MODESETTING DRIVER
    ----------------------------------------
    You can either use the ati/radeon or radeonhd driver. I prefer to use https://help.ubuntu.com/community/RadeonHD
    ----------------------------------------

    ALEX DEUCHER's (aka agd5f) DRM, INITIAL BUILD
    ----------------------------------------
    Code:
    cd /opt
    sudo git clone git://anongit.freedesktop.org/~agd5f/drm
    cd drm
    sudo git checkout -t -b r6xx-r7xx-3d origin/r6xx-r7xx-3d
    sudo ./autogen.sh --prefix=$(pkg-config --variable=prefix libdrm) --libdir=$(pkg-config --variable=libdir libdrm) --includedir=$(pkg-config --variable=includedir libdrm)
    sudo make
    sudo make install
    cd linux-core/
    sudo make radeon.o drm.o
    sudo make install
    sudo cp drm.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/
    sudo cp radeon.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/radeon
    sudo depmod -a
    ----------------------------------------

    MESA, INITIAL BUILD
    ----------------------------------------
    - In this guide, we only build the Mesa software rasterizer (to fall back on) and the r600 DRI 3D module for r600/r700 cards (and should include r800 cards in the future). We do this to speed compilation significantly. If you need other DRI drivers, be sure to build/install them by either adding them to the --with-dri-drivers list or omitting that flag completely to build all available DRI drivers.
    Code:
    sudo mv /usr/lib/pkgconfig/libdrm_radeon.pc /usr/lib/pkgconfig/libdrm_radeon.pc.copy #It's okay if you get file not found
    cd /opt
    sudo git clone git://anongit.freedesktop.org/mesa/mesa
    cd mesa
    sudo ./autogen.sh --with-dri-drivers=swrast,r600 --libdir=/usr/lib/ --includedir=$(pkg-config --variable=includedir dri) --disable-gallium --disable-egl --enable-debug
    sudo make
    sudo make install
    TRYING IT OUT
    - For some reason, I find this necessary after everything is built:
    Code:
    cd /opt/drm
    sudo make install
    cd /opt/mesa
    sudo make install
    - Now you can restart your system and check glxinfo.
    Code:
    glxinfo | grep renderer
    Should report 'Mesa DRI R600...'. (If you see 'Software Rasterizer', something went wrong; check your /var/log/Xorg.0.log). Hopefully, all is well and you can enjoy 3D stuff.
    ----------------------------------------


    UPDATING DRM
    ----------------------------------------
    Check this page to see if any updates have been pushed since you last built it: http://cgit.freedesktop.org/~agd5f/drm/?h=r6xx-r7xx-3d
    Code:
    cd /opt/drm
    sudo git pull
    sudo make clean
    sudo make install
    cd linux-core/
    sudo make clean
    sudo make radeon.o drm.o
    sudo cp drm.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/
    sudo cp radeon.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/radeon
    sudo depmod -a
    ----------------------------------------

    UPDATING MESA
    ----------------------------------------
    - Mesa is under heavy development and is being updated very frequently: http://cgit.freedesktop.org/mesa/mesa/ Before you report a bug, make sure your copy is updated.
    - Remember to modify --with-dri-drivers flag to your needs (like in the initial build)
    Code:
    cd /opt/mesa
    sudo git pull
    sudo make clean
    sudo mv /usr/lib/pkgconfig/libdrm_radeon.pc /usr/lib/pkgconfig/libdrm_radeon.pc.copy #Again, the file may not exist
    sudo ./autogen.sh --with-dri-drivers=swrast,r600 --libdir=/usr/lib --includedir=$(pkg-config --variable=includedir dri) --disable-gallium --disable-egl --enable-debug
    sudo make
    sudo make install
    ----------------------------------------

    TODO
    ----------------------------------------
    A reverting procedure for people who want to go back to Ubuntu defaults.
    Last edited by Yellow Pasque; October 13th, 2009 at 10:28 AM.

  2. #2
    Join Date
    Jun 2007
    Beans
    14,788

    Re: RadeonHD open-source 3D Guide (EXPERIMENTAL)

    There is currently an issue when building Mesa from git because of this commit: http://cgit.freedesktop.org/mesa/mes...a090a9f37e7c05
    I worked around the issue by opening the configure.ac file in a text editor. Towards the top, you'll see:
    Code:
    LIBDRM_REQUIRED=2.4.15
    Change it to:
    Code:
    LIBDRM_REQUIRED=2.4.3
    Re-run autogen.sh after you make the change.

    EDIT: The newer version of libdrm is only required for intel GPU's.
    Last edited by Yellow Pasque; October 14th, 2009 at 07:13 PM.

  3. #3
    Join Date
    Jun 2007
    Beans
    14,788

    Re: RadeonHD open-source 3D Guide (EXPERIMENTAL)

    Edit: Nvm
    Last edited by Yellow Pasque; October 3rd, 2009 at 07:44 PM.

  4. #4
    Join Date
    Feb 2007
    Beans
    121

    Re: RadeonHD open-source 3D Guide (EXPERIMENTAL)

    Looks promising, kinda surprised there aren't any replies as of yet. However, I cannot seem to get compiz going with this...

    1. What does your xorg.conf look like?

    2. The parameters libdir and includedir didn't want to work when I ran this command... sudo ./autogen.sh --with-dri-drivers=swrast,r600 --libdir=/usr/lib --includedir=$(pkg-config --variable=includedir dri) --disable-gallium --disable-egl --enable-debug

    3. FYI, I had to sudo this command to make it work: git clone git://anongit.freedesktop.org/mesa/mesa

  5. #5
    Join Date
    Jun 2007
    Beans
    14,788

    Re: RadeonHD open-source 3D Guide (EXPERIMENTAL)

    1.
    Code:
    Section "Device"
    	Identifier	"Configured Video Device"
    	Driver   "radeonhd"
            Option   "DRI"
            Option   "AccelMethod"  "EXA"
    EndSection
    
    Section "Monitor"
    	Identifier	"Configured Monitor"
    EndSection
    
    Section "Screen"
    	Identifier	"Default Screen"
    	Monitor		"Configured Monitor"
    	Device		"Configured Video Device"
    EndSection
    
    Section "DRI"
            Mode         0666
    EndSection
    
    Section "ServerFlags"
            Option     "DontZap"       "false"   #Allows Ctrl-Alt-Backspace to reset X server
    EndSection
    2. What is the output/error when you do that?

    3. Fixed. Thanks.

  6. #6
    Join Date
    Aug 2007
    Location
    Roma, Italy
    Beans
    40
    Distro
    Ubuntu Karmic Koala (testing)

    Unhappy Re: RadeonHD open-source 3D Guide (EXPERIMENTAL)

    Thanks for the guide, I'm really looking forward to try it. At the moment, I'm stuck at compiling drm.o, it seems the developer is just a little bit heedless: I've got a whole load of errors in "drm_pciids.h", something like this:
    Code:
    ...
    /opt/drm/linux-core/drm_pciids.h:1476: error: expected identifier or ‘(’ before ‘{’ token
    /opt/drm/linux-core/drm_pciids.h:1476: error: expected identifier or ‘(’ before ‘,’ token
    /opt/drm/linux-core/drm_pciids.h:1485: error: expected identifier or ‘(’ before ‘{’ token
    /opt/drm/linux-core/drm_pciids.h:1485: error: expected identifier or ‘(’ before ‘,’ token
    ...
    I checked those lines in the file, and although I'm definitely NOT a C guru, it seems to be ok. Here's an example of buggy code lines:
    Code:
        {0x10DE, 0x009C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, NV40}, \
        {0x10DE, 0x009C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, NV40}, \
        {0x10DE, 0x009D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, NV40}, \
        {0x10DE, 0x009D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, NV40}, \
        {0x10DE, 0x009E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, NV40}, \
    Can anyone help me? Do anyone other experience this problem? Thank you in advance!

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
  •