Riley Williams <[EMAIL PROTECTED]> said:
> Basically, when I suspend and resume with the network driver running,
> the driver's still running after resume, but the network interface
> itself is dead. SO long as I remember to take the network down before
> suspending, it'll pick up fine when I resume though...
> I'd very much like to know how to get apmd to automate this, as I've
> never worked it out so far, so if you can offer any clues, they'll be
> very much appreciated...
Here is what has worked for me (with apmd version 3.0beta4):
apmd started with
/usr/sbin/apmd -s 'run-parts /etc/apm/suspend.d' \
-r 'run-parts /etc/apm/resume.d'
and the following script as /etc/apm/suspend.d/pcmcia:
#!/bin/sh
# eject all PCMCIA cards
cardctl eject
(reconfiguring on resume is automatic, as the card manager
gets insertion events for all cards). BTW, sound has a similar problem
after resume, I get by with /etc/apm/suspend.d/sound:
#! /bin/sh
# NOTE: The following won't work in general.
# Is there a way to detect which esd (if at all) is running?
# Or to contact any esd without having the correct ~/.esd_auth?
# make rsch's esd daemon give up sound device
su rsch -c "/usr/bin/esdctl standby"
# kill all other sound users
[ -d /dev/sound ] && fuser -k /dev/sound/*
# unload sound modules
#modprobe -r gen_sound # doesn't work though gen_sound is an alias for cs4232
modprobe -r cs4232
and /etc/apm/resume.d/sound (this assumes that the sound module
is loaded on demand):
#! /bin/sh
# NOTE: The following won't work in general (cf. ../suspend.d/sound).
# make rsch's esd daemon re-acquire sound device
su rsch -c "/usr/bin/esdctl resume"
Cheers, Roderich
--
'Naomi, sex at noon taxes.' I moan.
Roderich Schupp mailto:[EMAIL PROTECTED]
ExperTeam GmbH http://www.experteam.de/
Munich, Germany linux:2.3.2