Wednesday 1 December 2010

Linux from Scratch - Radeon HD 6870

If one has recently purchased an AMD/ATI Radeon HD 6870, one will be pretty fucking pissed off with the lack of linux drivers for the same. However, one can do a bodge job as follows:

cd ~
wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-10-11-x86.x86_64.run
chmod +x ati-driver-installer-10-11-x86.x86_64.run
cd /dev/shm
~/ati-driver-installer-10-11-x86.x86_64.run

Choose to install the driver, not build a package, and don't bother with the expert settings. Now, the problem is that the modules are installed to /usr/lib/xorg/modules and not the LFS default of /usr/lib/X11/modules. I considered farting around with symbolic links to sort everything out, but it turns out that Xorg has a brighter idea. You just add ANOTHER Modules Path to the xorg.conf that you are working with so the files section has:

ModulePath   "/usr/lib/X11/modules"
ModulePath   "/usr/lib/xorg/modules"

You then change the driver from 'intel' or 'vesa' or whatever, to 'fglrx':

Driver      "fglrx"

and bob's your proverbial mother's brother.

8 comments:

  1. Great! You made my day!

    ...one thing. Since i'm running Ubuntu 10.10 which no longer has a xorg.conf by default i had to create one by rebooting to recovery mode, then to go rootshell and enter

    X -configure

    cp /root/xorg.conf.new /etc/X11/xorg.conf


    Regards,
    Maik

    ReplyDelete
  2. Hey Maik.

    I worked out how to install the drivers into a running LiveCD for 10.10. You don't actually need a full xorg.conf. The way that Ubuntu works now is that it automatically fills in any blanks in the .conf file, so it can be as basic as a couple of lines. It works OK for me with a xorg.conf that is as brief as:

    Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    ModulePath "/usr/lib/X11/modules"
    EndSection
    Section "Device"
    Identifier "ATI radeon 6870"
    Driver "fglrx"
    EndSection

    http://justbloodywork.blogspot.com/2010/12/amdati-drivers-for-radeon-hd-6870-on.html

    ReplyDelete
  3. worked nicely for a 6970 too

    ReplyDelete
  4. Very nice thanks a lot.

    Try this post if you have the Watermark issue: http://ubuntuforums.org/showthread.php?t=1614444&page=6

    ReplyDelete
  5. Just a note for people like myself that did a Linux From Scratch version SVN 20110531....Kernel 2.6.37+ dropped the BIG KERNEL LOCK...and apparently the ATI Proprietary Driver installer fails because it relied partly on BKL...so it would seem we will have to use a kernel in the 2.6.36.x line if we want to use the proprietary driver until ATI releases a new version of it. Hope to save some people a headache. I'm thinking I will have to start from scratch since I doubt my libc compiled against the 2.6.39 headers will work properly with the 2.6.36 kernel.

    ReplyDelete
  6. Well nevermind...a few minutes hacking later, I got the proprietary driver to install by manually extracting the content of the .run and editing source code changing #include to #include and changing the SPIN_LOCK_UNLOCKED to __SPIN_LOCK_UNLOCKED(old_style_spin_init) and RW_LOCK_UNLOCKED to __RW_LOCK_UNLOCKED(old_style_rw_init)...commenting out calls to lock_kernel(); and unlock_kernel(); since this is screwing with the 2.6.39 kernel. I also got my ALSA working again using the same code substitutions. Now running happily GNOME 3 with sound and desktop effects :)

    ReplyDelete
  7. sorry the #include statements were sanitized and did dot come out correctly in the previous comment...

    I meant

    #include <linux/smp_lock.h> to be replaced by #include <linux/sched.h>

    ReplyDelete
  8. followed your tutorial but i am confused on some issues ,please help: http://superuser.com/questions/748313/build-centos-rhel-with-lfs-live-cd./.

    ReplyDelete