5/8/2005
Power Management on Linux… how Amatuerish
Let me give my two cents on the spin of the mobile herd’s feelings towards Power Management in Gentoo. In one quick bold summary it’s cpufreqd is teh 0wnage. All the other apps out there can just line up and blow me. To put it bluntly…. And here’s why.
Who knows how to suspend their laptops now days… I sure as fuck don’t…
- echo “sleep” > /sys/power/state
- echo “S3″ > /proc/acpi/sleep
- echo “PLEASE SUSPEND AND DON’T LOSE MY STUFF ON RESUME!!!” > /some/unknown/dev
Last I heard you had to use the last one to get a proper suspend, but after manually dropping to command line to kill a few apps and rm some modules.
ACPI? APM? Who the hell knows… and really I DON’T CARE. Just make it freaking work!
Which one is it? I don’t have a clue. So.. let me jump on the FreeDesktop.org bandwagon and use some of their stuff to solve this problem. I’m talking about the goodness of HAL or Hardware Abstraction Layer. The latest versions now support ACPI/APM/PMU/UPS stuff completely abstractly. And some one got smart enough to write a nice app on top of it called Gnome Power Manager oddly enough. To top it off, he says he’s borrowed from my fellow Orange and Blue buddy Robert Love so it’s got a good code base to start from.
But here’s what’s the problem with power management in Linux. Every freaking fool with gcc and a laptop has written their own suspend system or CPU frequency monitor or battery status. They’re all incomplete and unmaintained and have made it into Portage and they need to go. Be prepared if you use some crap ass program to handle any of these functions. IT WILL BE DELETED. And just for good measure I’ll dd if=/dev/zero of=/those/damn/crappy/programs so you can’t possibly get them back ever again. WHY!? Because we all need to take a controlled effort and raise the functionality level of Linux.
Now the next thing I’d like to see is a swsusp2 + gentoo-sources kernel. But oh well.
For those of you interested in dbus 0.33 and hal 0.5.1. They are available at those bugs as well as my Portage Overlay.
ferringb wanted me to add that LD_PRELOAD segfaults suck ass… No idea why… but hey… he’s special.. He has to be to work with Portage code.
8 Responses to “Power Management on Linux… how Amatuerish”
Leave a Reply
Filed under:
May 8th, 2005 at 12:18 pm
need to remove the extra http// from this link
http://http//bugs.gentoo.org/show_bug.cgi?id=91876
May 8th, 2005 at 1:14 pm
Dude.. I really wish to say that isn’t true anymore. I own a Dell D600 and I currently use Suspend2 via a portage overlay from brix and I have optimised all the settings and now, There’s no such need to rmmod or modprobe -r anything. It’s all automated.
Suspend2 is Also blazing FAST! Writes and Reads (of the suspend/resume image) are up to 70MB/s.
Hibernate takes ~15 Seconds from Running to Total S4 Sleep.
There’s also cool integration with gensplash and you get a cool looking splash at the hibernate/suspend.
You should read about it, I’ve even wrote a whole article on it at http://mag.my-opensource.org
PS : Your dbus link is broken.
May 8th, 2005 at 1:20 pm
BTW, yeah.. I do agree that power management in Linux is more or less a hit and miss and depends on the laptop/hardware in question.
I’ve been preaching this for a long time, power management in Linux is different compared to PPC platforms because PPC is all proprierty. Apple does its own hardware + software and thus gets the total integrated package.
x86 on the other hand, doesn’t ge this because there’s a lot of of manufacturers and not all of then follow the darn ACPi specs, it’s either missing this or doesn’t implement that. And they only want to get their hardware certified with Windows anyway.
May 8th, 2005 at 1:36 pm
well yeah , hibernation is great and all, but what about true sleep like on powermacs ?
(as well a normal sleep)
I close the lid. it sleeps. i open, it wakes up in a half a sec. no need to repost video by hand, no need to reload modules or whatever
oh yeah, and swsups2 crashes here anyway
May 8th, 2005 at 2:57 pm
Ahem - ‘emerge sys-power/hibernate-script’
May 9th, 2005 at 2:45 pm
Yeah dude.. (hm), as mentioned Macs are different. They’re proprietry and Apple makes all the hardware and thus of course they’ll want to make sure everything’s integrated and works well(Maybe that’s why most kernel hackers uses Macs instead of x86 boxes). “Just Works” like project Gentopia!
hm.. I’ve been running on suspend2 on my D600 and it just works too. I’m cool with that actually.
Yo Brix, Thanks for your suspend2 overlay. They Totally rock!
May 9th, 2005 at 2:46 pm
Yeah dude.. (hm), as mentioned Macs are different. They’re proprietry and Apple makes all the hardware and thus of course they’ll want to make sure everything’s integrated and works well(Maybe that’s why most kernel hackers uses Macs instead of x86 boxes). “Just Works” like project Gentopia!
hm.. I’ve been running on suspend2 on my D600 and it just works too. I’m cool with that actually.
Yo Brix, Thanks for your suspend2 overlay. They Totally rock!
Doug, I tried your ebuilds for gnome-power-manager but it didn’t work. It had some “gpm.c:coldplug” issue and it says it can’t find the batteries?
Also, the hla ebuild, seems to have a missing initscript??
May 9th, 2005 at 4:17 pm
it could be a lot easier, but APM works like a champ on Thinkpads, and really isn’t too hard to setup.