Ubuntu Natty Installation Guide

From cchtml.com

The Options

Users with ATI cards have the following driver options:

  • vesa - very basic, lacks 2D/3D acceleration, and focuses on compatibility with all VESA-compliant graphics cards. It is good for starting the GUI environment when no accelerated driver is available/working and little else.
  • ati - actually a thin wrapper that will invoke the radeon driver (or another ati open-source driver for pre-Radeon cards).
  • radeon - open source driver supporting all Radeon cards. This driver has excellent 2D acceleration and compatibility with the Linux graphics stack. 3D acceleration is sufficient for desktop effects and a nice set of native Linux games. Power management is now comparable to the Catalyst driver.
  • radeonhd - an alternate driver supporting R520-R7x0 hardware. This driver is now officially deprecated in favor of radeon. If you still want to try it, see: https://help.ubuntu.com/community/RadeonHD
  • Catalyst (a.k.a fglrx) a proprietary "blob" (closed source binary) driver designed by ATI, with 3D code based off of their Windows driver. Only RadeonHD chips are supported on recent Linux distros.

Updated Open Source Driver PPA's

I have been using Mac OS X and Linux (Debian to Ubuntu) and I think for your masses, Mac OS X siplmy works. That doesn't mean Linux doesn't. I think if the Linux community would start duplicating effort, they would increase their speed and quality over all.Unfortunately, saying that, doesn't consider the labor of love Linux is and that is exactly what makes it soo awesome.I love Mac OS X and believe we all have the social responsibility to use Linux because this way our future is in our hands.I just wish Linux would consider one aspect of their desktop. Integration. If the interface would integrate well enough, people stop using soo many widget sets and stick with GNOME. This would make all applications function in a much clearer fashion.

Hardware Video Decode Acceleration (EXPERIMENTAL)

This is confirmed to work for newer RadeonHD GPU's (those with UVD2). If you have a RadeonHD 4000 series or newer, you have UVD2. To see the complete list: http://en.wikipedia.org/wiki/Unified_Video_Decoder#UVD_enabled_GPUs

For acceleration to work, you will need libva from this PPA: https://launchpad.net/~dtl131/+archive/catalysthacks and the xvba va-api backend from: http://www.splitted-desktop.com/~gbeauchesne/xvba-video/ With those installed, you can get acceleration from any video player that uses VA-API. A compatible version of VLC is available in the aforementioned PPA.

Updating Catalyst/fglrx

DO NOT try to install a new version over an old one. Follow the 'Removing Catalyst/fglrx' section below to remove your existing driver, and then you can start at 'Downloading the latest Catalyst' to install the new one.

Removing Catalyst/fglrx

The uninstall script in the first command will only exist if you downloaded the drivers and installed the directly (rather than building packages as this guide does). Skip the first command if it does not exist.

$ sudo sh /usr/share/ati/fglrx-uninstall.sh
$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx

If you plan on using open-source drivers, you will need to reinstall some packages because Catalyst overwrites or diverts some key 3D libraries with proprietary versions. For more information on this issue, see this Ubuntu wiki page

$ sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
$ sudo apt-get install xserver-xorg-video-ati
$ sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Issues

Build Fails and Log Shows "mixed implicit and normal rules. Stop."

If the installation fails and you find the above message in /var/lib/dkms/fglrx/8.841/build/make.log, it may be because you're using a pentium-build wrapper around gcc. See what the following ls command returns:

$ ls -la /usr/bin/gcc

If it shows that gcc is a link to builder-cc, temporarily redirect the link to point to the real gcc (gcc-4.5 in Ubuntu Natty). This should allow you to install fglrx:

$ sudo ln -sf /usr/bin/gcc-4.5 /usr/bin/gcc

When you're finished installing the driver, return the gcc link to its original value:

$ sudo ln -sf /usr/bin/builder-cc /usr/bin/gcc

Launchpad link for this bug: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/555957

"Errors were encountered while processing: fglrx-amdcccle" (on 64-bit systems)

Most likely, you probably did not have the "ia32-libs" package installed beforehand. If you have a 64 bit install, the above dpkg command may complain that "Errors were encountered while processing: fglrx-amdcccle". This is because of a dependency of the amdccle package on 32 bit libraries. If you receive this error, use the following command, which will force the installation of all of the 32 bit dependencies, and then the amdcccle package:

$ sudo apt-get -f install

Catalyst 15.12 on 64-bit systems may require the --force-overwrite command in the above dpkg command:

$ sudo dpkg -i --force-overwrite fglrx*.deb

Problems Starting Xserver

If you get a black screen hang, the first thing to check is if xorg.conf is the problem.

You can disable the xorg.conf with:

$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.disabled

Reboot and check to see if things work now.

You can reinstate the file with:

$ sudo mv /etc/X11/xorg.conf.disabled /etc/X11/xorg.conf

Before tweaking ACPI settings, try ensuring /dev/null is chmodded to 0666. This intermittently changes when using the nano (and possibly other) editors with sudo and the group/world permissions are unset. This leads to the ATI drivers hanging on boot or otherwise. A quick and dirty init script saved as /etc/init/chmodnull does the trick for me -

$ start on filesystem
$
$ script
$	chmod 0666 /dev/null
$	chmod 0666 /lib/udev/devices/null
$ end script

This has been tested using Ubuntu 10.04 64-bit on a ATI Radeon HD 4830 (HP Envy 15-1060ea). It's worth noting that I had to disable TLS (amdconfig --tls=0) to get things to stay stable!

If you've properly installed the driver, but experience problems when starting the X server, such as hanging, black/white/gray screen, distortion, etc., your system BIOS may have a buggy ACPI implementation. To work around, press Ctrl+Alt+F1 to get to a terminal (or failing that, boot to recovery mode) and run:

$ sudo amdconfig --acpi-services=off

If this method works, you should consider checking your system vendor's BIOS changelogs for relevant ACPI fixes, updating your BIOS, and reenabling the driver's ACPI services.

Slow Maximizing Windows/General 2D Slowness

As of Catalyst 10-6, a new, faster 2D acceleration method is used as the default, replacing the old XAA method. If you're not running compositing/desktop effects, and are having problems with 2D operations, you may want to fall back to the old XAA. This command will do that:

$ sudo amdconfig --set-pcs-str=DDX,ForceXAA,TRUE

In the last case (at least) it is essential to run it without the Xorg server working. To do so, press CTRL+ALT+F1, log in and type the following (this will close all your programs so save your work before):

$ sudo service gdm stop
$ sudo amdconfig --set-pcs-str=DDX,ForceXAA,TRUE
$ sudo service gdm start

Unsupported Hardware Watermark

This can happen if your card's PCI ID wasn't officially certified to work with a particular version of Catalyst. It does not necessarily mean that your card is unsupported, but it does mean that you shouldn't file bugs with that particular card/driver combination. If you installed the driver by downloading it from AMD/ATI, installing a newer version of Catalyst will probably help.

If you installed the proprietary driver included with Ubuntu or you do not want to upgrade to a newer version, it may be possible to work around the issue by using a control file from a newer version of Catalyst than the one you're running.

$ cd ~/; mkdir catalyst15.12; cd catalyst15.12/
$ wget http://www2.ati.com/drivers/linux/amd-driver-installer-15-12-x86.x86_64.run
$ chmod +x amd-driver-installer-15-12-x86.x86_64.run
$ sh amd-driver-installer-15-12-x86.x86_64.run --extract driver
$ sudo mv /etc/ati/control ~/control.bak
$ sudo cp driver/common/etc/ati/control /etc/ati

Hang at logout

If you experience hangs when logging out (of X) it is probably due to the /etc/ati/authatieventsd.sh script looking for X authorization files in the wrong place when it starts up. You can kill the hanging authatieventsd.sh processes from a console tty to allow the shutdown of the X server.

Before the following commands verify that /etc/ati/authatieventsd.sh exists after build and install, if not just do: (assuming that the installer is in the directory we used to install)

$ cd ~/catalyst15.12
$ sh amd-driver-installer-15.12-x86.x86_64.run --extract driver
$ sudo cp driver/packages/Ubuntu/dists/lucid/replacements/authatieventsd.sh /etc/ati/authatieventsd.sh
$ sudo chmod +x /etc/ati/authatieventsd.sh

This problem can be fixed permanently with:

$ sudo mkdir -p /var/lib/xdm/authdir
$ sudo ln -s /var/run/xauth /var/lib/xdm/authdir/authfiles

If that doesn't work then you can disable atieventsd with this command:

$ sudo /usr/sbin/update-rc.d -f atieventsd remove

You'll have to restart for this to take effect.

Suspend/Hibernation

Suspend hibernation works with the latest driver.

For Radeon 3200, to wake up from suspend, I had to add the following lines to /etc/X11/xorg.conf: (This settings is not good option, if you are using compiz-fusion or any other transparency-based thingie. Not working for HD 3850)

Section "Extensions"
        Option        "Composite"        "Disable"
EndSection

Section "ServerFlags"
       Option  "AIGLX" "off" 
EndSection

Another way to get it working is to do enable Composite, but when you want to suspend simply disable Compiz Fusion. How would you do that? Easy! Install the fusion-icon package (in repos by default):

$ sudo apt-get install fusion-icon

After you have done that, launch it (Applications > System > Compiz Fusion Icon) and it appears in your notification area. To switch, simply right-mouse click on the icon and select Metacity. Your desktop will flicker and windows will dissapear, but after a while they appear again. Now try to suspend.

When you wake up again, you can (hopefully) unlock your screen and there you go! Now you want Compiz back again, so right-mouse-click on the Compiz Fusion Icon and select Compiz again. Desktop flickering again, but then voila! Your Compiz Fusion Desktop is back again! (At least, that is how it is supposed to work)

KNOWN PROBLEM: When you switch back, all your windows are on the same desktop. This happens because you switched to metacity.

Hopefully this helped some people, as it did for me! Solution posted by zwyber@gmail.com

Can't remove fglrx with dpkg (diversion issue)

If dpkg refuses to remove an fglrx package and complains about a diversion of a file, you might need to manually remove it. For example, if dpkg complains:

dpkg-divert: mismatch on divert-to
  when removing `diversion of /usr/lib/libGL.so.1.2 to /usr/share/fglrx/diversions/libGL.so.1.2 by xorg-driver-fglrx'
  found `diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by xorg-driver-fglrx'

then:

$ sudo dpkg-divert --remove /usr/lib/libGL.so.1.2

This module/version combo is already installed

If you get this error-message, simply uninstall the previous version before installing the new one with:

$ sudo dkms remove -m fglrx --all

New kernel installed?

In theory, DKMS should automatically install the fglrx kernel module for your new kernel the first time you boot it. Should you need to manually install it:

$ sudo dkms build -m fglrx -k `uname -r`
$ sudo dkms install -m fglrx -k `uname -r`

if amdcccle doesn't work and says Identifier is not a valid word. Use lower case letter in xorg.conf

amdconfig not found after installation & "module does not exist" after boot

This scenario is possible when the driver installation has seemingly succeeded and is possibly related to previous use of fglrx through the Jockey (i.e. you first used drivers provided by Ubuntu but then upgraded to ones available from AMD's website). When doing amdconfig --initial after driver installation, you might end up not having the amdconfig available at all:

amdconfig: command not found

After booting you might receive X error '(EE) Failed to load module "fglrx" (module does not exist, 0)'. These do not necessarily indicate that the installation has failed completely. On command line, do

$ ls /usr/lib/fglrx/bin

and see if the command lists some Ati related programs. If they are listed but not found from /usr/bin, it is possible that the "update-alternatives" fglrx .deb installation does has been ignored. See man update-alternatives for more information about the concept and workings of alternatives. In practice, update-alternatives is supposed to create several symbolic links to the files in the fglrx directory, but it will be ignored if the alternatives for the very related gl_conf entry has been set to manual. Do

$ update-alternatives --get-selections | grep gl_conf

and see if the mode is manual instead of auto and if mesa is mentioned instead of fglrx in the path that is printed. In this case you need to

$ sudo update-alternatives --set gl_conf /usr/lib/fglrx/ld.so.conf

to set fglrx as the active alternative. You can alternatively (no pun intended) and additionally change the gl_conf into automatic mode before the installation this way:

$ sudo update-alternatives --auto gl_conf

After that, the alternatives should automatically be configured correctly when the graphics driver .debs are installed.

Cannot open the message caoatlg “man” for locale “zh_CN.UTF-8″这句话估计是跟语言设置有关,跟安装这个没关吧?我的make install 过程就是按照readme那里说的去做,其实就做到第4步而已。1. Move the base driver tar file to the directory of your choice. For example, use /home/username/arl1e or /usr/local/src/arl1e.2. Untar/unzip archive: tar zxf arl1e-x.x.x.x.tar.gz3. Change to the driver src directory: cd arl1e-x.x.x.x/src/4. Compile the driver module: make install The binary will be installed as: /lib/modules//kernel/drivers/net/arl1e.[k]o5. Install the module: insmod arl1e=第5步因为不知道这个参数跟值应该填什么所以没弄第6、7是在图形界面上设置的,应该可以说不用设置了,自动获取ip之后ping一下就可以了。我做的就是这样的。

'Can't exec "debian/rules": Permission denied at /usr/bin/dpkg-buildpackage line 507.' during deb generation

During installation you may receive the following message:

Can't exec "debian/rules": Permission denied at /usr/bin/dpkg-buildpackage line 507.

This can happen when your /tmp folder is mounted with the option "noexec". The noexec is suggested by many howtos regarding Ubuntu on SSD, when placing the /tmp in memory. A workaround can be found here: [1]