Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Power Management [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
blixel
Guru
Guru


Joined: 19 Jul 2004
Posts: 403
Location: Central, Florida

PostPosted: Mon Dec 26, 2005 1:23 pm    Post subject: Power Management [SOLVED] Reply with quote

Is there a Guide or a good forum thread about power management on an iBook G4 (1.2GHz - the October 2004 model)

I read over the Power Management Guide at this URL - http://www.gentoo.org/doc/en/power-management-guide.xml - but it seems to be exclusively for x86 systems. I know Power Management works on this iBook ... (works great actually) ... because I had Ubuntu 5.10 instaleld on here a few days ago and it worked perfectly "out of the box", with no configuration on my part. Unfortunately I didn't think to look under the hood to see what made it tick.

What packages do I need to emerge? What config files do I have to edit? What kernel options do I need to enable? (Pretty sure I have the kernel setup correctly already.)


Last edited by blixel on Wed Dec 28, 2005 1:50 am; edited 1 time in total
Back to top
View user's profile Send private message
Jimmers
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2005
Posts: 145

PostPosted: Mon Dec 26, 2005 2:22 pm    Post subject: Reply with quote

pbbuttons with cpufreq gets sleep with idle states working.
Code:
# emerge pbbuttonsd
# vim /etc/pbbuttonsd/conf  /* Edit config */
# emerge cpufreqd
# cat /usr/src/linux/.config | grep CPU  /* Make sure you have this in kernel */
        CONFIG_CPU_FREQ=y
        CONFIG_CPU_FREQ_TABLE=y
        # CONFIG_CPU_FREQ_DEBUG is not set
        CONFIG_CPU_FREQ_STAT=y
        CONFIG_CPU_FREQ_STAT_DETAILS=y
        # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
        CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
        CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
        CONFIG_CPU_FREQ_GOV_POWERSAVE=y
        CONFIG_CPU_FREQ_GOV_USERSPACE=y
        # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
        # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
        CONFIG_CPU_FREQ_PMAC=y
        CONFIG_SPLIT_PTLOCK_CPUS=4
# rc-update add pbbuttonsd default
# rc-update add cpufreqd default
# /etc/init.d/pbbuttonsd start
# /etc/init.d/cpufreqd start
Back to top
View user's profile Send private message
blixel
Guru
Guru


Joined: 19 Jul 2004
Posts: 403
Location: Central, Florida

PostPosted: Mon Dec 26, 2005 3:42 pm    Post subject: Reply with quote

Jimmers wrote:
pbbuttons with cpufreq gets sleep with idle states working.


Thanks ... I emerged pbbuttonsd and it "just worked". I didn't have to change anything in the config.

About the cpufreq, I have a question about my config:

Code:
david@archangel ~ $ cat /usr/src/linux/.config | grep CPU
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
CONFIG_CPU_FREQ_PMAC=y
CONFIG_SPLIT_PTLOCK_CPUS=4


Is it a problem that CONFIG_CPU_FREQ_STAT is a module? Does it need to be *in* the kernel? Same question applies to the other things that I have set as modules which you have set as Y. I know some things have to be Y and not M ... that's why I ask. I prefer to use modules where I can though.

Also ... should I enable any of the USE flags for cpufreqd?

Code:
sys-power/cpufreqd-2.0.0  USE="-apm -nforce2 -pmu" 250 kB


I assume that I do not enable nforce2 because that is, I assume, for people with nForce2 motherboards. But I'm not sure about apm and pmu.

Oh, and I haven't started looking into this yet myself - so I haven't RTFM yet ... but, maybe you can save me some time ... setting up the iBook buttons so they work like they do in OSX. Is that relatively simple? I don't care about the On Screen Display aspect ... but it would be nice to get the F4/F5 buttons to adjust volume, and get the F12 key to eject the CD. I mean, since the icons are printed on those keys and all.
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Mon Dec 26, 2005 5:10 pm    Post subject: Reply with quote

http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml#laptoppkgs <- This is a generic overview of some useful pacakges on PPC laptops.

The cpufreq settings you've set in your kernel are fine, but if you want to use cpufreqd, you'll have to enable the pmu option, (short for power management unit) which is sort of like APM on macs.

By default pbbuttonsd enables those buttons, you need to press fn+fx to use them (since the fx keys are used more often in Linux than the volume/brightness keys). You can switch this behaviour in the pbbuttonsd config.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
blixel
Guru
Guru


Joined: 19 Jul 2004
Posts: 403
Location: Central, Florida

PostPosted: Mon Dec 26, 2005 5:19 pm    Post subject: Reply with quote

JoseJX wrote:
By default pbbuttonsd enables those buttons, you need to press fn+fx to use them (since the fx keys are used more often in Linux than the volume/brightness keys). You can switch this behaviour in the pbbuttonsd config.


Ah ha ... very cool. The default is fine - makes more sense in Linux.

Man, this iBook is seriously a great Linux system. I'm stunned. I put off installing Linux on here because I thought it would be an even bigger pain in the neck than setting up Linux on a PC Laptop. But it's the exact opposite. I've been fighting with my Sony Vaio for years with Linux. I'm more than a little tempted to go drop it in the garbage and buy another iBook. (Anyone have any experience with putting FreeBSD or OpenBSD on an iBook?)

Now ... if I could *just* get Airport Extreme working. Arg... Ah well, I finally got my ZyXEL ZyAIR USB WiFi dongle working. It will due for now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum