[Lucid] Phonon pulseaudio support is broken

Bug #557514 reported by Mark Greenwood
58
This bug affects 7 people
Affects Status Importance Assigned to Milestone
qt4-x11 (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Lucid by Adam Porter
Nominated for Maverick by Adam Porter

Bug Description

Binary package hint: phonon

Using Kubuntu Lucid beta 1

Under Karmic, if I enable pulseaudio, I get an option for 'Pulseaudio' in the Phonon configuration in system settings. This configures the xine backend to use pulseaudio natively.

Under Lucid, the only option I get is 'Playback through the pulseaudio sound server', which actually uses the ALSA-pulse plugin. This is not pretty and it's a regression from Karmic. Note that this also happens if I upgrade Karmic to KDE 4.4.2 using the ppa).

Additionally, a great deal of work has been done recently, mainly by Colin Guthrie at Mandriva, to integrate pulseaudio properly into KDE. Both Mandriva and Fedora are including this work in their forthcoming releases. I have been testing it and it has worked flawlessly. It would be really great to see this included in Kubuntu.

Related branches

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

This change in behavior is actually caused by the Phonon patches. Pulse support is built in to each backend itself, so you can use any backend with PA seamlessly. The only patches that we don't have are the KMix ones, because they are quite invasive and introduce a lot of new strings that we don't have the manpower to translate at this time.

Changed in phonon (Ubuntu):
status: New → Invalid
Revision history for this message
Mark Greenwood (fatgerman) wrote :

Thanks for the answer but I don't really understand what you are saying. You say I can use any backend 'seamlessly', but the Xine backend under Lucid is not using Pulse 'seamlessly', it is using an ALSA output and routing that to Pulse using the ALSA-pulse plugin. I still see all my ALSA devices under system settings, which is completely different behaviour from that which occurs under mandriva, for example. I'm not sure if I'm explaining this very well, but it does not work the same way as it does under Mandriva for example - KMix patches notwithstanding. If I run pavucontrol, I see that all the audio output from phonon applications is coming through the ALSA plugin, not native pulseaudio.

Revision history for this message
Ben Stolen (donotreply) wrote :

I can confirm this. Before 4.4.2, Phonon's backends used Pulseaudio "seamlessly". For some reason, Pulse's device was replaced with ESD on my system after the upgrade to 4.4.2, and the "new" PA device actually routes through alsa and has obvious latency issues.

Changed in phonon (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Hi there!

Thanks for reporting this bug! Your bug seems to be a problem with the KDE program itself, and not with our KDE packages. While we appreciate your issue, it would be better if it was tracked at https://bugs.kde.org, so that the KDE developers can deal with this speedily and have direct communication with you as the reporter for more effective debugging.

Thanks!

Changed in phonon (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Mark Greenwood (fatgerman) wrote :

I'm afraid you're wrong. The functionality I have described works correctly in other distributions that use the same version of KDE. The problem is therefore most definitely in your packages.

Changed in phonon (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Mark Greenwood (fatgerman) wrote :

As a further demonstration, I have another machine where I have been using the JACK backend for phonon (I have Xine packages with JACK support installed). This was working perfectly until the recent phonon upgrade. I am still presented with an option to use 'Jack Audio Connection Kit', which is selected - but phonon now ignores that and just tries to use ALSA instead.

I mention this as it demonstrates that perhaps this bug should be called 'Phonon ignores non-ALSA outputs' or something like that.

If I boot into the Beta of Mandriva 2010.1 on the same machine, using the same version of KDE, phonon does work with JACK (and indeed with Pulseaudio) so again, this is not an upstream bug.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

We have the latest patches along with the latest stable phonon backends. If this is a bug, it's probably an upstream regression.

Changed in phonon (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Mark Greenwood (fatgerman) wrote :

OK I reported the bug upstream here:

https://bugs.kde.org/show_bug.cgi?id=234072

The response is twofold:

Firstly, libphonon needs to be at least version 4.3.8. The version in lucid appears to be version 4.3.1, which is quite old.

Secondly, both libphonon and the phonon backend need to be compiled against libpulse. This does not appear to be the case with the Kubuntu packages.

See the upstream bug report for the full details.

Changed in phonon (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Neither of these are accurate. We have libphonon patched up to phonon 4.4.0, and we do compile with PA support. See upstream bug for details.

Changed in phonon (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Alex Wauck (awauck) wrote :

It looks like the problem is in the Kubuntu packaging: https://bugs.kde.org/show_bug.cgi?id=234072

The root of the problem, though, seems to be existence of two Phonons: Qt4-Phonon and standalone Phonon. Who the hell thought that was a good idea? Apparently, getting correct Phonon support in PyQt4 and KDE at the same time is decidedly non-trivial.

Changed in phonon (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Alex Wauck (awauck) wrote :

I have marked this as incomplete since it seems that further investigation is still needed.

Revision history for this message
Mark Greenwood (fatgerman) wrote :

Thanks for continuing to look at this problem. Two versions of phonon does seem like a recipe for disaster. Let's hope upstream can sort that out. As far as this specific issue goes, I've done some investigation - I'm not too clued up on cmake or debian packaging but I figured this would be worth posting in case any of it helps. All of this is based on working with apt-get source qt4-x11 and running dpkg-buildpackage.

Once the source has been patched, in src/3rdparty/phonon/phonon/CMakeLists.txt, there is a check using macro_optional_find_package(PulseAudio), and one using macro_optional_find_package(GLIB2). However, nowhere on my system is there a FindPulseAudio.cmake or a FindGLIB2.cmake, and I can't find a package that installs them. They are not present in the source.

The strange thing is, that with the lack of those two cmake files I would expect cmake to print a warning that they couldn't be found. But it doesn't. It's almost as if that particular CMakeLists.txt is simply being ignored.

I found the same issue with the source for the phonon backends. That source does include the two 'missing' cmake files, and they are supposed to be called by the macros in the phonon/CMakeLists.txt file. But again, they never are. Only by hacking those macro_optional_find_package() checks into the CMakeLists.txt at the root level of the source tree could I get them to run, and when I did that I finally saw -DHAVE_PULSEAUDIO and -DHAVE_PULSEAUDIO_DEVICE_MANAGER being part of the command lines issued to make.

affects: phonon (Ubuntu) → qt4-x11 (Ubuntu)
Changed in qt4-x11 (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.6.2-0ubuntu5

---------------
qt4-x11 (4:4.6.2-0ubuntu5) lucid; urgency=low

  [ Alessandro Ghersi ]
  * Update applications icons (LP: #350312)
  * Fix watch file to report only stable versions
  * Sync patches with Debian:
    - 02_launch_assistant-qt4.diff
    - 10_config_tests_fixes.diff
    - 15_fix_qmake_makefile_generation.diff
    - 16_hide_std_symbols_on_qtwebkit.diff
    - 40_alpha_ice.diff
  * Fix qdbus.1 manpage
  * Sync desktop files with Debian to fix lintian warning
  * Fix lintian warning: binary-control-field-duplicates-source
  * Add upstream patch 0002_qmake_qfileinfo_absolutepath.diff
    - Fixed QFileInfo::absolutePath() warning when running "qmake -project"
      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23574043

  [ Jonathan Thomas ]
  * Update upstream's libphonon patch. This will correct build system issues
    that caused both the PulseAudio integration to fail as well as the
    libphonon version to be under-reported (LP: #557514)
 -- Alessandro Ghersi <email address hidden> Fri, 09 Apr 2010 05:57:00 +0200

Changed in qt4-x11 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Alex Wauck (awauck) wrote :

The PulseAudio output for both Xine and GStreamer backends still goes through the ALSA plugin on my machine with libphonon4 version 4.6.2-0ubuntu5. Do the backends need to be rebuilt?

Revision history for this message
Mark Greenwood (fatgerman) wrote :

There are still 2 problems I think.

According to the upstream bug, yes the backends need to be rebuilt.

Secondly, I think the ubuntu pulseaudio package is broken in that it does not include the KDE startup scripts for pulseaudio (see the upstream bug). I can raise this as a separate bug if you like?

You might be able to work around the second problem by typing

pactl load-module module-device-manager do_routing=1

which is all that the KDE startup script does.

Revision history for this message
Alex Wauck (awauck) wrote :

I have reported the start-pulseaudio-kde problem as bug 563250.

Revision history for this message
Alex Wauck (awauck) wrote :

This problem is still present on my system with phonon-backend-xine 4.4.0-0ubuntu2, libphonon4 4.6.2-0ubuntu5, and pulseaudio 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14 (which I have modified to include start-pulseaudio-kde). I have verified that module-device-manager is loaded with do_routing=1. Is there anything else I need to do?

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

I, honestly, have no clue. Everything really, really should be fine from the Phonon end of things now.
Maybe Daniel can save the day, though? (Subscribing him)

Revision history for this message
Mark Greenwood (fatgerman) wrote :

I haven't had a chance to try it on my system yet but, just a thought, have you checked that the build problem has been fixed in the backend as well as in phonon itself?

Revision history for this message
Alex Wauck (awauck) wrote :

The changelog for phonon-backends says "Rebuild for fixed libphonon".

Revision history for this message
Mark Greenwood (fatgerman) wrote :

I've updated and I don't think the build changes have fixed the problem. I base this on two observations:

According to the upstream bug, libphonon.so.4.4.0 should be linked against libpulse and libpulse-mainloop-glib, but "ldd libphonon.so.4.4.0" shows that it is not.
(If I run the same command on the libphonon taken from either Mandriva or Fedora, I see that it is linked against the correct libraries).

Secondly, I downloaded the source for the backends (apt-get source) and did a build. The build prints a list of features it has found - Pulseaudio is not amongst them, and neither HAVE_PULSEAUDIO nor HAVE_PULSEAUDIO_DEVICE_MANAGER are specified on the command line during the build. I did a nasty hack to the CMakeLists.txt (as I described in comment #12) and this appeared to fix this problem - but I still don't get full Pulseadio support in phonon, probably because the same build problem is still affecting phonon (and I haven't figured out a rebuild hack for that).

So I think the build problem is still not sorted.

Revision history for this message
Mark Greenwood (fatgerman) wrote :

To further confirm this, I have copied libphonon.so.4.4.0 from my Mandriva install on to my Kubutnu install and retained my rebuilt xine backend.

Pulseaudio support in phonon is now working more or less correctly:
kcm-phonon shows Pulseaudio output devices instead of ALSA devices
Playing back audio through Amarok shows that ALSA plugin is not being used.

I don't actually get any sound, but that could easily be an incompatability between libraries taken from two different systems.

Revision history for this message
Mark Greenwood (fatgerman) wrote :

Does the fact that this has gone very quiet mean nobody knows how to fix it? I can offer some time to help if required.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 557514] Re: [Lucid] Phonon pulseaudio support is broken

It's too late to ship this in Lucid final.

Revision history for this message
Alex Wauck (awauck) wrote :

I think the real long-term fix for this issue is to whine at the Phonon developers until the Qt Phonon vs KDE Phonon split is addressed.

Revision history for this message
Mark Greenwood (fatgerman) wrote :

I've changed the status to Incomplete, since 'Fix Released' isn't really accurate. It'll be a real shame if Lucid goes out with something this important still broken.

Changed in qt4-x11 (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Alex Wauck (awauck) wrote :

Would it be possible to patch the Phonon backends to hide the non-functioning PulseAudio option?

Revision history for this message
Mark Greenwood (fatgerman) wrote :

Re : "It's too late to ship this in Lucid final."

Typical. The release date is everything, whether it works or not is secondary. I don't mean to have a go but, really, I despair. I try hard to help and find bugs and this is the response.

Revision history for this message
Daniel T Chen (crimsun) wrote :

On Wed, Apr 21, 2010 at 1:31 PM, Mark Greenwood wrote:
> Typical. The release date is everything, whether it works or not is
> secondary. I don't mean to have a go but, really, I despair. I try hard
> to help and find bugs and this is the response.

I'm working just as hard -- in my spare time -- to find and fix bugs.
No need to get snippy. :) Honestly, I was being realistic above in my
response of "too late to ship this in Lucid final." This bug is hardly
a kitten killer, and while I empathize that it sucks to ship sub-par
PA support in 10.04 LTS right away, be aware that the Kubuntu devs
don't support PA in Kubuntu 10.04 LTS, so there really isn't anything
I can do.

Revision history for this message
ghostautumn (autumnravencorvus) wrote :

does anyone have a fix - even a temporary one - for this? I can understand that this is an LTS and thus the dev. team's reluctance to rework libphonon, but if it is resolved can someone at least put this in backports? It's extremely frustrating.

Revision history for this message
Daniel T Chen (crimsun) wrote :

There's an unofficial Kubuntu ppa with PulseAudio-aware bits.

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

I have just updated my system to Lucid, and while I have Pulse installed, it seems to be disabled in System Settings. Also "Jack Audio Connection Kit" is now installed (libjack only), which I definitely had not have before the upgrade.

Is this setup change related to this bug, or should I open a new one for it?

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

Daniel: would you be so kind to point me to this PPA?

Revision history for this message
ghostautumn (autumnravencorvus) wrote :

Yes, please do Daniel, I am unaware of which PPA you're referring to. Thanks.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Ask in #kubuntu-devel, please.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

The pulse-aware bits are all in the main archive. There isn't a PPA. If it doesn't work, there's nothing we can really do about it until upstream gives us something we can package/support.

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

Daniel: this bug IS a kitten killer. I cannot get sound from two applications at the same time! The thing is, it worked in Karmic with pulse (obviously), but it also worked before with just ALSA! However, now since I upgraded to Lucid, it has stopped working.

If the Kubuntu devs decide to ship a completely broken pulse, at least tell us how to have the old (pre-pulse) back.

All I have in System Settings/Multimedia is:
- Playback/recording through the PulseAudio sound server (disabled)
- HDA Intel (STAC92xx Analog)
- Jack Audio Connection Kit (which doesn't work either, it wasn't there before the upgrade; I think it was pulled in by pulse)

Is there a way I can get at least ALSA mixing?

Revision history for this message
Mark Greenwood (fatgerman) wrote :

It's even worse than that. I've just installed the Lucid release. Without pulse installed, any app that doesn't use phonon can't play any sound at all. This appears to be because the default ALSA routing is through pulse. Epic Fail.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Hmm, I can't reproduce this symptom from a Kubuntu live cd.

Revision history for this message
Mark Greenwood (fatgerman) wrote :

Try running mplayer in a terminal. (mplayer name-of-video-file.avi) You'll see it attempts to use pulse, then falls back to alsa when that fails. On my system there is no audio.

I can get mplayer to work by specifying the full hw:1,0 alsa card name instead of relying on defaults. However when doing this, I get a popup from phonon saying the audio card doesn't work and then phonon produces no sound ever again.

This is definitely significantly less functional than it was under karmic. Can't we just back out the phonon pulseaudio changes and go back to how it was until upstream give us something that builds?

Revision history for this message
David Nemeskey (nemeskeyd) wrote :

I completely second that. This situation is unacceptable.

What's interesting is that Amarok doesn't produce any sound at all, while Kaffeine, Skype, etc. happily uses the sound card. Until I start playing a flash video in Firefox, that is...

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

KDE will not build without the latest Phonon. Not much we can do here.

Revision history for this message
Alex Wauck (awauck) wrote :

This stuff works in Arch Linux with KDE 4.4.2 and Phonon 4.4.1. I don't know if they have the issues with PyQT4 and QtWebkit that were mentioned in the upstream bug, though.

Revision history for this message
Gabi Munteanu (office-softdata) wrote :

Same thing hapend to me. I upgraded to Lucid and after a short period I lost the sound.
When I try to use Amarok or when I test the device in phonon I get a message: "The audio playback device HDA intel (ALC889 Analog) does not work". And no other device works.
I tried to clean install the Kubuntu several times with no results.
If there is a workaround please tell me.

Revision history for this message
Bent Jakobsen (jakobsen-bent) wrote :

I just found this thread :)

I also have the problem. A work-around which I've worked out it is:

1. Stop Amarok (if it is running)
2. delete: ~./pulse/*runtime
3. Start Amarok.

At least it works for me ;) But I do not know if it will work for you too.

Revision history for this message
Bent Jakobsen (jakobsen-bent) wrote :

Sorry... step 2 should be delete ~/.pulse/*runtime - I'm very sorry.

And then the sound should work until the next reboot.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Fixed in maverick. Not much hope for lucid at this point, though. :(

Changed in qt4-x11 (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.