On Sunday 21 January 2007 13:02, Bert Haverkamp wrote:
>
> I have been using powersaved for quite a while now, and after some initial
> problems in 2.6.17, it works great now for months.
> Recently I installed a notebook webcam on my laptop this uses the uhci_hcd
> module. Now I have a problem suspending the laptop. It hangs on unloading
> this uhci_hcd module. unloading it by hand (modprobe -r uhci_hcd)  also
> doesn't work.
> I found that uhci_hcd is required by spca5xx (the webcam module) which is
> in turn used by two programs: kmix and ekiga.
> When I stop those two programs, suspend works.
>
> Is there a way to tell powersaved to just kill these two programs before
> suspending? Is there in general a way to specify a pre-suspend script
> and/or a post-suspend script?

You can specify any script in /etc/init.d/ to be stopped and restarted:

[EMAIL PROTECTED]:~$ grep SERVICE /etc/powersave/sleep
## The same applies for the "SERVICES_TO_RESTART"-variables which defines
SUSPEND2DISK_RESTART_SERVICES="anacron"
SUSPEND2RAM_RESTART_SERVICES=""
STANDBY_RESTART_SERVICES=""

You could have something there that kills them on "stop" - you probably 
wouldn't need to do anything on "start".  otoh, maybe you don't really need 
ubci_hcd removed at all.  In which case you would need to modify these 
settings:

[EMAIL PROTECTED]:~$ egrep  "uhci|UNLOAD" /etc/powersave/sleep
## Default:             "usb_storage sbp2 ohci_hcd uhci_hcd stir4200 ohci1394 
ipw2200 rt2500 prism54 ath_pci r8169 lt_modem Intel536 Intel537 ndiswrapper"
UNLOAD_MODULES_BEFORE_SUSPEND2DISK=""
## Default:             "usb_storage sbp2 ohci_hcd uhci_hcd stir4200 ohci1394 
ipw2200 rt2500 prism54 ath_pci r8169 lt_modem Intel536 Intel537 ndiswrapper"
UNLOAD_MODULES_BEFORE_SUSPEND2RAM=""
## Default:             "usb_storage sbp2 ohci_hcd uhci_hcd stir4200 ohci1394 
ipw2200 rt2500 prism54 ath_pci r8169 lt_modem Intel536 Intel537 ndiswrapper"
UNLOAD_MODULES_BEFORE_STANDBY=""

It's probably a little chancier doing it this way - there might be other 
things that you could attach via USB that couldn't be just hibernated, but 
usb_storage will probably deal with most of those.

Finally, there must me a way to cause a disconnect of the webcam by software 
that is identical to unplugging it.  That could then be done via an init.d 
script, and I would expect your system to then be able to suspend.
-- 
derek
_______________________________________________
powersave-users mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-users

Reply via email to