Wednesday, 31 October 2007

Why does Evince seem to lock the audio?

Well actually it doesn't! It would appear that the gnome PDF/PS document viewer on Ubuntu (Gutsy 7.10) opens and blocks the ALSA/OSS audio (so other apps like realplayer etc can't do audio) - its being tracked as a bug on ubuntu launchpad and gnome. You can see its attached to audio using: lsof or fuser /dev/snd/pcm*

Using another app (such as xpdf - to get it on Ubuntu: sudo apt-get install xpdf-reader) won't help - the same thing happens.

It turns out that this only happens when Evince/Xpdf is started from Firefox - which is probably how alot of people start evince. It seems that this only happens if Firefox has already opened the audio device (e.g. after playing some flash content). So it's actually an issue with Firefox..... Darn. I suspect this may happen with any app spawned by Firefox... Firefox isn't very good with letting go of audio devices once it's done with them - or maybe it's Flash being crap....

It's a particular bummer when you restart firefox whilst leaving evince running 'cos then you're stuck with evince attached to the audio and the pesky thing won't play anything anymore. You'll have to restart evince as well in that case.

1 comment:

  1. thanks for your analysis of this odd thing. It *really* look like we have grown linux systems up to a point where everything is getting a mess ... Hopefully we can still track most of the odds of that mess.

    Maybe a separate "application launcher" would be a way to have it fixed (that launcher would be forked before any ffox activity and therefore wouldn't be impacted by flash and the like).