You are not logged in.

#1 2007-06-13 08:55:59

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

High sound latency [SOLVED]

Hello all,

I've recently started trying out Arch Linux with KDEmod, and I find that I like the simplicity of the system. I do have a few glitches that need to be worked out, but I'm making good progress. One annoying problem that I do have is that playing sounds seem to have a high latency.

It seems that whenever a notification dialog that plays a sound appears, I see the dialog and then anywhere from one to three seconds later I hear the associated notification sound. In the time between when the dialog appears and when the sound plays the machine does nothing - I cannot even move the mouse. Other than this problem, the sound plays fine.

In the KDE Control Center, I've gone to Sound & Multimedia->Sound System and tried with skip prevention both enabled and disabled, but I still have the same problem. Does anyone have any ideas on how I make the sound system a little bit more responsive?

I have a Dell Inspiron 9300 running the stock kernel 2.6.21-ARCH. For the sound card, the lspci utility reports:

00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)

for the sound card. For a while I used openSUSE on this same machine and it did not have the same sound latency problem, so I have to think there is some configuration that I am missing.

I thank you for any suggestions that you might have.
Regards,
jbro

Last edited by jbromley (2007-10-16 07:13:02)

Offline

#2 2007-06-16 15:34:46

Faxanadu
Member
Registered: 2006-07-20
Posts: 18

Re: High sound latency [SOLVED]

I have exactly the same problem here, not only in KDE but all sound systems, it seems to be a problem with integrated sound boards because when i had a Sound Blaster Audigy in my system all worked fine, so I suppose is a software mixer problem.
My sound card is (lspci):

00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)

I had tested it at Windows and Ubuntu and the sound is ok, the problem is with Arch.

My System:
Athlon 64 3400+
1Gbs Dual Channel RAM
My Arch System:
Arch Linux (Duke)
Kernel 2.16.21
Alsa Libs 1.0.14-2

Offline

#3 2007-06-16 19:14:20

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: High sound latency [SOLVED]

Try using alsa directly instead of some crappy sound servers.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#4 2007-06-16 19:33:22

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: High sound latency [SOLVED]

shining wrote:

Try using alsa directly instead of some crappy sound servers.

Could you please elaborate? I am not using esd or the arts daemons, so I should be using ALSA directly, as far as I can tell. I have tried turning off the KDE sound system in the Control Panel thinking I could avoid any servers that KDE uses, but then I get no sound, of course. If KDE automatically uses arts, then I'm not too sure about how to turn it off and go directly to ALSA. Any pointers to documentation would be great.

Thanks.

Offline

#5 2007-06-16 19:35:24

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: High sound latency [SOLVED]

Faxanadu wrote:

I had tested it at Windows and Ubuntu and the sound is ok, the problem is with Arch

I do not have problems with other distros - openSUSE in particular - either. I do have an integrated sound board on my Dell Inspiron 9300. That it works fine in openSUSE leads me to believe that there is some KDE, KDEmod, or Arch configuration that is not optimal.

Offline

#6 2007-06-16 21:54:55

Faxanadu
Member
Registered: 2006-07-20
Posts: 18

Re: High sound latency [SOLVED]

shining wrote:

Try using alsa directly instead of some crappy sound servers.

I am already using ALSA, I also set /etc/security/limits.conf with:

@audio          -       rtprio          80
@audio          -       nice           -10
@audio          -       memlock         240000

and the problem still continue

Offline

#7 2007-07-03 22:23:04

depp
Member
From: Ulm, Germany
Registered: 2007-05-01
Posts: 51

Re: High sound latency [SOLVED]

i have the same problem 2 and i'm not using kdemod. so it may be related to alsa configuration

Offline

#8 2007-07-04 04:50:00

funkyou
Member
From: Berlin, DE
Registered: 2006-03-19
Posts: 848
Website

Re: High sound latency [SOLVED]

jbromley wrote:

Could you please elaborate? I am not using esd or the arts daemons, so I should be using ALSA directly, as far as I can tell. I have tried turning off the KDE sound system in the Control Panel thinking I could avoid any servers that KDE uses, but then I get no sound, of course. If KDE automatically uses arts, then I'm not too sure about how to turn it off and go directly to ALSA. Any pointers to documentation would be great.

Thanks.

Arts is _very_ bad, dont use it (just my opinion)

Fortunately, you can specify another program instead of arts to play your sounds.
At first, open kcontrol and disable the sound system. Then open the system notifications entry and click on player settings at the lower right. In the upcoming window, set to use an external player and put the "play" command into the line (you can also use other players like ogg123, but play has the benefit that it plays nearly everything. Its in the sox package).

This will play sounds without those funky lags that happen with arts, except your hdd is working hard...


want a modular and tweaked KDE for arch? try kdemod

Offline

#9 2007-07-04 12:49:28

depp
Member
From: Ulm, Germany
Registered: 2007-05-01
Posts: 51

Re: High sound latency [SOLVED]

funkyou wrote:

Arts is _very_ bad, dont use it (just my opinion)

Fortunately, you can specify another program instead of arts to play your sounds.
At first, open kcontrol and disable the sound system. Then open the system notifications entry and click on player settings at the lower right. In the upcoming window, set to use an external player and put the "play" command into the line (you can also use other players like ogg123, but play has the benefit that it plays nearly everything. Its in the sox package).

This will play sounds without those funky lags that happen with arts, except your hdd is working hard...

it's a very decent workaround

Offline

#10 2007-10-16 07:14:35

jbromley
Member
From: Pasadena, CA
Registered: 2007-02-04
Posts: 268

Re: High sound latency [SOLVED]

Thanks, funkyou. I recently moved my production machine to use Arch and so I revisited this thread and your post was right on the money. Sounds works great now.

Thanks.

Offline

#11 2007-10-16 09:28:09

fs4000
Member
From: Germany
Registered: 2007-10-15
Posts: 20

Re: High sound latency [SOLVED]

Hello,
could it be that you have the same problem like me?
http://bbs.archlinux.org/viewtopic.php?id=38545
I think the reason is that xine isn't able to play short vorbis files and aRts is using xine.
In other distros (suse too) aRts uses aKode to decode vorbis. So it works perfectly.
Disabling all soundservers means that only one program can use the soundcard. I don't agree with this solution.

Offline

Board footer

Powered by FluxBB