fglrx on Debian Wheezy (testing)

Packages fglrx-driver and fglrx-glx have been removed from Debian for the last few weeks due to #639875, so I’ve been using the free software Radeon drivers in the meantime. While I appreciate having my virtual terminals display the console at my native screen resolution automatically, I don’t like that I’ve had to put playing Amnesia on hold for a while – these drivers cause the game to segfault.

Today I decided to roll back my xorg version to get the fglrx drivers working again, and as it turns out, it really wasn’t that hard. Here’s how I did it.

  1. Set up a preference control file (eg. /etc/apt/preferences.d/60xorg_rollback_for_fglrx.pref) as follows:
    Package: xserver-xorg
    Pin: version 1:7.6+8
    Pin-Priority: 1001
    Package: xserver-xorg-core xserver-xorg-dev
    Pin: version 2:1.10.4-1
    Pin-Priority: 1001
    Package: xserver-xorg-input-evdev
    Pin: version 1:2.6.0-2+b1
    Pin-Priority: 1001
    Package: xserver-xorg-input-kbd
    Pin: version 1:1.6.0-3
    Pin-Priority: 1001
    Package: xserver-xorg-input-mouse
    Pin: version 1:1.7.1-1
    Pin-Priority: 1001
  2. Now add the following repositories to your apt sources configuration (eg. /etc/apt/sources.list.d/60snapshot-20110911T211512Z.list):
    deb http://snapshot.debian.org/archive/debian/20110911T211512Z/ wheezy main contrib non-free
    deb-src http://snapshot.debian.org/archive/debian/20110911T211512Z/ wheezy main contrib non-free

    These include Xorg package versions that don’t have the ABI change which is incompatible with fglrx.

  3. Normally, Debian will spit out the following error:
    E: Release file for http://snapshot.debian.org/archive/debian/20110911T211512Z/dists/wheezy/InRelease is expired (invalid since 33d 17h 12min 59s). Updates for this repository will not be applied. We fix this by adding an apt configuration file (eg. /etc/apt/apt.conf.d/60ignore_repo_date_check) like so:

    	Check-Valid-Until "false";
  4. We should now be able to resynchronize the package index successfully.
    apt-get update
  5. Log out of your X session (if you haven’t already), and (from a virtual terminal) stop gdm/gdm3/lightdm or anything else that might be responsible for an Xorg server process running. eg,
    /etc/init.d/gdm3 stop
  6. Revert xorg packages to older versions, as defined in our preferences policy.
    apt-get dist-upgrade
  7. Install the fglrx drivers from the snapshot repository.
    apt-get install fglrx-driver fglrx-glx fglrx-control
  8. Make sure Kernel Mode Setting is not enabled. This should (in theory) be handled automatically due to the /etc/modprobe.d/fglrx-driver.conf file created during the fglrx-driver package installation – or at least it seemed to be for me.
  9. Create a new xorg.conf file. Assuming Bash:
    mv /etc/X11/xorg.conf{,.$(date +'%Y%m%d%H%m')}
    aticonfig --initial
  10. Reboot, and you should be presented with some kind of X display manager login screen. If everything went well, you should be able to see the following:
    $ glxinfo | grep -E '(^direct\ |\ glx\ |^GLX\ |^OpenGL)' | grep -v '\ extensions:$'
    direct rendering: Yes
    server glx vendor string: ATI
    server glx version string: 1.4
    client glx vendor string: ATI
    client glx version string: 1.4
    GLX version: 1.4
    OpenGL vendor string: ATI Technologies Inc.
    OpenGL renderer string: AMD Radeon HD 6900 Series  
    OpenGL version string: 4.1.11005 Compatibility Profile Context
    OpenGL shading language version string: 4.10

Update (2011-10-23, 10:14pm): In case it wasn’t clear, these changes are temporary. However that brings up new questions like how will I know when I need to revert these changes? and how do I revert?. Well, the first question is easy to answer – simply run the following command:
$ [ "$(apt-cache policy fglrx-driver | grep -E '^(\ |\*){5}[0-9]+' | wc -l)" -ge 2 ] && echo "fglrx-driver is back - time to upgrade xorg" You can optionally put that in a daily cron job to have it e-mail you when it is time.

Reverting the above changes is also very easy:
$ rm -f /etc/apt/preferences.d/60xorg_rollback_for_fglrx.pref /etc/apt/sources.list.d/60snapshot-20110911T211512Z.list /etc/apt/apt.conf.d/60ignore_repo_date_check
$ apt-get update && apt-get dist-upgrade
followed by a reboot.

15 thoughts on “fglrx on Debian Wheezy (testing)

  1. cygal.myopenid.com/

    Thank you!

    This was incredibly useful. I have been using vesa, a suboptimal resolution for weeks and my laptop was constantly hot.

    Thanks again! It worked for me with debian sid.

    btw, I still had conflicts in aptitude after downgrading the four packages in the preference control file – I selected every one of them and chose to install the oldest version (this included xorg, synaptics, and some xorg video packages).

    1. abolte Post author

      Glad it helped someone – thanks for your feedback.

      Unfortunately, Debian Wheezy just upgraded me to GNOME 3, and I’ve observed that those old fglrx drivers seem to show some corrupted text on occasion – particularly immediately after logging in. I sure hope AMD gets 11.11 out the door soon with a fix.

  2. Jon

    I just tried this, but it only gets me as far as the screen where the login manager should pop up. It just sits with the cursor in a loading animation forever. If I try to use the radeon driver I only get a black screen…

    1. Jon

      Sorry, it works now, thanks a bunch :) Now I only have to deal with my lovely gnome2 being gone…

      (For some reason the fglrx module was compiled for the 3.0 kernel, while I only had the headers for that kernel so I always booted up in the 2.6smth kernel where the fglrx module wasn’t available…)

      1. abolte Post author

        Sweet. Glad you got it going.

        Unfortunately (fortunately?), fglrx 11.11 has been finally released by AMD which fixes the screen corruption. I just finished undoing everything and installing the binary downloaded from the AMD website.

        Some things to note – I kept getting an error from apt-get when trying to upgrade my xorg. I had to run something like aptitude -o APT::Immediate-Configure -f install xserver-xorg to get past it – plain old apt-get didn’t work for me. Secondly, I can’t shutdown cleanly any more. When Xorg is exited, I get a bunch of kernel error text fly past and I have to hit the power button. Thirdly, mplayer causes my X session (Xorg?) to crash, which brings me back to gdm3. I only played around with the driver for 5 minutes before dinner, but it looks like there’s still a *ton* of room for improvement. Maybe things will work a bit better when an official Debian package is thrown together.

  3. Jon

    For the life of me I can’t get the binary installed. I’ve upgraded xorg and reverted all those changes above. Then in the recovery boot the install fails and there is no log where it says there should be one. If I boot up with radeon drivers installed/in use I can complete the gui installer, but after rebooting I can’t do aticonfig –initial because it complains that it cant find the shared library libGL.so.1 even though I have it in several places…

    1. abolte Post author

      Not sure. It’s taken a while, but *finally* fglrx-driver and fglrx-glx are back in the Debian testing repos and are working quite well on my laptop (AMD E-350 APU). Hopefully we won’t need to worry about all this hassle ever again.

  4. Andrea

    Looks like it’s happening again. Running an innocent upgrade of xserver-xorg packages in debian wheezy, I am being prompted to remove all of the fglrx packages. *Of course* I canceled the upgrade…

  5. PsySc0rpi0n

    Is this going to install the latest compatible Xorg version? Or is it going to install the latest version available by the time that this post was created?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.