Skype 4.3 without PulseAudio, only ALSA. Any options?

15

6

I have been using Skype for over 10 years now, almost since the initial release, and most of my friends/family/colleagues use it too. So switching IM is not an option.

Microsoft has recently changed Skype protocol to force users to update to newer version. I will skip the emotional part a.k.a "What do I think about MicroSoft". If this info is new for you, feel free to read:

The situation is simple I have to update to newest version even on my Linux Mint machine. Newest version for Linux is 4.3

The problem I have faced is that in v 4.3 as part of improvements, Microsoft has dropped the support of ALSA:

So now Skype can only be used with PulseAudio. I have uninstalled PulseAudio long time ago because it was the source of countless bugs and glitches. Here is the list (not the full one) of issues I was experiencing with PulseAudio:

  • Mute button mutes the sound but does not unmute it
  • Slider of Pavucontrol gradually increases the sound to ~60%, then just jumps to 100%
  • When playing movies, pause buttons stops the video, but the sound continues to play for ~5 seconds.
  • When switching between songs or rewinding/seeking in Audacious sound becomes choppy
  • Choppy sound in Youtube
  • High CPU usage by PulseAudio process.
  • Sound is choppy in VirtualBox guest (tested with win XP only)

I am not the author of the phrase, but I will quote it here, because I strongly agree with it:

Most problems with the sound in Linux can be solved by removing PulseAudio

So now I face the dilemma: I have to use Skype, because I cannot force all my friends/family colleagues who are mostly Windows users to switch to other IM software. But to continue using Skype I now need to install PulseAudio (thanks to Microsoft). And, (hurrah!) I get all the old bugs, that I missed so much.

Does anyone have a workaround to this problem? Is there a way to use Skype 4.3 with ALSA? Or is there a way to trick the system and log in with the older version of Skype? Or maybe (in the worst case) run PulseAudio just for Skype and make sure it does not interfere with the rest of applications, drivers and system sound?

I am using Linux Mint 13: Maya

Any suggestions, thoughts, links will be much appreciated.

Art Gertner

Posted 2014-09-08T13:52:53.607

Reputation: 6 417

I was thinking to set up a virtual machine only for this reasons. Do you think is a reasonable workaround? – Hastur – 2014-09-10T22:25:42.933

Hm... It is not reasonable for me. However it is a workaround and it may be useful for someone else having the same problem. – Art Gertner – 2014-09-10T22:44:47.890

have a look at this thread http://forums.gentoo.org/viewtopic-p-7597786.html

– Fegnoid – 2014-09-11T11:49:22.340

@Fegnoid, thanks, this looks like what I am looking for. I will try to test this solution over the weekend and I will update my post with results! – Art Gertner – 2014-09-11T12:12:29.647

Why can't you stay with Skype 4.2.0.11, and which Linux distribution are you on? – harrymc – 2014-09-11T13:43:57.553

Hi, @harrymc, did you read the post? )) I have mentioned that MS have forced out older version of skype. I have provided 3 links to relevant articles. With 4.2.0.11 you cannot login any more. – Art Gertner – 2014-09-11T13:46:47.810

Which Linux distribution ? – harrymc – 2014-09-11T14:29:29.220

@harrymc, Mint 13 maya – Art Gertner – 2014-09-11T14:30:34.290

What's your take on this thread, showing how to make skype work with alsa, with pulseaudio used only for skype but not for the rest of your system.

– harrymc – 2014-09-11T14:38:41.420

@harrymc, please read the rest of comments above)) – Art Gertner – 2014-09-11T14:40:07.023

I see it was already suggested and probably didn't work, so some more details on why it did (or not) work would be useful. Just to note that some people say that PulseAudio is much less glitchy if one turns timer-based scheduling off by adding tsched=0 in /etc/pulse/default.pa. As another note, I believe the Windows version of Skype works on Wine which uses alsa, so may be a workaround. – harrymc – 2014-09-11T14:55:50.037

@harrymc, you keep surprising me. I will quote my own comment again: "this looks like what I am looking for. I will try to test this solution over the weekend and I will update my post with results!". So I believe it might be a good solution. I just need to wait until I have enough time to test it on my linux machine at home – Art Gertner – 2014-09-11T15:14:59.010

Have fun with it and maybe with the other suggestions. – harrymc – 2014-09-11T15:23:39.550

The best solution I can imagine for your situation is to set up ALSA with dmix, such that Pulseaudio can connect to it without locking the soundcard. You'd then just have a pcm.!default entry in your ~/.asoundrc pointing to dmix, and rules for skype pointing to the pulse device. I honestly wished I understood it enough to explain to you; it seems to be a pretty common issue for people to have little understanding of ALSA configuration, though. This and this may help as reference.

– 0xDAFACADE – 2014-09-12T01:12:05.350

I run Mint 13 maya as well, does anyone have a comprehensive guide to setting up PA and restricting it to ONLY be used by skype? and to not allow PA to do anything else? It's screwed with my system before and I really don't want to install it, but if I do I want to limit it. I have a hard time following the gentoo forum post. – EdgeCaseBerg – 2014-09-15T14:41:12.460

I tried to follow solution on Gentoo forum. Does not seem to be possible on Mint. – Art Gertner – 2014-09-15T14:51:34.103

Answers

12

You can try using apulse: it is minimalistic pulseaudio emulator made specifically to run Skype 4.3 with ALSA. You need 32-bit build even on 64-bit machine.

I personally had troubles with microphone on Ubuntu 14.04, but for most people it works fine.


To build apulse on Ubuntu (and related distros), you must install following packages: pkg-config build-essential cmake libglib2.0-dev:i386 libasound2-dev:i386 gcc-multilib (probably some other too).

The build process more or less follows the one described in README:

mkdir build && cd build
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

aland

Posted 2014-09-08T13:52:53.607

Reputation: 2 644

struggling to build it from source. could you share the binary? – Art Gertner – 2014-09-24T18:52:33.463

1

@smc: Here is an archive with binaries and here is quick-and-dirty checkinstall-produced package. I also updated my post with build instructions.

– aland – 2014-09-24T20:44:46.263

1Just an update: I am using apulse on my 32-bit Linux Mint for several months now. Works as a charm – Art Gertner – 2015-01-11T11:56:17.297

5

I managed to have skype 4.3. running on my (otherwise pure ALSA) system. I'm running openSuSE 13.1, so, I can only describe what I did here. The general idea was to have skype running in a sort of 'pulseaudio jail'.

I installed pulseaudio but did not activate it. The most important thing about NOT activating pulseaudio seems to be a line

autospawn = no

in /etc/pulse/client.conf.

The next preparation step was to modify /etc/pulse/default.pa according to https://wiki.archlinux.org/index.php/Pulseaudio:

# BEGIN CHANGED: https://wiki.archlinux.org/index.php/Pulseaudio
load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop
# END CHANGED: https://wiki.archlinux.org/index.php/Pulseaudio

#ORIG: #load-module module-alsa-sink
#ORIG: #load-module module-alsa-source device=hw:1,0
#ORIG: ### Automatically load driver modules depending on the hardware available
#ORIG: .ifexists module-udev-detect.so
#ORIG: load-module module-udev-detect
#ORIG: .else
#ORIG: ### Use the static hardware detection module (for systems that lack udev support)
#ORIG: load-module module-detect
#ORIG: .endif

Then I added two lines to my ~/.asoundrc:

pcm.unwantedpulse { type pulse }
ctl.unwantedpulse { type pulse }

A shell script 'myskype' looks like this:

#!/bin/sh
umask 0
cd

# 1. step: start pulseaudio in advance
mkdir .pulse 2> /dev/null
echo 'autospawn = yes' > .pulse/client.conf
aplay -q -D unwantedpulse /usr/share/skype/sounds/ChatOutgoing.wav
# now pulseaudio should be running

# 2. step: important mixer settings - these are hardware dependent and (probably) not really necessary
amixer sset Digital 100% unmute cap
amixer sset Capture 99% unmute cap
# etc etc
pacmd set-source-volume alsa_output.dmix.monitor 0x10000
pacmd set-source-volume alsa_input.dsnoop 0x11000

# 3. step: start skype in background 
/usr/bin/skype & 
skypepid=$!

sleep 9
# to prevent funny programs like firefox from connecting (or even starting)
# pulseaudio, we clean up rather quickly
rm -rf .pulse

# wait for skype to exit
wait $skypepid

# 4. step: stop pulseaudio
pactl exit
sleep 4
pactl exit
exit 0

Now, when I start 'myskype', skype will be started in that 'pulseaudio jail' but everything else is still using ALSA.

dreb

Posted 2014-09-08T13:52:53.607

Reputation: 61

3

I had the same-ish problem. There's no workaround, I've already wasted two days to fix the problem. You can install pulseaudio and make it work with an older version of alsa. Because pulseaudio works smoothly with old versions of alsa.

I'm using 1.0.16. Here's a script to install this version. I've experienced just one issue so far with pulseaudio and this version of alsa. I had to always start pulseaudio manually after start up so I added it in start up applications.

And as far as sound control goes I use pavucontrol instead of alsamixer. It gives you more control over applications.

And there are some applications like Skype of example, that asks you to allow it to automatically adjust the mixer levels. These kind of privileges causes pulseaudio to behave in weird ways. Never allow them unless you really have to. But I guess you know that already.

Anyway give it a try, hope it works for you. It did for me. :)

Best Regards

Mohi

Mohi

Posted 2014-09-08T13:52:53.607

Reputation: 599

When I get to the part of the script to configure the driver with sudo ./configure --with-cards=hda-intel --with-kernel=/usr/src/linux-headers-$(uname -r) sudo make I get "The file /usr/src/linux-headers-3.2.0-23/include/linux/version.h does not exist. Please install the package with full kernel sources for your distribution" even though I've used apt-get to get my kernal headers. any ideas? Edit: I did a locate, found the version.h, and now it can't find autoconf.h -.- – EdgeCaseBerg – 2014-09-16T13:31:57.063

I'm running alsa 1.0.25 and pulseaudio 1.1, haven't rebooted yet but just installed pulse has fixed skype as expected, I'm waiting for the issues to start popping up. I'll update if anything breaks using these two versions. – EdgeCaseBerg – 2014-09-16T14:01:07.387

1

Sadly, There is no way to bypass this issue without using pulseaudio. There is even a petition which adresses that problem.

But I think that Microsoft won't change that. So you have to decide: Use PulseAudio and Skype or force your relatives to switch the IM. :S

Christian

Posted 2014-09-08T13:52:53.607

Reputation: 6 571