LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-24-2007, 08:28 PM   #1
mattd7591
Member
 
Registered: Jun 2006
Distribution: Debian Etch
Posts: 92

Rep: Reputation: 15
No sound after resume


I am using suspend2ram and suspend2disk to try and save energy on my computer. However on resume, sound doesn't work.
I tried doing /etc/init.d/alsa-utils restart as others said that works, but it isn't working
Im using Debian Lenny with a Soundblaster Live audio card

Last edited by mattd7591; 06-24-2007 at 08:31 PM.
 
Old 06-25-2007, 11:19 AM   #2
biophysics
Member
 
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444

Rep: Reputation: 30
Perhaps you can try to unload the sound modules after stopping sound. (modprobe -r MODULE)
You might install "hibernate-script" to do all this for you automatically (see suspend2.net). In addition you might want to try suspend2 (which is very fast and has many features).
 
Old 06-25-2007, 11:28 AM   #3
mattd7591
Member
 
Registered: Jun 2006
Distribution: Debian Etch
Posts: 92

Original Poster
Rep: Reputation: 15
someone suggested that on Debian forums with a script like
Code:
while [ "`lsmod | grep ^snd" != "" ]
do
MODULES=`lsmod | grep ^snd | awk '{print $1}' | sed -e ':a;$!N;s/\n/ /;ta'`
modprobe -r ${MODULES}
done

modprobe emu10k1x
However doing
Code:
while [ "`lsmod | grep ^snd" != "" ]
do
MODULES=`lsmod | grep ^snd | awk '{print $1}' | sed -e ':a;$!N;s/\n/ /;ta'`
modprobe -r ${MODULES}
done
results in
Code:
matt-debian:Desktop# ./Text\ File
./Text File: line 5: unexpected EOF while looking for matching ``'
./Text File: line 8: syntax error: unexpected end of file
matt-debian:Desktop#
 
Old 06-25-2007, 05:08 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
1st, are those "Code:" blocks the same? Please tell me where the differences are? If they are the same, & they look it to me, why did you post both? Putting both in your post implies they are different & need to be looked at separately. Looking for non-existent differences is a waste of my time.

As for your problem, I believe you're missing a '`' in your "while" statement -- just like the error msg says.
 
Old 06-25-2007, 05:12 PM   #5
mattd7591
Member
 
Registered: Jun 2006
Distribution: Debian Etch
Posts: 92

Original Poster
Rep: Reputation: 15
Yeah, they are the same. I don't know why I posted it twice.
I also figured out why it wasn't working.
I didn't write the script and am unfamiliar with awk and sed.

The only issue now is that I have to close sound apps to unload the modules, but that is only really an issue when listening to long files (such as tapes)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
resume: cannot stat resume device file sixerjman Linux - Kernel 0 05-27-2007 03:09 PM
no gnome sound events, mtrr overlaps, acpi sleep resume Markup Linux - Software 2 07-27-2005 05:19 AM
resume with samba marinko Linux - Networking 4 05-22-2005 11:47 AM
Network not available after resume berbsd SUSE / openSUSE 1 11-24-2004 11:30 AM
how to resume a download 286 Linux - Newbie 4 01-02-2004 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration