Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379523 - power-management-guide does not reflect recent developments in utilities
Summary: power-management-guide does not reflect recent developments in utilities
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL: http://www.gentoo.org/doc/en/power-ma...
Whiteboard:
Keywords:
Depends on:
Blocks: 381059
  Show dependency tree
 
Reported: 2011-08-17 07:23 UTC by Sven Vermeulen (RETIRED)
Modified: 2011-09-23 18:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Vermeulen (RETIRED) gentoo-dev 2011-08-17 07:23:04 UTC
The power-management-guide currently available on the Gentoo site was written a few years ago when no simplified methods or tools existed for handling power management. However, developments on laptop-mode-utilities as well as integrated advanced power management within the desktop environments should allow users to setup their laptop accordingly without going through this much trouble.

The guide should therefor best be updated (or rewritten) to reflect these changes.

Reproducible: Always
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2011-08-17 07:24:39 UTC
Extract from https://bugs.gentoo.org/show_bug.cgi?id=367145#c2

[reply] [-] Description Libor Polčák 2011-05-13 21:42:19 UTC

I use battery runlevel as suggested in Power Management Guide
(http://www.gentoo.org/doc/en/power-management-guide.xml). After updating to
new baselayout my computer always boots into battery runlevel.

The script /etc/acpi/actions/pmg_switch_runlevel.sh (copied from the guide)
exits with:
/etc/acpi/actions/pmg_switch_runlevel.sh: line 29: /var/lib/init.d/softlevel:
File or directory does not exists

I believe that the directory /var/lib/init.d/ is gone with new baselayout.
However, neither the migration guide
(http://www.gentoo.org/doc/en/openrc-migration.xml), nor the
http://www.gentoo.org/doc/en/power-management-guide.xml says what replaces the
directory.

Reproducible: Always

Steps to Reproduce:
1. Install Gentoo with baselayout1
2. Follow http://www.gentoo.org/doc/en/power-management-guide.xml
3. Follow http://www.gentoo.org/doc/en/openrc-migration.xml
Actual Results:  
/etc/acpi/actions/pmg_switch_runlevel.sh does not find /var/lib/init.d and
consequently allways enters battery runlevel

Expected Results:  
/etc/acpi/actions/pmg_switch_runlevel.sh checks if the system indeed runs from
battery and switch to battery level accordingly.
[reply] [-] Comment 1 Josh Saddler 2011-05-13 23:57:48 UTC
Baselayout/ACPI maintainers: can you guys tell the GDP what we need to do for
this guide?
[reply] [-] Comment 2 Duncan 2011-05-14 01:16:36 UTC
[User with an Acer Aspire One netbook, here.  I used the gentoo-wiki and other
net resources to setup the netbook, but did NOT use Gentoo's Power Management
Guide as I didn't end up needing it.]

The Power Management Guide as it exists ATM is rather dated in general.

Laptop-mode-tools (LMT) has evolved from its original purpose of controlling
disk activity (only), to be a rather all encompassing set of tools (as the name
suggests) for automated wall-power/battery-power migration.  There are LMT
modules for all sorts of stuff, to the point that once a user explores and sets
up all the LMT modules relevant for his hardware, there's not a whole lot more
to do, and the nice part of it is that all the modules have sane defaults,
disabled or failing gracefully if the hardware or configuration doesn't support
them, enabled with defaults that make sense for both laptop-mode (battery) and
plugged-in-mode if the hardware and config is there to do so.  Individual
tweaks may be necessary for individual installations, but in general, the
package fits in very well with Gentoo's "add the bootscript to the default
runlevel and it just works as installed" policy.

So I'd suggest a rewritten Power Management Guide centered around
laptop-mode-tools.  Of course in Gentoo, that still means getting all the
kernel settings correct, for instance, so that part of the guide will still be
there.  Covering the basics of frequency-scaling, etc, is still useful, but I'd
recommend doing it in the context of LMT, particularly since this guide is
specifically aimed at laptop users (not server users or others interested in
wall-power-only power-savings).  Same with ACPI.  Same with display dimming and
power management.  Of course LMT still covers disk management.  There's even
modules to control sound chips (some of them, more common in laptop/netbook
chipsets, at least) and wifi vs ethernet, for instance, in current LMT, not
really covered at all in the current guide.

And perhaps the key bit.  Once laptop-mode-tools is appropriately setup,
there's now little need for a separate battery runlevel, so I'd suggest
dropping that bit entirely, which gets it out of the hair of the openrc folks. 
It's certainly still possible some users may still want a battery runlevel, but
really, no more so than individual installations might want customized
runlevels for other usage, and the generic documentation should cover that, no
need to do so in a laptop focused power management guide specifically.

Bottom line, I'd be interested in (and am thus volunteering to) help(ing) with
the rewrite.  As I only really have experience with the one netbook (and given
my usual verbosity) I'm not sure how effective I'd be at the initial writeup,
tho if no one else is interested I might be persuaded to try that too, but I'd
certainly be open to reviewing drafts created by others.

Meanwhile, I'd suggest at least a (dated) simple note at the top of the
existing guide, to the effect that it's a bit dated and hasn't been rewritten
yet for baselayout2/openrc.  "We're working on it."  Perhaps with an address to
contact for anyone interested in being CCed on further discussion, and/or a
link to this bug.

If there's an off-bug discussion list setup for this, please do CC me, or reply
to the bug asking interested people to CC.
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2011-09-18 13:26:10 UTC
I'm working on a rewrite of the power management guide. Current draft is at http://dev.gentoo.org/~swift/docs/previews/power-management-guide.xml and gives initial focus on the laptop-mode-tools package. It the covers some more advanced tools (like cpufreqd for a more granular CPU frequency management approach).

This rewrite does not work with an additional "battery" runlevel (no need for it imo) nor does it create additional scripts for users to manage (and for us to have bugs on when things change).
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2011-09-22 19:40:20 UTC
No updates otherwise on the document, except that I now add a link to a thinkwiki article that has an exhaustive list of measures one can take for powermanagement, and a link to the powertop package site.

If okay, I'll commit this one over the older one.
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2011-09-23 18:42:33 UTC
Document committed to CVS.