Saturday, October 22, 2011

Manually removing fglrx from Ubuntu

If you use Gnome Shell on Ubuntu 11.10 and tried to use the proprietary fglrx driver for your Radeon hardware, you might have problems with rendering glitches.

Strangely, Unity seems unaffected although Unity and Gnome Shell both use desktop effects. It must be something in the way Gnome Shell does it that Compiz doesn't.

Anyway, the usual method of installing proprietary drivers using Ubuntu's Jockey works but uninstalling proprietary drivers doesn't work at least for fglrx. On my computer I can't even run Unity 2D afterwards. Gnome Shell, at least, runs in fallback mode but it's not pretty.

So here's how to manually remove fglrx (using terminal, of course):

~$ sudo apt-get purge xorg-driver-fglrx
~$ sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri
~$ sudo dpkg-reconfigure xserver-xorg
~$ sudo apt-get install --reinstall xserver-xorg-core

Reboot and you should now be back to the open source driver for your Radeon GPU. Gnome Shell should also be able to run without glitches.


These instructions are gleaned from the Ubuntu wiki. If it doesn't work there's an even more aggresive version that you could try.

If you installed fglrx from AMD's website instead, then you might want to try the following instead.

~$ sudo sh /usr/share/ati/fglrx-uninstall.sh

As above, reboot and you should be back to the open source drivers.

8 comments:

  1. thanks very much. This fixed my libGL problems for me!

    ReplyDelete
  2. Glad you found this useful, svaens :-)

    ReplyDelete
  3. when i type in sudo apt-get purge xorg-driver-fglrx it comes back with "[sudo] password for jacob:" (jacob being my user name for ubuntu) then terminal wont let me type anything anymore

    ReplyDelete
  4. @J T

    You're supposed to type your password. It won't show anything there just know that it's still accepting keyboard input. Just type your password then press ENTER ;-)

    ReplyDelete
  5. Very good stuff! I just used this method for 12.04 alpha and it worked great. I didn't uninstall xorg-driver-fglrx because the system wouldn't allow for it, rooted or not. Anyways, good job.

    ReplyDelete
  6. I came across this problem when executing "sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri":

    E: Internal Error, No file name for libgl1-mesa-dri

    I discovered that was because I had both the i386 and amd64 versions installed on my (64-bit) machine (the 64-bit fglrx driver is really 32-bit underneath...). So I removed the 32-bit versions with...

    sudo apt-get purge libgl1-mesa-glx:i386 libgl1-mesa-dri:i386

    And the remaining commands worked OK after that.

    NB, running "apt-get autoremove" after this removed even more unused 32-bit packages that were dependencies of the fglrx driver.

    ReplyDelete
  7. anybody who has had trouble install fglrx in teh first place has to uninstall the X11 "xorg" driver first, install fglrx, then reinstall the xorg driver.

    ReplyDelete