This is a public service announcement for packagers and users of Skype and PulseAudio 4.0.
In PulseAudio 4.0, we added some code to allow us to deal with automatic latency adjustment more gracefully, particularly for latency requests under ~80 ms. This exposed a bug in Skype that breaks audio in interesting ways (no sound, choppy sound, playback happens faster than it should).
We’ve spoken to the Skype developers about this problem and they have been investigating the problem. In the mean time, we suggest that users and packagers work around this problem in the mean time.
If you are packaging Skype for your distribution, you need to change the Exec line in your Skype .desktop file as follows:
1 |
Exec=env PULSE_LATENCY_MSEC=60 skype %U |
If you are a user, and your distribution doesn’t already carry this fix (as of about a week ago, Ubuntu does, and as of ~1 hour from now, Gentoo will), you need to launch Skype from the command line as follows:
1 |
$ PULSE_LATENCY_MSEC=60 skype |
If you’re not sure if you’re hit but this bug, you’re probably not. :-)
Zoidberg
August 6, 2013 — 6:51 am
In Arch Linux it is set to PULSE_LATENCY_MSEC=30 Why 60 or 30 ms? Which is better?
Arun
August 6, 2013 — 12:21 pm
30ms would likely work on many systems with PA 4.0. We picked 60ms based on what would work best on most systems, across PulseAudio versions.
Karl
August 26, 2015 — 2:01 pm
Hi Arun,
I am trying to optimise Skype on Ubuntu 14.04, and your comments here are the only ones that explained why Skype installation included the use of “env” and “PULSE_LATENCY_MSEC”. So firstly, thanks for the very useful info.
QUESTIONS: Now in 2015, is it still required to execute Skype with … env PULSE_LATENCY_MSEC=60 skype %U Current PA documentation does not mention this environment variable, so perhaps it is no longer in use? Can you point me to a PA webpage that describes PULSE_LATENCY_MSEC?
Many thanks.
Tauseef
August 11, 2013 — 6:15 am
Hi Arun, Thanks for this useful blog. I use Mageia2 system and have been unsuccessful in getting Skype to work with me. I am a great votary of open source systems but I really need to get Skype working with Mageia. Could you point out some useful literature (either online or otherwise) that I can read to get a hang of the evolution of the sound architecture in Linux – from OSS to ALSA to pulse audio?
Arun
August 17, 2013 — 9:38 am
Hi Tauseef. I don’t really know of such literature. If you need help solving the problem, dropping by #pulseaudio on Freenode IRC or a mail on the mailing list might help (can’t promise speedy replies, but it’s the best option).
Fab
September 17, 2013 — 7:45 pm
Thanks a lot !!!!!!
gentoo user
October 6, 2013 — 2:08 pm
On Gentoo this apparently is not yet fixed. Thanks for the tip.
Yuris
October 24, 2013 — 1:42 pm
Thank You very mutch! P.S. Linux Mint 15 “olivia”
chipu
November 6, 2013 — 8:15 pm
It worked great (Opensuse 13.1 RC2)
jer007
November 10, 2013 — 5:35 am
Solved it (permanently?) in Xubuntu 13.10 by doing this even though you say only to do this when you pack the distro:
in command line (install gedit if needed):
sudo gedit /usr/share/applications/skype.desktop
then changing where it reads in gedit:
Exec=skype %U
to:
Exec=env PULSE_LATENCY_MSEC=60 skype %U
Then it ran fine everytime! Hope this is useful. I only had to recreate the launcher for skype to take these modifications into account.
jer007
November 10, 2013 — 5:36 am
Thanks by the way for the solution!
Nathan Samson
November 11, 2013 — 2:11 am
Just had a similar problem in Fedora 20. (as reference for other people).
The fix worked without any issue. Thanks
Mark Johnson
December 27, 2013 — 2:10 am
Same here. Fix is valid for Fedora 20.
Mark Müller
January 23, 2014 — 3:47 am
I have a fresh install of Fedora 20, and had choppy sound with Skype. Running with “PULSE_LATENCY_MSEC=60 skype” solved it.
Sam
November 11, 2013 — 6:55 pm
Hi, thanks for the fix!
Just wanted to know what is “PULSE_LATENCY_MSEC” is used for from a technical standpoint?
Arun
November 11, 2013 — 11:38 pm
Applications can ask PulseAudio for the latency that they wish to have (the amount of time between writing out a sample and it being played out the speaker/headphones/whatever).
Skype seemed to have some weird buggy math that only kicked in at low latencies (20-25ms or less) that caused the problem you saw. Setting PULSE_LATENCY_MSEC forces the requested latency (60 is pretty safe across most setups), making sure this bug in Skype is not triggered.
Hope that makes some sense. :)
Sam
November 12, 2013 — 12:19 am
Thanks, for the details! Is there more in depth on PulseAudio parameters? Probably on the PulseAudio website if any!?
Arun
November 12, 2013 — 12:20 am
This is not a bad place to look at what kind of control you get via the API – http://freedesktop.org/software/pulseaudio/doxygen/streams.html
Dirk
November 13, 2013 — 2:13 am
What does “Sink callback failure: Timeout” and PAVUControl mean? Thanks
chris
November 15, 2013 — 2:22 pm
Works great thanks
Cedric Simon
November 28, 2013 — 8:14 pm
Thanks a lo!
Gergely Szabó
December 1, 2013 — 7:32 pm
Opensuse 13.1 x64 THX!
sudo pico /usr/share/applications/skype.desktop
then changing where it reads in pico (or joe, or vim, or any text editor) :
Exec=skype %U
to:
Exec=env PULSE_LATENCY_MSEC=60 skype %U
Ctrl-o=saving. Thats it.
Codedwrench
December 1, 2013 — 10:31 pm
I made a script in /usr/bin with Exec=env PULSE_LATENCY_MSEC=60 skype %U
that helps if you are using something like dmenu, so you don’ t have to keep typing that long command
i called my script wskype You know, (working)skype.
Frogger
December 29, 2013 — 7:55 pm
Been driving me mad all morning. Can’t thank you guys enough.
openSUSE 12.3 (x86_64) VERSION = 12.3 CODENAME = Dartmouth
Roy Eberhardt
January 3, 2014 — 5:06 am
This fixes the sound problem but breaks
bash -c ‘LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype’
The camera does not work. So I either have to have sound or sight, but not both.
Roy Eberhardt
January 3, 2014 — 5:08 am
This fixes the sound problem but breaks
bash -c ‘LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype’
The camera does not work. So I either have to have sound or sight, but not both.
Labtec 2200
Tried
Exec=env PULSE_LATENCY_MSEC=60 && bash -c ‘LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype’
With no success.
Arun
January 3, 2014 — 9:18 am
That’s incorrect syntax. You want to modify that to look like:
bash -c ‘PULSE_LATENCY_MSEC=60 LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype’
fishears
January 18, 2014 — 10:38 pm
THANK YOU, from a Fedora 20 (KDE Spin) user
Adam Short
January 20, 2014 — 11:18 pm
Thank you so much! I’ve been trying to fix this issue for ages. I can’t believe I’ve only just found your site and the brilliant solution. Works great now. I can re-enable pulseaudio and get all my sounds back. Previously I had it disabled and was using ALSA, and only skype would work.
MArco
January 25, 2014 — 3:53 pm
Thanks, solved the issue for me as well
Roberto
March 17, 2014 — 2:57 pm
Thank’s a lot. Are long time that I can’t use skype with my 64bit version of Ubuntu 13.10.
Michał
March 30, 2014 — 8:37 am
I am afraid that the picture is not so rosy. So far I cannot get a sound working on Fedora 20 x86_64 installation. I tried two different machines and results are the same. Various experiments with PULSE_LATENCY_MSEC values got me nothing. Just no sound. This is with pulseaudio-4.0-9.gitf81e3.fc20. OTOH video camera from skype does work and I even managed a vertical flip of its image. :-)
An old skype-4.0.0.8-fedora.i586, which used to work in the past on that hardware, now segfaults hence cannot be used anymore.
I have also Fedora 20 i686 handy, with the same software versions, and there skype-4.2.0.13 gets its sound like expected.
Any ideas?
Adi
April 1, 2014 — 1:29 pm
Hi,
I had the same problem when using Linphone, so I just added: export PULSE_LATENCY_MSEC=60
to my .profile and now both Skype and Linphone work fine and normal audio is also still ok.
Cheers Adi
gggggg
April 7, 2014 — 4:08 pm
ddddddddddddddddddddddddddddddddddddddddddddddddddd
gggggg
April 7, 2014 — 4:10 pm
I meant thanks alot..
Bob
April 17, 2014 — 11:03 pm
Hi, on my Fedora 20 system, the default is set to 60 msec, but I had to bump it down to 30 msec to get it to work.
Thanks!
babushka
May 8, 2014 — 5:44 pm
finally! i solved the problem! this was taking looooooong time. dammit, why pulseaudio developers never tell users, what they do or change?! skype sucks, but it’s the only way i can call my non-IT-familiy-and-friends!
i was wondering long time why command skype doesn’t work, but shortcut does. DAMN!
babushka
May 8, 2014 — 5:47 pm
btw
env PULSE_LATENCY_MSEC=30 skype %U
works too. even 28
boo
June 24, 2014 — 11:27 pm
Now the buzzing noise has gone, but the icon I can find skype when i look for it. How did i get that back. using debian.
boo
June 24, 2014 — 11:28 pm
I can’t find the sky icon…
Li Yi
August 15, 2014 — 11:25 am
seems need restarting to fix this problem with lines given, anyway thanks !! this confuse me a lot
Larry
November 20, 2014 — 5:13 pm
On dual-boot HP Compq nx9010, my Genius FaceCam VGA with built-in mic. works fine with Skype on Windows XP, but on openSUSE 13.1/LDX Skype (32bit 4.3.0.37-suse.i586 for openSUSE 12.1) has only video, NO SOUND at all. I followed the troubleshoot instructions https://en.opensuse.org/SDB:Skype and executed “sudo zypper install pulseaudio alsa-plugins-pulse alsa-plugins-pulse-32bit pavucontrol libv4l libv4l-32bit libv4l1-0 libv4l1-0-32bit libv4l2-0 libv4l2-0-32bit libv4lconvert0 libv4lconvert0-32bit” then “enabled” PulseAudio at YaST sound section. Then Executed the command “PULSE_LATENCY_MSEC=60 skype” Skype started but still does not have sound at all. Has video OK, but not a single sound. Now when I click Volume Control I get the following error message: “Connection to PulseAudio failed. Automatic retry in 5 s. In this case this is likely because PULSE_SERVER in the Environment/X11 Root Window Properties or default-server in client.config is misconfigured. This situation can also arise when PulseAudio crashed and left stale details in the X11 Root Window. If this is the case, then PulseAudio should autospawn again, or if this is not configured you should run start-pulseaudio-x11 manualy.”.
However, I noticed that now when I boot , the openSUSE asks me to login which previously was not the case, i.e. before I did the above changes. Now I have to type in the root password each time I boot the openSUSE ??? which is not a big deal, but if I could have the sound at least.