[ltp] ACPI S3 power drain and Thinkpad Wiki/radeonfb

linux-thinkpad@linux-thinkpad.org linux-thinkpad@linux-thinkpad.org
Mon, 1 Aug 2005 14:15:26 +0100 (BST)


On Mon, 1 Aug 2005, Marius Gedminas wrote:

> I'm sure it's possible to hack the shell scripts that live inside the
> initrd and make them check for a keyword in /proc/cmdline, and then load
> the radeonfb only conditionally.

Yes - there's really only init once you've unpacked your initrd (gzip
-dc | cpio -i), and looking at that it's evident that mkinitrd just 
checks /etc/modprobe.conf at runtime, and adds an insmod with any
options specified, in this case:

echo "Loading radeonfb.ko module"
insmod /lib/radeonfb.ko radeon_force_sleep=1

If /proc/cmdline exists at this point, I'm sure I could hack the init
script (it's nash), but I really don't want to do this on Fedora's
near-weekly kernel updates :)  I can live with it - in fact after
mailing yesterday, I found there's still a problem even specifying
radeonfb resolution modes - only 1400x1050 and 1024x768 seem to work
(nothing intermediate), and if you set anything but the higher one,
fbsplash thinks you're at 640x400.  I retire exhausted from the field
concluding the radeonfb driver's a bit broken as a module.

> By the way, I've just compiled a kernel (2.6.12) with the radeonfb sleep
> patch.  I booted it, switched from the GDM login screen to a text
> console, modprobed radeonfb, and was pleasantly surprised that radeonfb and
> X did not try to fight over the hardware.  I then suspended the laptop
> for 20 minutes and discovered that the patch works -- sleep used 800 mW
> instead of 3500 mW that I've seen before.  Yay!

Interesting - when I booted it modprobed fine, but errors showed up
in /var/log/messages - I think because vesafb was live, rather than
any fight with X, which is understandable - and I didn't reduce sleep
power drain.  Booting with radeonfb in initrd on my T40 gives me a
dramatic reduction too: from 1500mWh to 100mWh (why does mine use so
little?).