ATI Radeon Mobility power off fix

... for Xfree86 4.3.0 running on Mandrake GNU / Linux 9.1 or Fedora Core 1.

Special thanks to Hui Yu who came up with the solution!

Issue

With Xfree4.3.0, ATI Radeon Mobility graphics cards are well supported on GNU/Linux. Before this version, you had to use the VESA generic driver, but you couldn't enjoy it's 3D accelaration capabilities.

One issue was left though. At least with laptop LCD screens, you couldn't switch the screen off, unless the BIOS lets you switch off the LCD after some idle time. You can check that by running the below command:

xset -display :0 dpms force off

The screen gets black, but backlighting is still on. This means that your laptop screen still consumes power. That's bad for your battery, in particular if you are on a desert island!

At least, this happens with my ATI Radeon Mobility 9000 card, and it was also reported on other models, such as the 7500 one.

I reported this issue into Xfree86's bug database and I was soon given a solution!

Long term solution

The fix will be available in Xfree86 releases greater than 4.3.0, as the fix is present in the current CVS tree.

When such releases are available, the best solution will be to upgrade your Xfree86 packages when they are available.

The fix has been successfully tested on the ATI Radeon Mobility 9000 and 7500 versions, and should work for other models too.

Mandrake GNU/Linux 9.1 quick fix

If you're using Mandrake 9.1, you may simply reuse what I did:
  1. Download the radeon_drv.o.bz2 file from my web site.
  2. Uncompress it with the bunzip2 command.
  3. Logged as root, upgrade the driver file as follows:
    cp /usr/X11R6/lib/modules/drivers/radeon_drv.o /usr/X11R6/lib/modules/drivers/radeon_drv.o.orig
    cp radeon_drv.o /usr/X11R6/lib/modules/drivers/
  4. Restart your X server or reboot your machine. That's it! You can now set the energy settings of your screen (in KDE's or Gnome's control panel, for example).
  5. If this doesn't work, restore the original radeon_drv.o file.

Fedora Core 1 GNU/Linux quick fix

If you're using Fedora Core 1, you may simply reuse what I did:
  1. Download the radeon_drv.o.bz2 file from my web site.
  2. Uncompress it with the bunzip2 command.
  3. Logged as root, upgrade the driver file as follows:
    cp /usr/X11R6/lib/modules/drivers/radeon_drv.o /usr/X11R6/lib/modules/drivers/radeon_drv.o.orig
    cp radeon_drv.o /usr/X11R6/lib/modules/drivers/
  4. Restart your X server or reboot your machine. That's it! You can now set the energy settings of your screen (in KDE's or Gnome's control panel, for example).
  5. If this doesn't work, restore the original radeon_drv.o file.

Solution for other GNU/Linux distributions using at least Xfree86 4.3.0

Here's what I did to get the driver file. I hope that can be useful for people using other GNU/Linux distributions!
  1. Got the Xfree86 4.3.0 source RPM file from Mandrake mirrors and installed the sources on my computer. I guess that's better than using raw Xfree86 source releases which may have been modified by the distribution packagers.
  2. Untarred the XFree86-4.3.0.tar.gz file
  3. Modified the radeon_driver.c as instructed by Hui Yu. Here's the compressed modified file.
  4. Copied this file to xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c in the source tree.
  5. In the Xfree86 source directory (xc/), ran
    make World
  6. Made a backup copy of /usr/X11R6/lib/modules/drivers/radeon_drv.o (or wherever this file is located).
  7. Copied the xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_drv.o file to /usr/X11R6/lib/modules/drivers/radeon_drv.o (or wherever this file is located).
  8. If this doesn't work, restore the original radeon_drv.o file.
I hope this worked for you too!