You are not logged in.

#1 2008-07-01 16:39:00

mehldutt
Member
From: Germany
Registered: 2006-01-08
Posts: 128

[SOLVED] pm-utils: own hooks not working

My bluetooth pcmcia does not like suspending.
Therefore it needs to be ejected an reinserted before and after suspend.
It used to work with following hooks:

/etc/pm/sleep.d/02bluetooth_pcmcia

#!/bin/bash
case $1 in
    hibernate)
        pccardctl eject 0
        ;;   
    suspend)
        pccardctl eject 0
        ;;
    thaw)
        pccardctl insert 0
        ;;
    resume)
        pccardctl insert 0
        ;;
    *)  echo "somebody is calling me totally wrong."
    ;;
esac

Since a couple of weeks it seems as if this file isn't executed anymore.
Any ideas?

Last edited by mehldutt (2008-07-14 10:48:35)

Offline

#2 2008-07-01 18:58:27

rumil
Member
From: Krakow, Poland
Registered: 2007-11-16
Posts: 39

Re: [SOLVED] pm-utils: own hooks not working

My hooks work flawlessly... check /var/log/pm-suspend.log to see if it actually get executed and if it gives any errors. Also make sure your script is executable and maybe try with full path to pccardctl (to not depend on $PATH)

Offline

#3 2008-07-01 20:32:12

mehldutt
Member
From: Germany
Registered: 2006-01-08
Posts: 128

Re: [SOLVED] pm-utils: own hooks not working

Thanks for your prompt answer.

It seems like it doesn't get executed although I made the script executable:

/var/log/pm-suspend.log

Initial commandline parameters:
Tue Jul  1 22:17:05 CEST 2008: Running hooks for suspend.
/usr/lib/pm-utils/sleep.d/00clear suspend: success.
/usr/lib/pm-utils/sleep.d/01grub suspend: not applicable.
/usr/lib/pm-utils/sleep.d/05led suspend: not applicable.
/usr/lib/pm-utils/sleep.d/10NetworkManager suspend: success.
/usr/lib/pm-utils/sleep.d/11netcfg suspend: success.
/usr/lib/pm-utils/sleep.d/49bluetooth suspend: not applicable.
/usr/lib/pm-utils/sleep.d/50modules suspend: not applicable.
/usr/lib/pm-utils/sleep.d/55battery suspend: success.
/usr/lib/pm-utils/sleep.d/65alsa suspend: success.
/usr/lib/pm-utils/sleep.d/90clock suspend: success.
/usr/lib/pm-utils/sleep.d/94cpufreq suspend: success.
/usr/lib/pm-utils/sleep.d/95led suspend: not applicable.
/usr/lib/pm-utils/sleep.d/98smart-kernel-video suspend: success.
/usr/lib/pm-utils/sleep.d/99video suspend: success.
Tue Jul  1 22:17:09 CEST 2008: performing suspend
Tue Jul  1 22:17:20 CEST 2008: Awake.
Tue Jul  1 22:17:20 CEST 2008: Running hooks for resume
/usr/lib/pm-utils/sleep.d/99video resume: success.
/usr/lib/pm-utils/sleep.d/98smart-kernel-video resume: success.
/usr/lib/pm-utils/sleep.d/95led resume: not applicable.
/usr/lib/pm-utils/sleep.d/94cpufreq resume: success.
/usr/lib/pm-utils/sleep.d/90clock resume: success.
/usr/lib/pm-utils/sleep.d/65alsa resume: success.
/usr/lib/pm-utils/sleep.d/55battery resume: success.
/usr/lib/pm-utils/sleep.d/50modules resume: success.
/usr/lib/pm-utils/sleep.d/49bluetooth resume: not applicable.
/usr/lib/pm-utils/sleep.d/11netcfg resume: success.
/usr/lib/pm-utils/sleep.d/10NetworkManager resume: success.
/usr/lib/pm-utils/sleep.d/05led resume: not applicable.
/usr/lib/pm-utils/sleep.d/01grub resume: not applicable.
/usr/lib/pm-utils/sleep.d/00clear resume: success.
Tue Jul  1 22:17:20 CEST 2008: Finished.

Offline

#4 2008-07-01 21:10:41

rumil
Member
From: Krakow, Poland
Registered: 2007-11-16
Posts: 39

Re: [SOLVED] pm-utils: own hooks not working

I don't think it really matters, but try renaming your hook so it starts with 2 digits, eg. 00myhook.
How do you fire suspend event? By calling pm-(suspend|hibernate)? If so, I guess it has to be some kind of permission problem, since all what these scripts do is list and execute scripts in /usr/lib/pm-utils/sleep.d and /etc/pm/sleep.d

Last edited by rumil (2008-07-01 21:11:14)

Offline

#5 2008-07-01 21:48:05

mehldutt
Member
From: Germany
Registered: 2006-01-08
Posts: 128

Re: [SOLVED] pm-utils: own hooks not working

Renaming didn't do anything either.

Both, calling pm-(suspend|hibernate) and gnome-power-manager make no difference.

Offline

#6 2008-07-14 10:47:43

mehldutt
Member
From: Germany
Registered: 2006-01-08
Posts: 128

Re: [SOLVED] pm-utils: own hooks not working

hooks are working fine again after pacman -Syu and rewriting hooks

Thanks

Offline

Board footer

Powered by FluxBB