PulseAudio 4.0 and Skype

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:

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:

$ PULSE_LATENCY_MSEC=60 skype

If you’re not sure if you’re hit but this bug, you’re probably not. :-)

This entry was posted in Blog and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

35 Comments

  1. Zoidberg
    Posted August 6, 2013 at 6:51 am | Permalink

    In Arch Linux it is set to PULSE_LATENCY_MSEC=30 Why 60 or 30 ms? Which is better?

    • Arun
      Posted August 6, 2013 at 12:21 pm | Permalink

      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.

  2. Tauseef
    Posted August 11, 2013 at 6:15 am | Permalink

    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
      Posted August 17, 2013 at 9:38 am | Permalink

      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).

  3. Fab
    Posted September 17, 2013 at 7:45 pm | Permalink

    Thanks a lot !!!!!!

  4. gentoo user
    Posted October 6, 2013 at 2:08 pm | Permalink

    On Gentoo this apparently is not yet fixed. Thanks for the tip.

  5. Yuris
    Posted October 24, 2013 at 1:42 pm | Permalink

    Thank You very mutch! P.S. Linux Mint 15 “olivia”

  6. chipu
    Posted November 6, 2013 at 8:15 pm | Permalink

    It worked great (Opensuse 13.1 RC2)

  7. jer007
    Posted November 10, 2013 at 5:35 am | Permalink

    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
      Posted November 10, 2013 at 5:36 am | Permalink

      Thanks by the way for the solution!

  8. Nathan Samson
    Posted November 11, 2013 at 2:11 am | Permalink

    Just had a similar problem in Fedora 20. (as reference for other people).

    The fix worked without any issue. Thanks

    • Mark Johnson
      Posted December 27, 2013 at 2:10 am | Permalink

      Same here. Fix is valid for Fedora 20.

      • Posted January 23, 2014 at 3:47 am | Permalink

        I have a fresh install of Fedora 20, and had choppy sound with Skype. Running with “PULSE_LATENCY_MSEC=60 skype” solved it.

  9. Sam
    Posted November 11, 2013 at 6:55 pm | Permalink

    Hi, thanks for the fix!

    Just wanted to know what is “PULSE_LATENCY_MSEC” is used for from a technical standpoint?

    • Arun
      Posted November 11, 2013 at 11:38 pm | Permalink

      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. :)

  10. Sam
    Posted November 12, 2013 at 12:19 am | Permalink

    Thanks, for the details! Is there more in depth on PulseAudio parameters? Probably on the PulseAudio website if any!?

  11. Posted November 13, 2013 at 2:13 am | Permalink

    What does “Sink callback failure: Timeout” and PAVUControl mean? Thanks

  12. chris
    Posted November 15, 2013 at 2:22 pm | Permalink

    Works great thanks

  13. Cedric Simon
    Posted November 28, 2013 at 8:14 pm | Permalink

    Thanks a lo!

  14. Gergely Szabó
    Posted December 1, 2013 at 7:32 pm | Permalink

    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.

  15. Codedwrench
    Posted December 1, 2013 at 10:31 pm | Permalink

    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.

  16. Frogger
    Posted December 29, 2013 at 7:55 pm | Permalink

    Been driving me mad all morning. Can’t thank you guys enough.

    openSUSE 12.3 (x86_64) VERSION = 12.3 CODENAME = Dartmouth

  17. Roy Eberhardt
    Posted January 3, 2014 at 5:06 am | Permalink

    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.

  18. Roy Eberhardt
    Posted January 3, 2014 at 5:08 am | Permalink

    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
      Posted January 3, 2014 at 9:18 am | Permalink

      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’

  19. fishears
    Posted January 18, 2014 at 10:38 pm | Permalink

    THANK YOU, from a Fedora 20 (KDE Spin) user

  20. Adam Short
    Posted January 20, 2014 at 11:18 pm | Permalink

    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.

  21. MArco
    Posted January 25, 2014 at 3:53 pm | Permalink

    Thanks, solved the issue for me as well

  22. Posted March 17, 2014 at 2:57 pm | Permalink

    Thank’s a lot. Are long time that I can’t use skype with my 64bit version of Ubuntu 13.10.

  23. Michał
    Posted March 30, 2014 at 8:37 am | Permalink

    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?

  24. Adi
    Posted April 1, 2014 at 1:29 pm | Permalink

    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

  25. gggggg
    Posted April 7, 2014 at 4:08 pm | Permalink

    ddddddddddddddddddddddddddddddddddddddddddddddddddd

    • gggggg
      Posted April 7, 2014 at 4:10 pm | Permalink

      I meant thanks alot..

  26. Bob
    Posted April 17, 2014 at 11:03 pm | Permalink

    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!

6 Trackbacks

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>