You are not logged in.

#1 2011-07-18 04:12:54

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

[Solved] Pm-powersave scriptlets: how to configure parameters?

Pm-utils comes with a pm-powersave script that, like laptopmode, aspires to put your laptop into low-power mode when it's running on battery. Those scripts it runs are in /usr/lib/pm-utils/power.d. Custom scripts (to disable existing ones, or to add your own stuff) go in /etc/pm/power.d. So far so good. However, some of the scripts in /usr (like the sata_alpm script), while executable, aren't doing anything by default (ie their default setting is not to change the ALPM power value, whether on battery or not).

It looks like this:

#!/bin/sh

. "${PM_FUNCTIONS}"

SATA_ALPM_ENABLE=${SATA_ALPM_ENABLE:-false}

<snip>

This hook has 1 parameter:
SATA_ALPM_ENABLE = whether to use SATA ALPM on battery.
Defaults to "false".

My question is: how do I enable it, aside from editing this script, which is not really upgrade-prone (given it's in /usr...)? Pm-powersave comes with no configuration settings (besides the stuff in /etc/pm/power.d, which is empty by default).

Last edited by .:B:. (2011-07-18 15:14:38)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#2 2011-07-18 04:38:11

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: [Solved] Pm-powersave scriptlets: how to configure parameters?

Based on /usr/lib/pm-utils/pm-functions, putting SATA_ALPM_ENABLE=true in /etc/pm/config.d/<something> should work (I haven't tested this). (see lines 66 - 84).


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#3 2011-07-18 05:48:10

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] Pm-powersave scriptlets: how to configure parameters?

Thanks. I tried running the script directly (/usr/lib/pm-utils/power.d/sata_alpm SATA_ALPM_ENABLE=true) but that obviously didn't work :-/

I'll see what your suggestion does and report back.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2011-07-18 15:14:15

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] Pm-powersave scriptlets: how to configure parameters?

Thanks Stebalien, works like a charm.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB