How to get ATI's Big Desktop working on Ubuntu Hardy Heron (8.04)

Hardy Heron was officially released last week and has been receiving rave reviews across the Internet. I had upgraded my home machine to the beta version of Hardy about a week before the official release and must say I was impressed . I waited for the official release before upgrading my work laptop.

Linux Video Driver Support

Linux has always had a hard time with proprietary drivers and lack of documentation to devleop open source versions. Thankfully, over the last few years, this has changed quiet a bit with many hardware vendors releasing open source versions of their drivers or opening their specification to such an extent that Linux now supports more hardware than Windows!

The one area where there has been slow progress is with video card drivers, especially since Nvidia and Ati are involved in a stiff competitive battle for this space. Apparently the algorithms used in the drivers provide a competitive advantage and so the vendors are not keen on releasing this to the public domain, which is understandable. Hopefully this situation will change change with Ati being bought by AMD, an open source friendly company. 

Lucky for us both Nvidia and Ati tend to release closed version of their drivers for Linux but getting them to work is more of a art than a science.

Configuring Ati Drivers for Dual Monitors

 Hardy Heron makes installing the proprietary drivers easy with their restricted driver management tools. On my laptop I had compiz up and running in three clicks :) Configuring dual monitor support proved to be much more difficult. I have a Asus F3J series latop. The lspci command reports the following video chip model:

"01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon X2300"

Apparently this chip is the same as the X1300 model and was rebranded by Ati's marketing department. It's quiet frustrating as you can't find any references to this chipset in the driver documentation so you left guessing whether it is supported or not, but I can report that it works with the driver that comes with Hardy.

The long road to freedom - or what I did for world peace on Freedom day!

(Freedom day is the 27 April -the day of the first democratic elections in South Africa)

Now I am no video card junkie so trying to get dual monitors working on Hardy meant I had to take my video card driver knowledge from near zero to just above rudimentary. The first thing I tried to get things working was to install the fglrx-control package

"apt-get install fglrx-control"

The application is installed under Applications=>Other. Unfortunately the application didn't work for me. I am not sure why and others might have better luck. I later realised that the application probably needs to run as root and it doesn't ask for root privileges when it starts like synaptic does. So maybe run it as root from the command line. Try

"sudo amdcccle"

maybe it will work for you.

Upgrading to the latest ATI driver usingATI installer or  EnvyNG

While googling for info I found out that ATI had released a new version of the driver on the 16th April. You can download the installer from the ATI site, make it executable with "chmod +x   ati-driver-installer-8-4-x86.x86_64.run" and run it. There are instructions how to create an Ubuntu package on the forums but I can't find the link. You can try the commands below but before you do uninstall the current fglrx packages if you have them installed. I used "apt-get purge" to do this but its probably better to use Synaptic. Then run: 

"sudo apt-get install build-essential fakeroot dh-make debhelper debconf dkms linux-headers-2.6.24-16"
"sudo ./ati-driver-installer-8-4-x86.x86_64.run --buildpkg Ubuntu/hardy"
" sudo dpkg -i xorg-driver-fglrx_8.476*.deb  fglrx-kernel-source_8.476*.deb fglrx-amdcccle_*.deb

I later found that one could just use the envyNG application . It's in synaptic so just search for it and use that instead to avoid problems. Unfortunately after upgrading the control application still would not work :( Maybe it was the root privilege which I hadn't though about yet.

Hacking xorg.conf

Since I had no luck with the gui application I had to delve in and start hacking te xorg.conf file. The easiest way to do this is to use the "aticonfig" command line tool. It is a good idea to back up your current xorg.conf file to roll-back to if there are any issues. To get things to work you need to know the following:

The difference between Big Desktop and Dual Monitor

The ATI card supports two types of dual monitor "modes" for want of a better word. One is what is commonly known as "dual monitors" and then there is, what ATI calls, "big desktop".  The two modes are mutually exclusive and there are options that apply to certain mode and not the other. As far as I could tell dual-monitors creates two separate X window sessions and runs them on the individually configured screens for X. (A screen in x is a combination of a monitor and video card configuration.). Big desktop, on the other hand, uses only one screen configuration and shares the desktop across two screens. I struggled setting up both but ended up using "big desktop" as it seemed most people got it working this way. Also it looked like with dual-monitors one could not drag applications across the monitors.

Running atifconfig

Ok so I tried using "aticonfig"  to get things working. There is little documentation available on this tool. The only way I could get anything was to run "aticonfig --help". It provides enough info to make educated guesses as to what the myriad of options do.If you want to try dual-monitor run the first command and to try big desktop run the second.

"aticonfig --initial=dual-head --screen-layout=left"
"aticonfig --initial --desktop-setup=horizontal --overlay-on=1 --ovt=Xv"

The screen-layout options applies to dual head only, while --dtop or --desktop-setup applies to big desktop. Some people had luck with just that, but not me :(. To get big desktop working I had to also run.

"aticonfig --mode2=<resolution for second monitor>"
"aticonfig --resolution=0,<resolutions for first monitor>

Without this I would get the desktop shared but the screen with the login prompt just kept reporting "Out of frequency errors" and remained dark. I could login by just typing the username/password and when Gnome started I would get a cloned desktop with both screens working. So after this I had both screens working but in clone mode only. I later realised that the ATI driver was now seeing the external screen as the primary monitor and the latop screen as the secondary. In Feisty it had been the other way round.  This was imporant in setting the screen resolutions properly as I had set the external monitors resolutions for screen 2 when in fact it was screen 1. I played around with the screen resolution settings and made sure that the Display subsection, under the Screen section, had a "Virtual" directive with the same resolution as the 2nd monitor. Some people reported that this had to be the maximum width and height matching the largest values from both monitors.  This seems to be essential to getting things to work.

Section "Screen"
        Identifier "aticonfig-Screen[1]"
        Device     "aticonfig-Device[0]"
        Monitor    "aticonfig-Monitor[1]"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Virtual   1280 960
                Depth     24
        EndSubSection
EndSection

 Please note your setting for "Device" and "Monitor" must reference the identifier names you defined else where in your xorg.conf file.

What happens if I mess up xorg.conf and don't have a backup?

If you mess things up so badly so X doesn't work, I did a couple of times,  just backup the existing /etc/X11/xorg.conf and then run

"sudo dpkg-reconfigure -phigh xserver-xorg"

This will create a clean xorg.conf file for you. You can then retry the aticonfig commands above. I found that running the aticofig command, trying different options, could result in a corrupted xorg.conf file. X would still boot but the new options weren't being read. This usually meant that there were two or more configurations for the same screen/device with the same identifier. Its best to start with a clean file or, if you have the knowledge, edit the xorg.conf file to clean it up.

Syntax errors in xorg.conf

Also if there is a syntax problem with your xorg.conf file, X just ignores the file and starts in low graphics mode. You get a message to configure your card . This usually means that it would revert to vesa and not your changes. So if you get this screen check you xorg.conf file. Things that got me: setting resolutions needs a small x between the numbers i.e 1024x768 not 1024X768. Also the virtual directive above does not have a x between the numbers.

 I hope this helps someone else. It really shouldn't have taken this long to sort this out. On the upside I know have a rudimentary knowledge on the xorg.conf file and some insite into video cards.

Comments

I can't even tell you how happy I am with you right now. I've been battling with this issue for two days STRAIGHT to no avail. Anyway, due to some of your suggestions, and namely the ati control app, I have finally gotten my duals working. Seriously, Thank you.

Matt
[email protected]

This page was a fantastic help, and likely saved me a lot of time, but I was still tearing my hair out for another hour or two after using it.

At the login screen, everything seemed fine, but once GNOME started, I was getting the old cloned screen again. No amount of fiddling with the settings seemed to help this.

I was kicking myself when I found that all I had to do was change the screen resolution in System->Preferences->Screen Resolution to a resolutino that covered both screens.

I hope that last piece of advice helps someone out.

Thanks so much for your help with this.

Hey, this is def. useful. Would you mind posting a copy of your xorg.conf file for me to study? Mine looks like this:

*****************************************************************************
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "aticonfig-Screen[0]-0" 0 0
Screen "aticonfig-Screen[0]-1" RightOf "aticonfig-Screen[0]-0"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection

Section "Files"

# path to defoma fonts
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/X11R6/lib/X11/fonts/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "vbe"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection

Section "Monitor"
Identifier "aticonfig-Monitor[0]-0"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Monitor"
Identifier "aticonfig-Monitor[0]-1"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Device"
Identifier "ATI Technologies Inc Radeon R300 ND [Radeon 9700 Pro]"
Driver "ati"
BusID "PCI:1:0:0"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]-0"
Driver "fglrx"
Option "DesktopSetup" "horizontal"
Option "OverlayOnCRTC2" "1"
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
Option "Mode2" "1280x1024"
BusID "PCI:1:0:0"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]-1"
Driver "fglrx"
BusID "PCI:1:0:0"
Screen 1
EndSection

Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies Inc Radeon R300 ND [Radeon 9700 Pro]"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "832x624" "800x600" "720x400" "640x480"
EndSubSection
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device "aticonfig-Device[0]-0"
Monitor "aticonfig-Monitor[0]-0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024"
EndSubSection
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-1"
Device "aticonfig-Device[0]-1"
Monitor "aticonfig-Monitor[0]-1"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "DRI"
Mode 0666
EndSection
*****************************************************************************

As I had previously run the command "aticonfig –initial=dual-head --screen-layout=right" and had set the resolutions before eventually running the command "aticonfig –dtop=horizontal –overlay-on=1" and I don't know if it put in extra values, it looks as though it did to me.

Thanks so much in advance!

-Joe

Mark Clarke's picture

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerLayout"
    Identifier     "Default Layout"
    Screen      0  "aticonfig-Screen[0]" 0 0
    InputDevice    "Synaptics Touchpad"
EndSection

Section "Files"
EndSection

Section "Module"
EndSection

Section "InputDevice"
    Identifier  "Generic Keyboard"
    Driver      "kbd"
    Option        "XkbRules" "xorg"
    Option        "XkbModel" "pc105"
    Option        "XkbLayout" "us"
EndSection

Section "InputDevice"
    Identifier  "Configured Mouse"
    Driver      "mouse"
    Option        "CorePointer"
EndSection

Section "InputDevice"
    Identifier  "Synaptics Touchpad"
    Driver      "synaptics"
    Option        "SendCoreEvents" "true"
    Option        "Device" "/dev/psaux"
    Option        "Protocol" "auto-dev"
    Option        "HorizEdgeScroll" "0"
EndSection

Section "Monitor"
    Identifier   "aticonfig-Monitor[0]"
    Option        "VendorName" "ATI Proprietary Driver"
    Option        "ModelName" "Generic Autodetecting Monitor"
    Option        "DPMS" "true"
EndSection

Section "Monitor"
    Identifier   "aticonfig-Monitor[1]"
    Option        "VendorName" "ATI Proprietary Driver"
    Option        "ModelName" "Generic Autodetecting Monitor"
    Option        "DPMS" "true"
EndSection

Section "Device"
    Identifier  "aticonfig-Device[0]"
    Driver      "fglrx"
    Option        "DesktopSetup" "horizontal,reverse"
    Option        "OverlayOnCRTC2" "1"
    Option        "Mode2" "1280x768"
    Option        "VideoOverlay" "on"
    Option        "OpenGLOverlay" "off"
    Option        "EnableMonitor" "crt1,lvds"
    Option        "PairModes" "1280x960+1280x768"
EndSection

Section "Screen"
    Identifier "aticonfig-Screen[0]"
    Device     "aticonfig-Device[0]"
    Monitor    "aticonfig-Monitor[0]"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Virtual   1280 768
        Depth     24
        Modes    "1280x1024" "1280x768" "1024x768"
    EndSubSection
EndSection

Section "Screen"
    Identifier "aticonfig-Screen[1]"
    Device     "aticonfig-Device[0]"
    Monitor    "aticonfig-Monitor[1]"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Virtual   1280 960
        Depth     24
        Modes    "1280x1024" "1280x960"
    EndSubSection
EndSection

Hi there! Let me share some of the knowledge that I have gained, and hopefully bring this page higher up in the Google ranks :)

First off, you are looking for gksudo amdcccle. Never use sudo for a graphical program. Sudo transforms you into the root user with ITS settings. Gksudo transforms you into root with YOUR settings. Sometimes file permissions get a little messed up if you try and use sudo for a graphical program. I believe I got that correct ... hopefully someone will kindly let you know if that is wrong.

If you want to check for errors in xorg, try /var/log/Xorg.#.log and perhaps Xorg.#.log.old. Most of the times if you have a problem, you'll be looking for the old log because it will try to go in to failsafe which generates another log. The # here represents what screen is it attached to, or what VT (virtual terminal) it's going to (CTRL-ALT-#). Most cases, it should be 0, which will usually represent VT 7 (CTRL-ALT-F7). Either way, in the log you'll see (--) using VT number #.

Also, stay away from EnvyNG--this was the old style of setting up the proprietary drivers. People have had serious issues with it messing up configurations. Using the restricted driver manager should be enough now-a-days.

If you want to upgrade to the last driver provided by ATI you need to do a few things.

1) Download the driver as you said and set it to executable.

2) As you said, uninstall the fglrx packages BUT also check to make sure you don't have any previous ATI fglrx based packages installed (ATI's and Ubuntu's ARE different). You can find the uninstall script in /usr/share/ati/fglrx-uninstall.sh if it exists.

3) Blacklist Ubuntu's fglrx driver from the restricted driver manager so that it is not loaded but rather ATI's version is. You can find this file here: /etc/default/linux-restricted-modules-common. In that file is some instructions--it's quite straight forward--just add fglrx to the list. (Later on, when you go in to the restricted drivers manager, you'll see that fglrx is enabled but it isn't checked. This means that the system is using another version--ATI's new one)

4) Allow the fglrx module from ATI to be inserted into the kernel. You need to un-blacklist this. You can find that here: /etc/modprobe.d/blacklist-restricted. In here you'll see that it is used to disable restricted (proprietary) drivers. Usually you'll have something like:
blacklist fglrx
blacklist nv
You can just comment out those lines by inserting a # at the start of it.

5) Now you can just double click the installer that you downloaded and let it run the GUI configuration for you. From there you can get it to generate .deb files for you to install, or you can get it to do it for you.

These are very simple steps that should work every time. To revert, you just go backwards and undo everything. I would suggest making a backup of every file that you touch. Obviously to use the driver, you must set xorg.conf to use fglrx instead of ati. You can swap back and forth between these after you install fglrx if your card supports it (I do just to test).

I have a Radeon 9600 (Sapphire x1050 ... the broken one that has the jumper set to PAL, so TV output ALWAYS needs to be configured... very irritating) and I can't seem to get bigdesktop to work correctly as the TV must be set to 640x480 and my LCD to 1280x1024. I guess I'll give it another go and see if perhaps your guide might bring another insight into the situation. I would end up with some weird resolutions such as 1920x1024 but it looks like my LCD is set to 640x480 and I can drag stuff below the bottom of the screen on my LCD. I must have the resolutions backwards somehow. Either way, it seems that by using the fglrx driver my resolutions for my monitor are not being detected properly. When I use just a single head setup (with no resolutions modes defined in the display subsection of screen) I can only get a max. of 1024x768. Doing the same thing but with the radeon (ati) driver, I get my max of 1280x1024. Odd... very odd...

Anyways, here's some information links that may help someone!
http://wiki.cchtml.com/index.php/Ubuntu_Gutsy_Installation_Guide (should apply to Hardy for the most part)
http://wiki.cchtml.com/index.php/Ubuntu_Hardy_Installation_Guide (actual Hardy guide)

PS: In these guides, don't use fakeroot. There is no reason. We trust ATI to not be stupid and some users have even reported issues with using it. Understand what you are doing and do it carefully. There guides also help you solve a problem where if you tried to logout, restart or shutdown from X, X with hang with basically 100% kernel-time cpu usage. You could SSH into your machine and see it, but for me, I couldn't get it to stop even with a sudo kill -9. It seems that the atieventsd was causing the problem. These guides help resolve that.

PPS: Useful commands: fglrxinfo, glxinfo, glxgears, fgl_glxgears, aticonfig, xrandr, lsmod, modprobe -l

~Jaymes (I apologize for blog jacking)

These were my exact steps for a Radeon X1300 Pro (single output DVI, y-cable, dual dell flatscreen:
1) System | Administration | Hardware Drivers | Enable the ATI Proprietary driver
2) sudo aticonfig --initial --desktop-setup=horizontal --overlay-on=1 --ovt=Xv
3) sudo aticonfig --mode2=1280x1024
4) sudo aticonfig --resolution=0,1280x1024
5) ctrl,alt,backspace

I have one issue still that I haven't figured out. Initially, after booting or restarting X, the top 1/2 of my screen is unreadable, has a bunch of lines. Switching to the first console (ctrl,alt,f1) and back to the GUI (ctrl,alt,f7) fixes it.

Either way, it works. I have spent two days on this.

Hi all,

was trying out dual-monitors and happened to find your page.

your tips worked fine for me. the trouble was, or is, that this driver is kind of slow. xine won't work (even at the start the xine logo moves and the whole xine video frame is green. the system gets slow and only thing is to close xine.

does anyone know what the problem might be?

for now i switched back to my old configuration and driver and single monitor.

i am using debian testing (2.6.27.6 #3 PREEMPT).