Here is a bash script for acpi that underclocks the ati radeon 9700 on my laptop. Make sure to add an ac_adapter acpi event that calls the script:
#!/bin/bash
displaynum=0
user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
echo $user
status=`acpi -a | grep on-line`
#echo $status
if [ "$status" ]
then
su $user -c "aticonfig --set-powerstate=3"
else
su $user -c "aticonfig --set-powerstate=1"
fi