LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-29-2008, 06:52 PM   #1
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Rep: Reputation: 31
Sound problems in KDE with multiple sessions


Hello Forum,
I know this is frequently asked, but sometimes it happens and sometimes it doesn't, and none of the solutions I've found apply.

A typical scenario: I get up early in the morning to do some coding, log in to KDE, turn on emms (the Emacs multimedia system), which uses mplayer and ogg123 and mpg321 to play music. I stop emms, but stay logged in and she starts a new KDE session. The sound doesn't work, Firefox locks up on Youtube videos, etc etc.

I thought this was because:
* I was using Fvwm; when I was using Fvwm we'd get the "failure to initialize sound device" error, however I switched back to KDE and we don't get the error message, but sometimes still get the sound problems
* permissions on the audio devices; I've seen this solution on a lot of other forums and for other distros: both of us are members of the audio group, and the permissions on /dev/sound are as follows:
Code:
/home/joel: Zshell> ls -l /dev/sound
total 0
crw-rw--w- 1 root audio 14, 12 2008-01-26 20:24 adsp
crw-rw--w- 1 root audio 14,  4 2008-01-26 20:24 audio
crw-rw--w- 1 root audio 14, 20 2008-01-26 20:24 audio1
crw-rw--w- 1 root audio 14,  3 2008-01-26 20:24 dsp
crw-rw--w- 1 root audio 14, 19 2008-01-26 20:24 dsp1
crw-rw--w- 1 root audio 14,  0 2008-01-26 20:24 mixer
crw-rw--w- 1 root audio 14, 16 2008-01-26 20:24 mixer1
crw-rw--w- 1 root audio 14,  1 2008-01-26 20:24 sequencer
crw-rw--w- 1 root audio 14,  8 2008-01-26 20:24 sequencer2
* somebody (me) left a music player program open, thus locking the devices: I just tried this: went over to my wife's desktop, started Amarok playing "I Love the Nightlife," then stopped playback, left Amarok open and went back to my desktop, opened a new instance of Amarok and played 10,000 Maniacs. All with sound that worked. I also played a video on Youtube, and it worked perfectly.

If this has been solved on Slackware, please point me in the right direction. For right now it seems the only safe thing to do is for us not to have multiple sessions open, which is a kind of a drag.

Thanks for any suggestions,
Joel
 
Old 01-29-2008, 09:56 PM   #2
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-13.37
Posts: 1,952

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
Unfortunately I have nothing to suggest -- however I will say that sound works for me from two X sessions (running from different users) simultaneously, even if sound is playing on both (ie sound from both sessions can play at the same time). So I know it isn't necessarily a problem with Slackware itself (I'm using Slackware 12.0) and may instead be a specific problem with the apps you are using or your setup (for the record, I have only tried Amarok on one session and youtube videos etc. on the other session -- it may be an artifact of the specific apps you are running; I have no idea).
 
Old 01-30-2008, 12:37 AM   #3
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 51
This might happen due to variety of reasons. Applications can use /dev/dsp directly or use software based mixer like arts or esd. When some app is accessing dsp directly they put a lock on it, so no other app could use it. That's why you can't hear music from two sources at the same time if your mixer isn't setup. What does mixer do? It takes various sources of sound and mixes (adds) them together so the produced sound wave appears to be made from different sound sources. When this mixer is holding a lock on /dev/dsp, no other mixer can use /dev/dsp. (afaik, dsp - digital sound processor). So when you start KDE, arts sound deamon (artsd) is started. Arts is KDE sound mixer. When you start sound apps, they might access /dev/dsp directly, access arts(d) or any other mixer (like esd). So you can imagine that some app might be holding a lock on /dev/dsp when arts is accessing it (no sound from kde) or vice versa. The best practise is to set all apps to use same mixer and that could be done using alsa and its asoundrc. According to their wiki you don't need to set up asoundrc these days (I still have ancient alsa), so you could try to direct output to alsa from all apps (at least xmms can do this, not sure about Amarok).
 
  


Reply

Tags
artsd, kde, 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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Autologins; Multiple Users; Multiple Sessions mrclisdue Linux - Desktop 1 09-26-2007 05:50 AM
KDE and multiple sessions dismas Linux - Newbie 2 10-29-2006 12:10 AM
Multiple X Sessions with KDE/Gentoo bee2643 Linux - Distributions 1 01-26-2006 06:26 PM
Sound in multiple sessions LinuxConvert-06/05 Linux - Newbie 1 07-20-2005 12:00 PM
sharing sound in multiple sessions nitrambass Mandriva 5 06-23-2004 05:19 PM


All times are GMT -5. The time now is 10:10 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
Open Source Consulting | Domain Registration