This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Audio totally screwed up in kde 4.10.3/4

Tags: None
(comma "," separated)
zeke
Registered Member
Posts
34
Karma
0
Some time recently the audio on my two desktops running kde 4.10 got totally screwed up. It happened after I installed skype (I since uninstalled it using autoremove --purge) and installed a usb web cam on one (the other has had one for some time), but I can't really say if these things caused the problems. I have two computers that have very similar hardware and software set ups, one of which is only slightly messed up, and one of which is really having problems.
First, here is a summary of some aspects of the computer that is really messed up:
logitech cw310 web cam (this is the recently installed one)
Nvidia 8400GS video card with hdmi output (proprietary driver)
asus motherboard w/ analog audio
I'm running mint 13 64 kde edition and I've seen the issues on both kde 4.10.3 and 4.10.4. I installed skype 4.2.0.11-1 (I believe).
I usually have two or three users logged in to parallel sessions

It's hard to actually describe/remember all the odd things that happen:
- I get occasional messages that kde has determined that a long list of devices have been removed, and do I want to permanently forget about them. I get these every now and then no matter what I choose.
- if I click on the "audio setup" option in the right-click menu of the sound icon in my task panel it seems to never start or hangs up. This also seems to cause other things to slow down dramatically (e.g. trying to logout/restare).
- after having problems, the system may take a few restarts to start up the graphical environment.
- with the same settings, the volume popup sometimes shows my analog audio and web cam (sometimes grayed out), sometimes it shows my digital audio and analog audio, sometimes it shows the analog audio twice, sometimes it shows a single "master", sometimes it shows the digital audio instead of the analog audio, etc.
- If I open the system settings/multimedia dialog, and click on "phonon", I get spinning "busy" circles forever.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This is quite unusual. Are all users on the system affected?
Also, is Pulseaudio installed?

If Pulseaudio is, try deleting ~/.pulse* for all affected users, from a terminal - without them being logged in.
It may also help to remove /var/tmp/kdecache-$USER/libphonon/hardwaredatabase and ~/.config/kde.org/libphonon.conf

To ensure the above is successful, please make sure no processes at all are running as the affected users (which must be logged out as well). This is particularly the case for "pulseaudio" and "kded4" processes.

I would recommend performing the removal from a virtual terminal.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
zeke
Registered Member
Posts
34
Karma
0
Thanks very much for the reponse and information. All users are affected. Pulseaudio is installed, and in fact I uninstalled/reinstalled a couple of times to see what effect that had. I also got a little more adventurous and tried to uninstall phonon using sudo apt-get autoremove --purge, but it turns out that is a very bad thing to do, as it uninstalled apparently everything kde-related. I got everything - I think - working again by installing kde-full from ubuntu and mint-meta-kde from mint.

I also had the idea to make sure all users have the same device preferences in the audio setup, and after a short time trying things out I have only had one popup asking me if I want to forget a couple of pulseaudio server devices - I remember that term from the skype preferences, but otherwise don't know what it is. Otherwise, all users have the same devices in the volume popup (analog audio and web cam for output and input respectively) and the web cam is not grayed out anywhere. If I have further problems I'll try deleting the files you suggested.
thanks again-
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay. As you are using Pulseaudio you may find it helpful to check out what it thinks of your setup, through the "pavucontrol" tool. I would also recommend you install the Pulseaudio backend for GStreamer and any other media player you use - the native backends tend to give less trouble in my experience.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
zeke
Registered Member
Posts
34
Karma
0
Unfortunately I tried your suggestions but they did not work. One beneficial side effect to trying them did seem to be that I could actually control "event sounds" thru the volume popup - but only once. I'll double-check that as I plan to try again on my other machine, which is experiencing more issues than I thought.

It seems like my problems are somehow related to parallel login sessions. If I reboot, everything looks ok at first. I think that problems show up after switching back and forth between sessions. My kids play a lot of youtube videos and minecraft lately so maybe that is a factor? Parallel login sessions have always seemed kind of problematic in the relatively short time I've been using kde. For example, the dialog to activate a session usually stays up after I click "activate" and I have to click "cancel" to get the password dialog to unlock the switched-to session. Also, trying to log out from a session (not switch from it) often leaves the system at a blank screen w/ blinking underscore, forcing me to cycle the power.

I installed pavucontrol but I have only run it right after a reboot when things are looking ok. I'm not sure I follow your comment about pulseaudio and gstreamer. Gstreamer is listed as the phonon backend (whatever that means). The only other option I have is vlc - I think I tried that, w/o improvement.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Try searching for packages vlc-aout-pulse and gstreamer-0_10-plugins-good - these two should contain the Pulseaudio output backends used by VLC and GStreamer respectively.

It sounds to me like the various Pulseaudio instances started by each user are not releasing the audio devices. To confirm - if you remain as a single user, does everything work properly?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
zeke
Registered Member
Posts
34
Karma
0
The gstreamer pkg is installed, the vlc is not (it seems to be called vlc-plugin-pulse). I am getting some ominous-looking entries in syslog related to pulseaudio and the web cam. These are from today. I don't know what was happening at the time:
Code: Select all
Jun 15 14:09:33 pc2 pulseaudio[10025]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jun 15 14:09:33 pc2 pulseaudio[10025]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-046d_081b_A9B847C0-02-U0x46d0x81b" card_name="alsa_card.usb-046d_081b_A9B847C0-02-U0x46d0x81b" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 15 14:09:54 pc2 pulseaudio[10025]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jun 15 14:09:54 pc2 pulseaudio[10025]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-046d_081b_A9B847C0-02-U0x46d0x81b" card_name="alsa_card.usb-046d_081b_A9B847C0-02-U0x46d0x81b" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 15 14:10:14 pc2 pulseaudio[10025]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jun 15 14:10:14 pc2 pulseaudio[10025]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-046d_081b_A9B847C0-02-U0x46d0x81b" card_name="alsa_card.usb-046d_081b_A9B847C0-02-U0x46d0x81b" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 15 14:10:19 pc2 pulseaudio[10025]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jun 15 14:10:19 pc2 pulseaudio[10025]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-046d_081b_A9B847C0-02-U0x46d0x81b" card_name="alsa_card.usb-046d_081b_A9B847C0-02-U0x46d0x81b" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 15 15:33:11 pc2 pulseaudio[2095]: [pulseaudio] pid.c: Daemon already running.
Jun 15 15:33:11 pc2 pulseaudio[2097]: [pulseaudio] pid.c: Daemon already running.
Jun 15 15:33:11 pc2 pulseaudio[2099]: [pulseaudio] pid.c: Daemon already running.
Jun 15 16:51:22 pc2 pulseaudio[5270]: [pulseaudio] pid.c: Stale PID file, overwriting.
Jun 15 16:51:43 pc2 pulseaudio[5270]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jun 15 16:51:43 pc2 pulseaudio[5270]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="1" name="usb-046d_081b_A9B847C0-02-U0x46d0x81b" card_name="alsa_card.usb-046d_081b_A9B847C0-02-U0x46d0x81b" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 15 16:51:43 pc2 pulseaudio[5341]: [pulseaudio] pid.c: Daemon already running.
Jun 15 16:51:43 pc2 pulseaudio[5343]: [pulseaudio] pid.c: Daemon already running.
Jun 15 16:51:43 pc2 pulseaudio[5345]: [pulseaudio] pid.c: Daemon already running.
Jun 15 16:52:03 pc2 pulseaudio[5270]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Jun 15 16:52:03 pc2 pulseaudio[5270]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="1" name="usb-046d_081b_A9B847C0-02-U0x46d0x81b" card_name="alsa_card.usb-046d_081b_A9B847C0-02-U0x46d0x81b" namereg_fail=false tsched=yes ignore_dB=no deferred_volume=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 15 16:52:13 pc2 pulseaudio[5414]: [pulseaudio] pid.c: Daemon already running.
Jun 15 16:57:01 pc2 pulseaudio[1950]: [pulseaudio] pid.c: Daemon already running.
Jun 15 17:00:48 pc2 pulseaudio[5998]: [pulseaudio] pid.c: Daemon already running.
Jun 15 17:00:48 pc2 pulseaudio[6008]: [pulseaudio] pid.c: Daemon already running.
Jun 15 17:26:03 pc2 pulseaudio[9354]: [pulseaudio] pid.c: Daemon already running.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hmm - this is indeed quite unusual. You are only running one session per user right?
Also - try removing ~/.pulse and ~/.pulse-cookie outside KDE, with no Pulseaudio processes running. This should be done for each user which logs in to the system.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
zeke
Registered Member
Posts
34
Karma
0
I am running one session per user. I have tried removing ~./pulse* for each user per your previous post w/ only one user logged in to a console session.

There is definitely something going on with the web cam device. It appears as grayed out in the audio setup, kamoso does not work e.g.

pc2 kernel: [ 6117.176133] uvcvideo: Failed to set UVC probe control : -110 (exp. 26).).

edit:
OK, it looks like the web cam audio is not recovering from sleep. I reboot, login as a single user, everything looks ok, setting the web cam as my audio input. If I put the computer to sleep and wake it up, the web cam is grayed out in the audio setup. The web cam does not appear as an audio input device in pavucontrol. Kamoso still shows me video - actually this seems to differ depending on if I use vlc or gstreamer for phonon backend??? w/ gstreamer, kamoso does not work.

I also found ~/.kde/share/config/phonondevicesrc, which I don't understand. I found three entries for audio capture from the web cam that looked identical, except two of the three were apparently for a previous usb port it was plugged in to, but all three say "deleted=false". I deleted the "extra" two from the file and rebooted, with no change in behavior as far as I can tell.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
For the webcam - is it an integrated or external camera?
If it is external, does unplugging it and then plugging it back in following resuming from sleep fix it temporarily?

If it does, try running "rmmod uvcvideo && modprobe uvcvideo" after resuming from sleep - and see if that helps.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
zeke
Registered Member
Posts
34
Karma
0
This is an external camera. Here is the thing - currently only one of three users is not seeing the camera in the audio setup and volume controls. I'm beginning to think the user who is most likely to be having a problem is the one that was active when the machine went to sleep. It's acting like kde (phonon? pulseaudio? alsa? gstreamer? vlc? ...?) is trying to detect the device on resume before it's "ready" - I have no idea if that description makes sense. The vlc backend to pulseaudio seems better than gstreamer. vlc at least (usually?) seems to detect the video, but not audio.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hmm. One other possibility is that this user is missing particular group membership. Camera's are usually provided as devices such as /dev/video0. Can you check the permissions on that device, to see if the problematic user is able to operate the camera? You may also wish to check the permissions under /dev/snd/ considering the audio is primarily affected by this.

If that does not work, does restarting the application using the webcam (Kopete, Skype) have any effect, or does the user in question have to fully logout to regain functionality?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
zeke
Registered Member
Posts
34
Karma
0
The problem is that nothing is consistent. Just after a reboot, the video and audio from the web cam for the user I mentioned above show up as enabled (including /dev/video0). It seem to only be later that problems occur. I'm pretty sure, but I can double-check, that if another user's session is active when the machine goes to sleep, that user will have the issue when the machine resumes.

Actually, I just looked and one user at least does not even show the tray icon for volume adjustment running right now. I really appreciate your efforts to help me out, but this is all getting to be pretty much more trouble than it's worth. This web cam isn't essential, and I will probably just go w/ a microphone plugged in to my analog sound card.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I see. The user who is currently logged in having problems is expected - my guess is that the webcam is waking up in a manner that Pulseaudio does not expect, so it fails to detect it - and when the webcam is ready for use, it is too late and Pulseaudio does not rescan it. Alternatively, the USB audio driver is not capable of handling the suspend of the system.

If you can determine which drivers the webcam uses (probably uvcvideo and another one for audio) then one could arrange for them to be unloaded (and then reloaded again) in a /etc/pm/sleep.d/ script.

The system tray application for managing sound is KMix. It could either not be running, or the icon could be hidden (for various reasons).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
zeke
Registered Member
Posts
34
Karma
0
bcooksley wrote:I see. The user who is currently logged in having problems is expected - my guess is that the webcam is waking up in a manner that Pulseaudio does not expect, so it fails to detect it - and when the webcam is ready for use, it is too late and Pulseaudio does not rescan it. Alternatively, the USB audio driver is not capable of handling the suspend of the system.

Yes this is what it looks like to me.

bcooksley wrote:If you can determine which drivers the webcam uses (probably uvcvideo and another one for audio) then one could arrange for them to be unloaded (and then reloaded again) in a /etc/pm/sleep.d/ script.

I may try this. BTW along the way when dealing w/ this I realized there are other power management issues. There is apparently a massive memory leak in the powerdevil component of kded4, and when powerdevil is enabled the network connection sometimes takes 10sec or more to be reestablished after resume. I have disabled it in favor of powernap. Of course this has its own problems (occasionally using 100% cpu on one core), but at least (so far) the network reconnects faster on resume and I haven't seen the ~2GB per user memory usage. I did a quick test to see if the change affected the webcam audio issues but I don't think so.

bcooksley wrote:The system tray application for managing sound is KMix. It could either not be running, or the icon could be hidden (for various reasons).

Yes, normally it is running and not hidden, except when these audio issues arise.

I don't know, my two machines that behave quite differently have the same motherboard, but I couldn't swear offhand that they are the same revision. One also has a usb keyboard that may affect things, but this is pretty mysterious to me. I think I am giving up for now and not using the web cam on the problem machine. Thanks for your assistance.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar