Version: unspecified (using KDE 4.7.0) OS: Linux After upgrade to 4.7 via Ubuntu backports, the sound stopped working. Reading around in forums some people recommended doing an "lsof /dev/SOMETHING" and they concluded that knotify4 was locking this device and therefore there was no sound. I killed the only instance of knotify4 that was running, and immediately the sound worked, all the programs that were open and playing something started playing at once. I tried to find again what device they were refering to, but I couldn't find it. Reproducible: Didn't try Steps to Reproduce: Update to 4.70 Actual Results: There was no sound (and no errors) Expected Results: Sound should play through the sppeakers OS: Linux (x86_64) release 2.6.38-10-generic Compiler: gcc
Unfortunately, this bug report is rather unhelpful without some more information: * What version of Phonon are you using? * What Phonon backend * What version of that phonon backend * If its GStreamer, what version gstreamer packages do you have * If its VLC, what version VLC * Do you have pulseaudio enabled/running, and what version if so * What distribution
I don't even know if its Phonon's fault, but here is the info: > * What version of Phonon are you using? I don't know how to check the exact version of Phonon, the package manager calls it: "4.7.0" (full name "4.7.0really4.5.0-0ubuntu3" amd64) > * What Phonon backend GStreamer > * What version of that phonon backend 4.5 according to the "Multimedia" section in System Settings > * If its GStreamer, what version gstreamer packages do you have Again, I don't know how to check for that, but according to the pkg manager its 0.10.32 > * Do you have pulseaudio enabled/running, and what version if so Yes, pulseaudio 0.9.22-24-g67d18 > * What distribution Kubuntu 11.04, installed KDE 4.7 through backports Thanks a lot for taking this bug :)
I think, I suffer from the same problem. I am running phonon-4.6.0, phonon-gstreamer-4.6.0, kde-4.8.3. phonon is locking the audiodevice. When amarok (also tried with the qt phonon-demos) is running, no other application can use the sound-device. vlc prompts the following message: Audio output failed: The audio device "default" could not be used: Device or resource busy. When one phonon-application is running and I open another one, knotify tells me: The audio playback device hw:0,0 does not work. Falling back to hw:0,0. And then it works (note that both devices are labeled with "hw:0,0", which is somewhat confusing). Running several non-phonon applications at the same time works without a problem, they all play sound at the same time. phonon-vlc also works (but produces crappy sound, though vlc itself sounds nice), so it is an issue within phonon-gstreamer. AFAIR this behaviour started after the move from oss4 to alsa, but I will have to test this another time (needs recompilations + reboot, can't do that ATM).
Setting status to confirmed.
knotify has a bad habit of hogging the sound device. My recommendations: 1. Use PulseAudio 2. Make sure your Phonon is bullt with PulseAudio support 3. Make sure the start-pulseaudio-kde script is run at login (it should happen automatically via xdg autostart files). 4. Ensure the 'default' alsa device is configured to use the ALSA plugin for PulseAudio 5. Configure everything to use PulseAudio directly if possible, or the 'default' ALSA device if not. 6. Patch knotify to use libcanberra for sounds (http://colin.guthr.ie/git/kde-runtime/log/?h=canberra) This is the setup we use by default in Mageia and i've never had any bug relating to sound device hogging etc.
Installing pulseaudio just to workaround an issue inside another part of the stack is not an option. I had it on my system some time ago and it messed up quite a lot (no sound, stuttering sound, extremely increased CPU usage...). Especially I don't need it's features - I simply need sound playback. Alsa has dmix, so I don't need another Software Mixer for simultanious playback. If this can't be fixed (what I can't believe) I am back to oss4.
(In reply to comment #3)> AFAIR this behaviour started after the move from oss4 to alsa, but I will > have to test this another time (needs recompilations + reboot, can't do that > ATM). Checked this, and yes - oss4 works without a problem.
The reasons for using PA are not just to "work around this problem", but I don't have the time or inclination to list them or try and convince you here. If you don't want to use the recommended stack, that's fine, but you'll find yourself increasingly having to solve your own problems. If that's something you are happy with, then fine, knock yourself out. That's one of the freedoms of Free software.
(In reply to comment #8)> If you don't want to use the recommended stack, that's fine, but you'll find > yourself increasingly having to solve your own problems. If that's something > you are happy with, then fine, knock yourself out. That's one of the > freedoms of Free software. I could not find any information on a "recommended stack", especially not that I have to use pulseaudio. I went to phonon.kde.org and searched google. If pulseaudio is the only way to get a working phonon-gstreamer-setup ATM. then why is it just optional? If you won't fix this, could you at least show me, where I should look at (class/method/lines in the code/...), so at least I could try to make it work for me?
My issues are fixed. I just used the wrong playback device. When I last setup phonon, there was no "default" device, and the only working device was "hw0,0". Now I went back to the settings, chose "default" for all entries - and all blocks are gone. When I start with a completely empty $HOME, "default" is not the default, but "HDA Intel PCH (ALC892 Analog)", which causes the same problems as "hw0,0". The question that remains: which part of the stack creates and exposes those devices and its order? Is it just the alsa-config?
(In reply to comment #9) > (In reply to comment #8)> If you don't want to use the recommended stack, > that's fine, but you'll find > > yourself increasingly having to solve your own problems. If that's something > > you are happy with, then fine, knock yourself out. That's one of the > > freedoms of Free software. > > I could not find any information on a "recommended stack", especially not As the phonon-gstreamer maintainer, the officially recommended stack is to use pulseaudio. > that I have to use pulseaudio. I went to phonon.kde.org and searched google. > If pulseaudio is the only way to get a working phonon-gstreamer-setup ATM. > then why is it just optional? Because PulseAudio has previously left a bad taste in users' mouths due to: * Bad default configuration * Bad distribution packaging * Applications that insisted on competing with PulseAudio via direct hardware access * The misconception that free software is about choice and developers forcing PulseAudio onto users somehow invalidates their choice. > > If you won't fix this, could you at least show me, where I should look at > (class/method/lines in the code/...), so at least I could try to make it > work for me? There is no one location to 'fix' this. Here's a list of the parties involved: * Phonon-GStreamer * GStreamer * PulseAudio * userland libalsa * Kernelspace ALSA * Your ALSA driver * Other applications that demand raw hardware access outside of the "safe" ALSA api. WIthout PulseAudio, there is nothing to mediate which application has exclusive access to the audio devices. > The question that remains: which part of the stack creates and exposes those devices and its order? Is it just the alsa-config? Depends on your setup. If you're using PulseAudio, that'd be libphonon's PulseSupport class. Otherwise, it'd be the result of a property probe from within phonon-gstreamer on the underlying GStreamer element (alsasink, pasink, osssink, etc). Since you say the problem is fixed, I'm closing the bug.
Still has this problem in 4.8.5 EVERY TIME I start kde. I'm using openSUSE. Killing knotify restores sound to normal.
Please reopen bug.
(In reply to comment #13) > Please reopen bug. Well, you should be more precise on what exact versions of the mentioned stacks involved you use, the information you have given so far is not enough to reopen this. Please see comment #11
I do not use PulseAudio, removed it from PC. What else should I check?
(In reply to comment #15) > I do not use PulseAudio, removed it from PC. What else should I check? As I said before, please provide all the versions of the packages mentioned in comment @11. And as mentioned by Trever in comment #11, using pulseaudio is the recommended way.
phonon-backend-gstreamer-0_10-4.5.1-5.1.2.x86_64 libgstreamer-0_10-0-0.10.36-7.1.x86_64 libgstreamer-0_10-0-32bit-0.10.35-4.1.4.x86_64 pulseaudio-module-x11-1.1-1.2.x86_64 libpulse0-32bit-1.1-1.2.x86_64 libpulse-mainloop-glib0-1.1-1.2.x86_64 libpulse0-1.1-1.2.x86_64 alsa-1.0.24.1-23.1.2.x86_64 alsa-plugins-pulse-32bit-1.0.24-18.1.2.x86_64
(In reply to comment #17) > phonon-backend-gstreamer-0_10-4.5.1-5.1.2.x86_64 Your phonon-backend-gstreamer package is completely outdated, please upgrade, the latest stable version is 4.6.2
Updated, and some KDE packages was not updated to 4.8.5, will monitor if bug returns for a few days.
Seems fixed, thanks.