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

stopping laptop sound on suspend?

My OB800 doesn't come back from a suspend when I've
suspended with music playing (xmms or mpg123 or freeamp)
:(  This is a bummer because I use my headphones to 
drown out distractions while I work.

Most of the time this is not much of a problem, since I am
on A/C or I stop the music before I hit the On/Off.  But
when I'm really into some code in the middle of a long 
flight or bus ride (and being really productive for a 
change) s when I'm not watching that xapm bar too closely
and it shuts itself off when the battery gets low.  
(Another clue: when music is playing, I don't get that 
BIOS-generated two-minute warning either.)  So I swap
batteries and have to do a pushbutton restart and it 
takes half my second battery (20-30 minutes of heavy 
disk activity) to fsck the 15GB partition on the way back 

((if this keeps up I'll have to the 20G drive with my
CD collection on it onto that open source hardware MP3 
player I haven't gotten around to wiring up yet and go 
back to using the 2G drive for Linux :( . ))

As a workaround, I'm thinking I ought to put something in
/etc/pcmcia/event.d but when I read the apmd man page or
zgrep around /usr/doc/apmd I don't find much about about 
it.  Heck, I'm not even sure what event to trigger off of 
(does an OB800 goes into 'standby' or 'suspend' mode when 
I hit its "On/Off" button?  (I *do* know it doesn't truly 
go OFF since it usually does its beatiful Instant-On thing 
instead of fsck'ing when I hit it again later).

If I do find out what event to trigger off of, should I have
it unload the sound module? (rmmod sb sb_lib uart401 sound)
or do a 'killall (xmms|freeamp|mpg123)'  Or is there some way 
to suspend sound or shut down the music before the suspend 
(if that's what it is) kicks in.

BTW, my /etc/modules contains 'sb io=0x220 irq=10' and the
chip is detected by sb.o as an ESS1887.  I haven't
customized /etc/modules.conf of /etc/modutils/local or run
sndconfig.  My kernel (2.4.4) has CONFIG_APM, 
and CONFIG_APM_ALLOW_INTS are off.  The CPU is a P166 and
the it has the original 16 MB RAM plus a 32M expansion for
48M total (top shows 46196K).

Any tips or tricks or ideas or RT(specific)FMs greatly 


Reply to: