[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wakeup mess up function keys on powerbook



On Tue, 2003-11-25 at 08:41, Stefano Zacchiroli wrote:
> On Tue, Nov 25, 2003 at 08:23:04AM +0100, Soeren Sonnenburg wrote:
> > > Anyone else has ever had a similar problem?
> > 
> > Actually I am converting from pmud -> pbbuttonsd. And I am now convinced
> > that it 100% substitutes pmud. However I have been experiencing the
> > exact same problems that you do now when I was using pmud+pbbuttonsd,
> > which was why I restarted pbbuttonsd on every wakeup via the pmud
> > pwrctl-local script...
> 
> This is indeed the same solution I came to :-(

hmmh.

> BTW, are you really convinced that pbbuttonsd fully substitutes pmud?

yes.

> What about /etc/power/pwrctl? pbbuttonsd can execute some scripts, but
> it seems to me that it's less flexible than pmud in this ...

add Script_ProfChanged      = "/etc/power/pwrctl-wrapper %s %s"
and put the attached script to /etc/power/pwrctl-wrapper

the medium power level is not working anyway so yes it is a full
substitute.

Soeren
#!/bin/bash
# -----------------------------------------------------------------------------
# $Id: pwrctl,v 1.1.1.1 2001/12/07 11:31:53 sleemburg Exp $
#
# This script is invoked by pmud to configure the system for a
# given power level. The desired level is indicated by the first
# argument and can take the following values:
#
# minimum = minimum power
# medium  = medium power 
# maximum = full power  
# sleep   = prepare for sleep
# wakeup  = system woke up after a sleep
# warning = low battery condition detected, issue a warning to users
#
# the second argument gives the current power source, and can take the
# following values:
#
# ac
# battery
#
# This script is invoked when the AC power is connected or disconnected, 
# and also immediately after sleep. If the script /etc/power/pwrctl-local
# is present and executable, it will be called by this script before the
# main body of this script is executed. If pwrctl-local returns 1, then
# the main body of this script is NOT executed, in all other cases the
# main body of this script will be executed.

case "$1" in
sleep)
	/etc/power/pwrctl "$1" "$2"
	;;
wakeup)
	/etc/power/pwrctl "$1" "$2"
	;;
*)
	case "$2" in
	ac)
		/etc/power/pwrctl maximum "$2"
		;;
	battery)
		/etc/power/pwrctl minimum "$2"
		;;
	*)
		/etc/power/pwrctl $@
		;;
	esac
	;;
esac
exit 0

Reply to: