Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New Power Management Daemon: PowerMgr!
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ttuttle
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2004
Posts: 131

PostPosted: Thu Jun 02, 2005 1:42 am    Post subject: Reply with quote

FonderiaDigitale wrote:
there is a new governor available: conservative. it acts the same as ondemand, but more graceful regarding to the battery.
any plan to support this?


It's automatically supported. The 'cpu governor' output just writes the value to the proper file in sysfs.

What kernel version did this appear in?

FonderiaDigitale wrote:

regarding the init script, how about something like:
Code:
#!/sbin/runscript

depend() {
        use hotplug
        need logger
}


start() {
        ebegin "Starting powermgr"
        start-stop-daemon --start --quiet --pidfile /var/run/powermgr.pid --exec /usr/bin/powermgr >/var/log/powermgr.log 2>&1
        eend $?
}

stop() {
        ebegin "Stopping powermgr"
        start-stop-daemon --stop --quiet --pidfile /var/run/powermgr.pid
        eend $?
}


Hehehe, that's basically what I use. I should make a "nice" one and add it to the package.
Back to top
View user's profile Send private message
ttuttle
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2004
Posts: 131

PostPosted: Fri Jun 10, 2005 3:14 am    Post subject: Reply with quote

Version 0.0.6 is now out!

It adds support for setting the policy of a speedfreq daemon if you want, setting governor-specific settings in sysfs (in 2.6.12, there will be ignore_nice options for the ondemand and the new conservative governors, to make them not count niced processes as using CPU time, with the result that a niced process will not throttle up the system), and includes an init script. It also adds a check to see if the PID in the lockfile refers to a live process before declaring that there is another powermgr process, much to the delight of anyone who kills powermgr with SIGKILL (i.e., ^C) and has to erase the lockfile.

Get it here: http://thinkinginbinary.dyndns.org/~tom/powermgr.html
Back to top
View user's profile Send private message
dresdn
n00b
n00b


Joined: 18 Jul 2005
Posts: 9

PostPosted: Mon Jul 18, 2005 4:53 pm    Post subject: Reply with quote

Late last week I found this thread and decided to give 0.0.6 a try, and well, I really like it =P

There is one strange problem that I can't figure out and I really don't have the time to dive into the code atm. Basically, if I goto battery, everything get's set to my battery profile, my wireless card, cpu get's throttled, etc. But, when I go back to ac mode, nothing gets reverted. My CPU is still throttled to 40%, wireless powersave is still on, etc.

To test everything, I've been forcing using the -profile <name> -v to see what's going on. Everything looks okay and it appears to set everything back, but nothing actually does. My /etc/powermgr.conf is basically the default one with the wireless stuff commented out (since I use iwconfig).

Any ideas?

Thanks.
Back to top
View user's profile Send private message
ttuttle
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2004
Posts: 131

PostPosted: Mon Jul 18, 2005 5:12 pm    Post subject: Reply with quote

dresdn wrote:
Late last week I found this thread and decided to give 0.0.6 a try, and well, I really like it =P

There is one strange problem that I can't figure out and I really don't have the time to dive into the code atm. Basically, if I goto battery, everything get's set to my battery profile, my wireless card, cpu get's throttled, etc. But, when I go back to ac mode, nothing gets reverted. My CPU is still throttled to 40%, wireless powersave is still on, etc.

To test everything, I've been forcing using the -profile <name> -v to see what's going on. Everything looks okay and it appears to set everything back, but nothing actually does. My /etc/powermgr.conf is basically the default one with the wireless stuff commented out (since I use iwconfig).

Any ideas?

Thanks.


Can you run powermgr --auto -d10 and post the log? While it's running, plug the AC adapter in and out so I can see what's going on when you do.

By the way, powermgr is now at sourceforge.net, and version 0.0.8 is out. (But don't try it yet, because the debug messages are much less helpful.)

Thanks for your interest in powermgr. I look forward to crushing the bugs you find! ;-)
Back to top
View user's profile Send private message
dresdn
n00b
n00b


Joined: 18 Jul 2005
Posts: 9

PostPosted: Mon Jul 18, 2005 11:50 pm    Post subject: Reply with quote

ThinkingInBinary wrote:
dresdn wrote:
Late last week I found this thread and decided to give 0.0.6 a try, and well, I really like it =P



Can you run powermgr --auto -d10 and post the log? While it's running, plug the AC adapter in and out so I can see what's going on when you do.



Actually I *was* running 0.0.8, but .6 just stuck in my head from a previous post. What I did was just downgrade to .7 (which says .6 as the $version ;))

Anyways, I ran the --auto -d10 with the AC plugged in, then I unplugged it, and ran it again, then plugged it back in, and ran powermgr a final time. Below are the results from each.

To be sure I didn't break anything, I ran all of this just after doing a 'make install' with the .7 source.

Thanks,
Mike

Code:

mike ~ # /usr/sbin/powermgr --auto -d10
doing auto-configuration
auto-configuring AC adapter
setting config variable "ac adapter" to "acpi"
auto-configuring battery
setting config variable "battery" to "acpi"
auto-configuring brightness
auto-configuring fan input
setting config variable "fan in" to "acpi"
auto-configuring fan output
auto-configuring temperature
setting config variable "temperature" to "acpi"
auto-configuration done
loading inputs
loading input acpi-ac-adapter.input.pl
loading ACPI AC adapter input
loading input acpi-battery.input.pl
loading ACPI battery input
loading input acpi-fan.input.pl
loading ACPI fan input
loading input acpi-temperature.input.pl
loading ACPI thermal zone input
loading input battery.input.pl
loading battery helper input
loading input dell-fan.input.pl
loading input dell-temperature.input.pl
loading input hddtemp.input.pl
loading hddtemp input
loading input ibm-temperature.input.pl
loading input load-average.input.pl
loading load average input
loading input omnibook-ac.input.pl
loading input omnibook-battery.input.pl
loading input omnibook-fan.input.pl
loading input omnibook-temperature.input.pl
loading input running-program.input.pl
loading running program input
loading input toshiba-fan.input.pl
loaded inputs
loading outputs
loading output acpi-fan.output.pl
loading output asus-brightness.output.pl
loading output cpufreq.output.pl
loading cpufreq output
loading output dell-fan.output.pl
loading output execute.output.pl
loading execute command output
loading output file.output.pl
loading file output
loading output ibm-brightness.output.pl
loading output ibm-fan.output.pl
loading output ipw2200.output.pl
loading ipw2200 output
loading output laptop-mode.output.pl
loading laptop mode output
loading output omnibook-brightness.output.pl
loading output runlevel.output.pl
loading runlevel output
loading output service.output.pl
loading service output
loading output speedfreq.output.pl
loading speedfreq output
loading output toshiba-brightness.output.pl
loading output toshiba-fan.output.pl
loading output wireless.output.pl
loading wireless output
loaded outputs
loading config file
loading profile performance
setting cpu governor to performance
setting fan to auto
setting laptop mode to off
setting brightness to 100%
setting wireless power management(eth1) to off
setting ipw2200 power management(eth1) to off
loaded profile performance
loading profile normal
setting cpu governor to ondemand:ignore_nice=0
setting fan to auto
setting laptop mode to off
setting brightness to 75%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to 5
loaded profile normal
loading profile powersave
setting cpu governor to powersave
setting fan to off
setting laptop mode to on
setting brightness to 50%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to 1
loaded profile powersave
loading profile ac
setting cpu governor to ondemand:ignore_nice=0
setting fan to auto
setting laptop mode to off
setting brightness to 100%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to ac
loaded profile ac
loading profile battery
setting cpu governor to conservative:ignore_nice=1
setting fan to off
setting laptop mode to on
setting brightness to 75%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to battery
loaded profile battery
loading profile critical
setting cpu governor to powersave
setting fan to off
setting laptop mode to off
setting brightness to 50%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to battery
loaded profile critical
loading rule
setting ac adapter to off in rule
setting battery percentage to <10% in rule
setting profile to critical in rule
loaded rule
loading rule
setting ac adapter to off in rule
setting profile to battery in rule
loaded rule
loading rule
setting running program(make,gcc) to yes in rule
setting profile to performance in rule
loaded rule
loading rule
setting running program(bzflag,tuxracer,supertux) to yes in rule
setting profile to performance in rule
loaded rule
loading rule
setting ac adapter to on in rule
setting profile to ac in rule
loaded rule
loading rule
setting profile to normal in rule
loaded rule
loaded config file
lock file does not exist
executing update_profile myself
searching for matching rule
checking rule
reading acpi file /proc/acpi/ac_adapter/AC/state
/proc/acpi/ac_adapter/AC/state/state = on-line
input ac adapter = 1
checking rule
checking rule
input running program(make,gcc) = 0
checking rule
input running program(bzflag,tuxracer,supertux) = 0
checking rule
ac adapter = on
rule found
switching to profile ac
output fan <- auto
no such output fan
output brightness <- 100%
no such output brightness
output wireless power management(eth1) <- on
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device eth1 ; Operation not supported.
output cpu governor <- ondemand:ignore_nice=0
setting cpu0 governor to ondemand
setting cpu0 setting ignore_nice to 0
output laptop mode <- off
 * Caching service dependencies ...                                                                                                                             [ ok ] * ERROR:  "laptop_mode" has not yet been started.
output ipw2200 power management(eth1) <- ac
Setting iwpriv eth1 set_power 6
Set iwpriv eth1 set_power 6


Removed the ac adapter:

Code:

mike ~ # /usr/sbin/powermgr --auto -d10
doing auto-configuration
auto-configuring AC adapter
setting config variable "ac adapter" to "acpi"
auto-configuring battery
setting config variable "battery" to "acpi"
auto-configuring brightness
auto-configuring fan input
setting config variable "fan in" to "acpi"
auto-configuring fan output
auto-configuring temperature
setting config variable "temperature" to "acpi"
auto-configuration done
loading inputs
loading input acpi-ac-adapter.input.pl
loading ACPI AC adapter input
loading input acpi-battery.input.pl
loading ACPI battery input
loading input acpi-fan.input.pl
loading ACPI fan input
loading input acpi-temperature.input.pl
loading ACPI thermal zone input
loading input battery.input.pl
loading battery helper input
loading input dell-fan.input.pl
loading input dell-temperature.input.pl
loading input hddtemp.input.pl
loading hddtemp input
loading input ibm-temperature.input.pl
loading input load-average.input.pl
loading load average input
loading input omnibook-ac.input.pl
loading input omnibook-battery.input.pl
loading input omnibook-fan.input.pl
loading input omnibook-temperature.input.pl
loading input running-program.input.pl
loading running program input
loading input toshiba-fan.input.pl
loaded inputs
loading outputs
loading output acpi-fan.output.pl
loading output asus-brightness.output.pl
loading output cpufreq.output.pl
loading cpufreq output
loading output dell-fan.output.pl
loading output execute.output.pl
loading execute command output
loading output file.output.pl
loading file output
loading output ibm-brightness.output.pl
loading output ibm-fan.output.pl
loading output ipw2200.output.pl
loading ipw2200 output
loading output laptop-mode.output.pl
loading laptop mode output
loading output omnibook-brightness.output.pl
loading output runlevel.output.pl
loading runlevel output
loading output service.output.pl
loading service output
loading output speedfreq.output.pl
loading speedfreq output
loading output toshiba-brightness.output.pl
loading output toshiba-fan.output.pl
loading output wireless.output.pl
loading wireless output
loaded outputs
loading config file
loading profile performance
setting cpu governor to performance
setting fan to auto
setting laptop mode to off
setting brightness to 100%
setting wireless power management(eth1) to off
setting ipw2200 power management(eth1) to off
loaded profile performance
loading profile normal
setting cpu governor to ondemand:ignore_nice=0
setting fan to auto
setting laptop mode to off
setting brightness to 75%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to 5
loaded profile normal
loading profile powersave
setting cpu governor to powersave
setting fan to off
setting laptop mode to on
setting brightness to 50%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to 1
loaded profile powersave
loading profile ac
setting cpu governor to ondemand:ignore_nice=0
setting fan to auto
setting laptop mode to off
setting brightness to 100%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to ac
loaded profile ac
loading profile battery
setting cpu governor to conservative:ignore_nice=1
setting fan to off
setting laptop mode to on
setting brightness to 75%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to battery
loaded profile battery
loading profile critical
setting cpu governor to powersave
setting fan to off
setting laptop mode to off
setting brightness to 50%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to battery
loaded profile critical
loading rule
setting ac adapter to off in rule
setting battery percentage to <10% in rule
setting profile to critical in rule
loaded rule
loading rule
setting ac adapter to off in rule
setting profile to battery in rule
loaded rule
loading rule
setting running program(make,gcc) to yes in rule
setting profile to performance in rule
loaded rule
loading rule
setting running program(bzflag,tuxracer,supertux) to yes in rule
setting profile to performance in rule
loaded rule
loading rule
setting ac adapter to on in rule
setting profile to ac in rule
loaded rule
loading rule
setting profile to normal in rule
loaded rule
loaded config file
lock file does not exist
executing update_profile myself
searching for matching rule
checking rule
reading acpi file /proc/acpi/ac_adapter/AC/state
/proc/acpi/ac_adapter/AC/state/state = off-line
input ac adapter = 0
ac adapter = off
reading acpi file /proc/acpi/battery/BAT0/state
/proc/acpi/battery/BAT0/state/remaining capacity = 7200 mAh
reading acpi file /proc/acpi/battery/BAT0/info
/proc/acpi/battery/BAT0/info/design capacity = 7200 mAh
input battery percentage = 1
checking rule
ac adapter = off
rule found
switching to profile battery
output fan <- off
no such output fan
output brightness <- 75%
no such output brightness
output wireless power management(eth1) <- on
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device eth1 ; Operation not supported.
output cpu governor <- conservative:ignore_nice=1
setting cpu0 governor to conservative
setting cpu0 setting ignore_nice to 1
output laptop mode <- on
 * WARNING:  "laptop_mode" has already been started.
output ipw2200 power management(eth1) <- battery
Setting iwpriv eth1 set_power 7
Set iwpriv eth1 set_power 7


Plugged AC adapter back in:

Code:

mike ~ # /usr/sbin/powermgr --auto -d10
doing auto-configuration
auto-configuring AC adapter
setting config variable "ac adapter" to "acpi"
auto-configuring battery
setting config variable "battery" to "acpi"
auto-configuring brightness
auto-configuring fan input
setting config variable "fan in" to "acpi"
auto-configuring fan output
auto-configuring temperature
setting config variable "temperature" to "acpi"
auto-configuration done
loading inputs
loading input acpi-ac-adapter.input.pl
loading ACPI AC adapter input
loading input acpi-battery.input.pl
loading ACPI battery input
loading input acpi-fan.input.pl
loading ACPI fan input
loading input acpi-temperature.input.pl
loading ACPI thermal zone input
loading input battery.input.pl
loading battery helper input
loading input dell-fan.input.pl
loading input dell-temperature.input.pl
loading input hddtemp.input.pl
loading hddtemp input
loading input ibm-temperature.input.pl
loading input load-average.input.pl
loading load average input
loading input omnibook-ac.input.pl
loading input omnibook-battery.input.pl
loading input omnibook-fan.input.pl
loading input omnibook-temperature.input.pl
loading input running-program.input.pl
loading running program input
loading input toshiba-fan.input.pl
loaded inputs
loading outputs
loading output acpi-fan.output.pl
loading output asus-brightness.output.pl
loading output cpufreq.output.pl
loading cpufreq output
loading output dell-fan.output.pl
loading output execute.output.pl
loading execute command output
loading output file.output.pl
loading file output
loading output ibm-brightness.output.pl
loading output ibm-fan.output.pl
loading output ipw2200.output.pl
loading ipw2200 output
loading output laptop-mode.output.pl
loading laptop mode output
loading output omnibook-brightness.output.pl
loading output runlevel.output.pl
loading runlevel output
loading output service.output.pl
loading service output
loading output speedfreq.output.pl
loading speedfreq output
loading output toshiba-brightness.output.pl
loading output toshiba-fan.output.pl
loading output wireless.output.pl
loading wireless output
loaded outputs
loading config file
loading profile performance
setting cpu governor to performance
setting fan to auto
setting laptop mode to off
setting brightness to 100%
setting wireless power management(eth1) to off
setting ipw2200 power management(eth1) to off
loaded profile performance
loading profile normal
setting cpu governor to ondemand:ignore_nice=0
setting fan to auto
setting laptop mode to off
setting brightness to 75%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to 5
loaded profile normal
loading profile powersave
setting cpu governor to powersave
setting fan to off
setting laptop mode to on
setting brightness to 50%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to 1
loaded profile powersave
loading profile ac
setting cpu governor to ondemand:ignore_nice=0
setting fan to auto
setting laptop mode to off
setting brightness to 100%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to ac
loaded profile ac
loading profile battery
setting cpu governor to conservative:ignore_nice=1
setting fan to off
setting laptop mode to on
setting brightness to 75%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to battery
loaded profile battery
loading profile critical
setting cpu governor to powersave
setting fan to off
setting laptop mode to off
setting brightness to 50%
setting wireless power management(eth1) to on
setting ipw2200 power management(eth1) to battery
loaded profile critical
loading rule
setting ac adapter to off in rule
setting battery percentage to <10% in rule
setting profile to critical in rule
loaded rule
loading rule
setting ac adapter to off in rule
setting profile to battery in rule
loaded rule
loading rule
setting running program(make,gcc) to yes in rule
setting profile to performance in rule
loaded rule
loading rule
setting running program(bzflag,tuxracer,supertux) to yes in rule
setting profile to performance in rule
loaded rule
loading rule
setting ac adapter to on in rule
setting profile to ac in rule
loaded rule
loading rule
setting profile to normal in rule
loaded rule
loaded config file
lock file does not exist
executing update_profile myself
searching for matching rule
checking rule
reading acpi file /proc/acpi/ac_adapter/AC/state
/proc/acpi/ac_adapter/AC/state/state = on-line
input ac adapter = 1
checking rule
checking rule
input running program(make,gcc) = 0
checking rule
input running program(bzflag,tuxracer,supertux) = 0
checking rule
ac adapter = on
rule found
switching to profile ac
output fan <- auto
no such output fan
output brightness <- 100%
no such output brightness
output wireless power management(eth1) <- on
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device eth1 ; Operation not supported.
output cpu governor <- ondemand:ignore_nice=0
setting cpu0 governor to ondemand
setting cpu0 setting ignore_nice to 0
output laptop mode <- off
 * ERROR:  "laptop_mode" has not yet been started.
output ipw2200 power management(eth1) <- ac
Setting iwpriv eth1 set_power 6
Set iwpriv eth1 set_power 6
mike ~ #
Back to top
View user's profile Send private message
ttuttle
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2004
Posts: 131

PostPosted: Fri Jul 22, 2005 7:48 pm    Post subject: Version 0.0.10 is out! Reply with quote

Version 0.0.10 is now out!

You can get it at Sourceforge. It now includes multiple battery support! (Reilly, this means you have to try it now!)

Comments/flames to powermgr.thinkinginbinary@spamgourmet.org.
Back to top
View user's profile Send private message
Estariel
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2003
Posts: 85

PostPosted: Mon Jul 25, 2005 11:13 am    Post subject: Reply with quote

As I'm extremely lazy... is there an ebuild? :D
Back to top
View user's profile Send private message
ttuttle
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2004
Posts: 131

PostPosted: Mon Jul 25, 2005 4:09 pm    Post subject: Reply with quote

Estariel wrote:
As I'm extremely lazy... is there an ebuild? :D


It's being worked on...
Back to top
View user's profile Send private message
ttuttle
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2004
Posts: 131

PostPosted: Mon Jul 25, 2005 4:58 pm    Post subject: Reply with quote

UPDATE: There is now an ebuild for powermgr at the SourceForge page. In the "Download" section there is a link to the ebuild and an explanation of how to install it and what USE flags to use.

The ebuild takes several use flags:


  • General USE flags:
  • acpi - Ensures sys-power/acpid is installed.
  • wireless - Ensures net-wireless/wireless-tools is installed.
  • speedfreq - Ensures sys-power/speedfreq is installed.
  • Hardware-specific USE flags:
  • There is no Asus use flag yet because Toshiba laptop support is entirely kernel-based.
  • dell - Ensures app-laptop/i8kutils is installed. (Use on Dell laptops.)
  • ibm - Ensures app-laptop/ibm-acpi is installed. (Use on IBM laptops.)
  • omnibook - Ensures app-laptop/omnibook is installed. (Use on Omnibook laptops.)
  • There is no Toshiba use flag yet because Toshiba laptop support is entirely kernel-based.
  • ipw2200 - Ensures net-wireless/ipw2200 is installed. (Use on laptops with Intel PRO/Wireless 2200 card, e.g. most newer Centrino brand laptops)


Unfortunately, due to a combination of laziness and sloth on my part and impatience on Estariel's part ;-) it doesn't yet check to ensure you have the right kernel modules, and it installs all the inputs and outputs regardless of whether you use them. (They're tiny files anyway, it's not a big deal.)

Please try the ebuild, see if it works--maybe powermgr can be in Portage some day!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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