How To Fix The Sound Issues Between Skype 2.0 And Pulseaudio On Fedora 9

Want to support HowtoForge? Become a subscriber!
 
Submitted by o.meyer (Contact Author) (Forums) on Fri, 2008-05-30 12:31. :: Fedora | Desktop

How To Fix The Sound Issues Between Skype 2.0 And Pulseaudio On Fedora 9

Version 1.0
Author: Oliver Meyer <o [dot] meyer [at] projektfarm [dot] de>
Last edited 05/16/2008

The main problem with Pulseaudio and Skype on Fedora 9 (maybe also on other distributions) is stuttering, crackling sound. This document describes how to fix the sound issues between Skype 2.0 and Pulseaudio on Fedora 9.

This howto is a practical guide without any warranty - it doesn't cover the theoretical backgrounds. There are many ways to set up such a system - this is the way I chose.

 

1 Users & Groups

First you have to add your useraccount to the pulseaudio groups. The settings for users and groups are available in the GNOME system menu.

Enter the root password.

Double click on your username, click on "Groups" and add your useraccount to the groups pulse, pulse-rt and pulse-access.

 

2 Skype Settings

Open the Skype options and switch to the audio settings. Set all devices, except your microphone, to pulse. Setting the microphone to pulse would result in very high CPU load. Please note that I'm using the standard Skype version - not the static OSS version. I tried it but the sound quality was incredibly bad.

 

3 Pulseaudio Settings

The main problem with Pulseaudio and Skype on Fedora 9 (maybe also on other distributions) is stuttering, crackling sound. This stuttering and crackling appears only with Skype - all other applications are working without any problems. We can fix this by changing pulseaudio's resample method and some other settings.

su -
%root_password%
vi /etc/pulse/daemon.conf

Add the following lines at the end of the file:

high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
resample-method = src-sinc-best-quality

After that log out and back in again for the changes to take effect. Now the stuttering should be gone and also most of the crackling. On my system the stuttering is reduced to 0% and the crackling to more or less 10%.

 

4 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Wed, 2011-11-02 00:23.
This solved my problems on Ubuntu 11.10.
Submitted by Robin (not registered) on Wed, 2011-05-25 12:41.

On my machine running Fedora 14, these advices did not solve the problem. However, it could be solved by replacing the line

 load-module module-udev-detect

in file /etc/pulse/default.pa with 

load-module module-udev-detect tsched=0

and restarting PulseAudio afterwards. By this, the timer-based scheduling of the PA Server is disabled.

Maybe this tweak will be useful for someone.

Submitted by matthias (not registered) on Thu, 2011-12-08 12:25.

thanks a lot robin!

on my fedora16/64 bit/macbookpro5.5 this helped me improving my sounds.

Submitted by Pas_ (not registered) on Tue, 2009-07-07 00:00.

Ok it was niece, everything but last line. Oh, And everything is default settings except "realtime-scheduling = yes" and "resample-method = src-sinc-best-quality".

Set resample-method with caution because it is able to consuming lot time of yours cpu. In default it is set to src-linear in ubuntu 9.04 and it met standard users requirements. In my case *best-quality take 100% CPU, in src-linear ~20% CPU.  If you using PCU only to talks you can tray trivial, or maybe speex-float-N where 0<N<9, the 3 is default.

Im recommend to take look at two settings
default-fragments=
in documentation say it is set to 4 in ubuntu 9.04 i have 8 and it is nice.
default-fragment-size-msec= 
they say default 25 i have 10. In my opinion it should by 25ms because specification of VoIP.
that settings mean how long bufor i have. 8*25ms = 200ms its long, 100ms in sys with lack of ram is sufficient.

If have more trouble take look at :
; default-sample-format = s16le
; default-sample-rate = 44100
; default-sample-channels = 2

i leave out that.

all my settings is like that:

high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
resample-method = src-linear
default-fragments= 8
default-fragment-size-msec= 25

now it take about 23% of CPU in test speech on  AMD Athlon 64 3000+ an ubuntu 9.04 64bit.

basic info: http://linux.die.net/man/5/pulse-daemon.conf

Submitted by Kjetil Birkeland Moe (not registered) on Sun, 2009-03-08 22:36.
I found this to help - though the daemon.conf already had those lines, I didn't need to add them. I simply altered the realtime-scheduling to 'yes', and that fixed it. This was on Fedora 10.
Submitted by Andrig (not registered) on Thu, 2008-10-16 22:28.

I found your post when trying to get audio issues worked out with Skype.  I am also running Fedora 9, and I have PulseAudio selected in the GStreamer Properties for sound in and out.  I can only get audio working with the default device selection.  If I select Pulse at all it doesn't work.  If I select the default device, then things work until I play a Flash video (Flash 10), then it stops working.

 I tried your changes (I already had the groups for my user), so I just changed the daemon configuration changes.  I cannot get any sound at all with pulse.  Any ideas?