Bug 156592

Summary: New alsa configuration causes aRts to go nuts, degrades sound quality
Product: [Fedora] Fedora Reporter: Mary Ellen Foster <mefoster>
Component: alsa-libAssignee: Martin Stransky <stransky>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: bostjan, cdhouch, dennisml, marius.andreiana, rpa4email, tmraz, umar
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 10:02:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mary Ellen Foster 2005-05-02 09:24:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

Description of problem:
The latest ALSA upgrade (possibly the "use dmix by default" part) seems to cause aRts to go nuts on many people's machines. This has been heavily discussed on fedora-test-list, but I don't think there's a bug for it yet, so I'm filing.

It also seems to cause bad ("crackly") sound quality for other people, but I haven't encountered this.

Here are some sample descriptions from the list. Many seem to be for AC97 sound cards (including mine). There have also been recent messages 

http://www.redhat.com/archives/fedora-test-list/2005-April/msg02292.html
http://www.redhat.com/archives/fedora-test-list/2005-April/msg02272.html
http://www.redhat.com/archives/fedora-test-list/2005-May/msg00033.html

There were also a couple of messages from Caerie Houchins describing her problems that don't seem to be in the redhat.com archives.

Version-Release number of selected component (if applicable):
alsa-lib-1.0.9rc2-1

How reproducible:
Always

Steps to Reproduce:
1. Install newest alsa-lib updates
2. Start KDE
3. Watch aRts eat CPU until it's killed and disabled
  

Additional info:

Comment 1 Dennis Jacobfeuerborn 2005-05-02 21:14:04 UTC
I can confirm the "crackling" problem with an M-Audio Audiophile 2496 soundcard.
I'm not 100% sure when the problem started but I think the last kernel that
worked properly was 1251.

Comment 2 Caerie Houchins 2005-05-03 01:02:36 UTC
I can confirm both of these symptoms.  I encountered crackling as well as the
arts issue.  First encountered after updating:

alsa-lib-1.0.9rc2-1
-------------------
* Fri Apr 22 2005 Martin Stransky <stransky> 1.0.9rc2-1
- updated to 1.0.9rc2
- add ainit tool - dmix is now default pcm device 

using:

/proc/asound/cards
0 [SB0400         ]: Audigy2 - Audigy 2 Value [SB0400]
                    Audigy 2 Value [SB0400] (rev.0, serial:0x10011102) at xe800,
irq 5

/proc/asound/modules
0 snd_emu10k 

Comment 3 John Thacker 2005-05-03 02:15:41 UTC
I got the crackling sound-- but only on things that use esd, and on the
proprietary flash plugin.

Testing with gstreamer-properties shows that esdsink produces the crackling
sound, but alsasink and osssink don't seem to.  (Not running KDE, so I can't
test aRTs.)

Using an SBLive.

Comment 4 Marius Andreiana 2005-05-03 09:21:24 UTC
Some of these could be fixed by alsa 1.0.9rc3, as this bug says:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1082

Please update alsa from rc2 to rc3 in development.

Comment 5 Martin Stransky 2005-05-03 13:36:22 UTC
Here is the testing version of 1.0.9rc3 for FC4

http://people.redhat.com/stransky/alsa-lib/


Comment 6 Sammy 2005-05-03 14:22:53 UTC
I have the same problem with 1.0.9rc3 and today's kernel. 
 
I briefly got the sound working but then it became silent. I could still use mplayer 
and realplayer to listen to things but nothing from KDE. 
 
Furthermore knotify crashes upon logout thus hanging the logout process.  
Other things seem to crash as well. 
 
KDE is not usable with these combinations 

Comment 7 Sammy 2005-05-03 14:24:38 UTC
PS: Kernel is still at 1.0.9rc2. 

Comment 8 John Thacker 2005-05-03 15:02:18 UTC
So my other problem, with the flash plugin, is also resolved if I kill esd and
restart the browser.  So apparently dmix or this version of alsa interacts
poorly with esound and aRts.  I'll try 1.0.9rc3 at some point; for now I'm just
not using esd since I don't really need it.

This is probably bad for people who need sound over network connections, though.

Comment 9 Dennis Jacobfeuerborn 2005-05-03 16:14:15 UTC
Installing alsa-lib-1.0.9rc3 fixed the crackling for me (running
kernel-2.6.11-1.1275_FC4).

Comment 10 Sammy 2005-05-03 19:18:34 UTC
I solved my problem with KDE using alsa-lib-1.0.9rc3 and 2.6.11-1.1282 kernel.   
Essentially it seems like arts is discontinued in KDE. In KDE 4.0 they will have   
something else like gstreamer etc. The problem with alsa had been reported   
there too with no solution yet. The best way to deal with this I think is to turn off   
arts altogether.   
   
So, I go to control center, choose sounds --> sound system and there choose   
"no audio input/output" option. Also, in the first page uncheck "enable sound   
system" buttion. This will make arts not start next time (it hanged my KDE when   
I chose that so I did a ctrl-alt-backspace and logged back in.)   
   
After that, again in control center --> sounds, go to system notifications page and   
at the bottom choose the "Player Settings". Uncheck  "use KDE sound system"  
and check  "use an external player" and choose /usr/bin/play as the player (from sox). 
save and restart. All KDE sounds are working fine for me after doing this. If someone 
has a better choice for player I would be interested to hear it. 

Comment 11 Marius Andreiana 2005-05-04 05:27:14 UTC
1.0.9rc3 fixes alsa problems for me, dmix works by default. Even
gstreamer-properties works now.
I haven't tried esd, there's no need for it now (unless using sound
over network...)

Comment 12 Robert Couture 2005-05-04 12:55:29 UTC
1.0.9rc3 also seems to have resolved the issue(s) for me.

Comment 13 Mary Ellen Foster 2005-05-05 09:42:01 UTC
rc3 has fixed aRts for me to a certain extent -- it no longer seems to take over
the CPU like it used to, certainly. However, it didn't seem to autosuspend
properly; I hadn't played any sounds for ages, but aRts was still active, and
"artsshell suspend" and "artsshell terminate" appeared to hang.

Comment 14 Robert Couture 2005-05-07 18:46:28 UTC
Unfortuantely, I was wrong about it being resolved.  However it may be
a new(?) bug.  All KDE sounds stop working after a short period of
time.  None of the sounds work in any form.  (Yet XMMS will work) 
Gaim using Command aplay stops working as well.  This occurs also when
using Arts.

However, I experience none of this while using Gnome.  All Gnome
sounds have been functioning for a couple of hours now without fail. 
KDE sounds fail with 10-15 minutes.  I reverted back (as suggested in
fedora-test) from 1.0.9rc3 to 1.0.9rc2-4

Comment 15 Martin Stransky 2005-05-09 08:26:29 UTC
If you still have problems with aRts, disable dmix in
/etc/asound/ainit.conf (default in 1.0.9rc2-4). 

I'll improve config/behavior of sound cards in FC, but it will take
more time and it heads into FC5.

Comment 16 Martin Stransky 2005-05-13 09:19:37 UTC
Regarding to a troubles with dmix, it's known issue, upstream works on
it. You can find more info on alsa-devel list.

Comment 17 Bostjan Lah 2005-06-24 06:35:18 UTC
What is the correct way to disable dmix in ainit.conf

Comment 18 Martin Stransky 2005-06-24 08:19:38 UTC
You can disable dmix and dsnoop by writting these lines 
to /etc/asound.conf:

pcm.!default { 
  type hw 
  card 0 
}

ctl.!default { 
  type hw 
  card 0 
}

where 0 is number of the card. (0 for the first one)



Comment 19 Adrian Bondy 2005-07-21 14:52:29 UTC
Comment #18 fixed my crackling sound problem on Gnome-CD. Many thanks.

Still no sound on Kscd ...