LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-22-2008, 11:20 AM   #1
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Rep: Reputation: 30
Restart Sound Daemon?


Yesterday (4/21/08) I was trying out a radio stream (it did not work) and for some reason, after that, when I went to play music in Amarok and then XMMS, the sound no longer worked. I had to restart my computer (turn completely off then back on) to get the sound back. My guess is that the stream, which did not work, had "hijacked" my sound.

How can I restart the sound without having to shut down the computer then turning it back on?
 
Old 04-22-2008, 11:30 AM   #2
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Rep: Reputation: 30
I've had the same problem... Except that it was enough for me to restart the X server. Would love to get a solution, since it's really annoying having to exit X every few weeks.
 
Old 04-22-2008, 12:23 PM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
For debian (and the ?buntu's) you can restart the sound system with

/etc/init.d/alsa-utils restart

It'll be something similar for Suse, and you'll need to be root.
 
Old 04-22-2008, 12:42 PM   #4
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
I looked in the /etc/init.d directory and the only thing I found that was alsa related was, "alsasound"

So would it be, "/etc/init.d/alsasound restart"? (without the quotes of course).
 
Old 04-22-2008, 12:45 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
So would it be, "/etc/init.d/alsasound restart"? (without the quotes of course).
You could give it a try, and see what happens
 
Old 04-22-2008, 12:57 PM   #6
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
I just did and it worked. Funny thing was that the icon for KMix was gone after that. So I restarted KMix.

Thanks much for your suggestion!
 
Old 04-22-2008, 01:06 PM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Pleased it worked.
kmix probably disappeared as there was no sound system for it to mix. If you had logged out and back in again (not rebooted), it probably would have reappeared, but you fixed it anyway.

To prevent things grabbing audio and not letting go, I have a KDE setting in kcontrol -> Sound system -> General, that is titled "Auto-suspend". I set this to "Auto suspend if idle after 1 second", and these things do not happen.
 
Old 04-23-2008, 10:35 AM   #8
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks for that info!
Mine was set to 5 seconds. I reset it like you have yours.
 
Old 12-14-2009, 11:24 AM   #9
eeconsult
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 1
Another Option - restart alsa directly

Another option to consider if the methods in the above thread do not work, is to restart the alsa kernel drivers.

On my Debian Lenny installation, "alsa-utils reload" does not reload the kernel drivers (at least not successfully - assuming it tries at all).

After trying the other methods listed in this thread without success, I found that my audio would come back after typing "alsa force-reload" as root (which removes and replaces the alsa kernel drivers among other things.) (The alsa command should be in root's path, and on my system is located at /usr/sbin/alsa)

Note however that typing that command results in the immediate termination of applications that have the audio open. (The volume control in gnome, for example.) It also killed my firefox apparently because it had a flash object present. (Of course firefox came back nicely afterwards using its automatic session save feature.) Similarly, the gnome volume control restarted all by itself simply by clicking the "retry" button on the popup that was telling me the volume control had terminated unexpectedly.

I hope this helps.

Happy linuxing.
 
1 members found this post helpful.
Old 12-14-2009, 05:23 PM   #10
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
eeconsult,

This LQ thread is dated March 2008.

It is well out of date, and not worth posting to.

But welcome to LQ!
 
Old 12-14-2009, 11:17 PM   #11
eeconsult
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 1
tredegar,

The thread is certainly old, it's true.

However Google is giving is a second life, so to speak. It came up in my initial search when I had first encountered this issue, and still does today.

I therefore thought it deserved some update and expansion. It can now serve a broader audience (with a wider variety of system difficulties) because of the mixture of solution approaches.

And thanks for the welcome! I appreciate it.
 
Old 12-16-2009, 12:46 PM   #12
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
That's great! I was hoping that this thread would help someone like it did for me.
 
Old 12-16-2009, 01:11 PM   #13
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,545

Rep: Reputation: 238Reputation: 238Reputation: 238
/etc/init.d/alsasound stop
/etc/init.d/alsasound start

Although that does depend on a proper configuration to start with for module auto loading. Also it does not address WHY your sound device went out of bounds to start with. Most times I find that some sound daemon got started that I don't typically use. artsd? Which locks the sound device from being used by other means. XMMS lets you choose which method to use for access, but it doesn't to my knowledge auto detect, nor auto changes on the fly after launch.

Fortunately most media players let you choose, and if you know which access method you are / intend / got forced to use, you can configure accordingly. Just have a slight awareness of what's going on behind the magic curtain. And keep some familiarity with your ps output so that you know when one of these things is not like the others. It also helps you identify those, I closed this application, but ps says it's still running things. Which could also be WHY you lost access. From a certain point of view, rebooting, or restarting your drivers is a last resort. It's something that you should NOT have to do if things are working the way that they're supposed to work. Although it is generally the quickest fix.
 
Old 09-16-2010, 02:37 AM   #14
agordillo
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
After much effort without success, I just tried as root the command:

alsa force-reload

and it worked fine. It killed all the process using the sound driver and restarted the sound system without restarting the X server.
 
  


Reply

Tags
daemon, restart, sound


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 11:24 AM
KDE Daemon Off, restart? stash1071 Linux - General 3 05-18-2006 05:48 PM
best way to restart a wireless card/daemon? lefty.crupps Linux - Wireless Networking 3 08-22-2005 01:36 PM
Restart daemon ust Linux - General 3 02-03-2005 03:25 AM
How to stop and restart sendmail daemon? J_Szucs Linux - Newbie 4 06-11-2002 11:31 PM


All times are GMT -5. The time now is 02:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration