Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 205117 - Enhancement to the suggested pmg_switch_runlevel.sh script
Summary: Enhancement to the suggested pmg_switch_runlevel.sh script
Status: RESOLVED WONTFIX
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Docs Team
URL: http://www.gentoo.org/doc/en/power-ma...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-09 20:36 UTC by Vincent Poinot
Modified: 2009-07-17 00:14 UTC (History)
0 users

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


Attachments
Updated version of the suggested script (pmg_switch_runlevel.sh,834 bytes, text/plain)
2008-01-09 20:38 UTC, Vincent Poinot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Poinot 2008-01-09 20:36:55 UTC
The sample script that the documentation suggests to switch runlevels when the power cable is plugged/unplugged could be made a bit more generic in my opinion: I mainly use two softlevels (one for X, one for booting into a the console). As such, the script pmg_switch_runlevel.sh won't do in my case.

The update I suggest:
- does not make any assumption on the number of softlevels a user may want to tweak for ACPI,
- simply requires that if a softlevel (used on AC) needs to be changed when going to battery mode, the softlevel should have the same name suffixed with "_battery".

For example, I use softlevels "default" and "terminal", I created "default_battery" and "terminal_battery" that are selected when unplugging the power cable.

Reproducible: Always




An other remark: the documentation shows a sample kernel configuration where the "ACPI Processor P-States driver" is compiled as a module. However I don't think it is mentionned that in this case, it is required to add the module acpi_cpufreq to /etc/modules.autoload.d/kernel-2.*
Comment 1 Vincent Poinot 2008-01-09 20:38:23 UTC
Created attachment 140571 [details]
Updated version of the suggested script
Comment 2 nm (RETIRED) gentoo-dev 2008-01-10 06:07:22 UTC
While it's great that you can tweak the script, that's too specific for your system, and it would be a detriment to the majority of users reading this guide. For most users, two levels, AC and battery, are sufficient.

I'll think about it s'more, though.
Comment 3 Vincent Poinot 2008-01-10 12:20:30 UTC
In my opinion, on the contrary, the version I propose is more general since it will work for people who use a single runlevel and for those who use more like me, whereas the version proposed in the current guide will only work for the former.
As a user who wants to configure his Gentoo box, I expect to go reading the power management guide, follow the instructions and have the stuff work. No matter how good the current guide is (and it is), I had to do some more work to have ACPI working (ok, not a big job, but still :-) ): the script I suggest is one more step toward zero-headache condiguration...

Anyway, it is up to you to decide.
Comment 4 nm (RETIRED) gentoo-dev 2009-07-17 00:14:35 UTC
Given that OpenRC is the future of Gentoo, and its constant flux, I'm reluctant to add this, since the softlevel stuff keeps shifting around. Maintaining the script could be a bit of a pain.

But thanks for the idea; it is pretty creative!