You are not logged in.
Hello! I'm not sure if this would fit better into the Desktop Environment forum, but as I think it's more related to Pulseaudio than KDE I'm posting it here.
I've been using Arch Linux on my laptop for a long time without serious problems (nothing that the awesome Arch Wiki didn't solve), but recently I started having issues with KDE 5 & Pulseaudio both on my laptop and my fresh Arch Linux installation on desktop computer. Everytime time KDE starts, plasmashell crashes (black background, no panels...).
If I relaunch plasmashell in command line it starts OK (can see panels and background) but throws this output:
shm_open() failed: No existe el fichero o el directorio
org.kde.plasma.pulseaudio: state callback
org.kde.plasma.pulseaudio: context kaput
org.kde.plasma.pulseaudio: Attempting connection to PulseAudio sound daemon
org.kde.plasma.pulseaudio: state callback
org.kde.plasma.pulseaudio: state callback ... and repeats again and again thousand of times (more than 8096 lines) and finally it crashes after a few seconds with:
org.kde.plasma.pulseaudio: Attempting connection to PulseAudio sound daemon
No protocol specified
xcb_connection_has_error() returned true
Failed to load cookie file from cookie: Demasiados ficheros abiertos
org.kde.plasma.pulseaudio: state callback
org.kde.plasma.pulseaudio: state callback
org.kde.plasma.pulseaudio: state callback
org.kde.plasma.pulseaudio: context kaput
(process:1119): GLib-ERROR **: Creating pipes for GWakeup: Demasiados ficheros abiertos
`trap' para punto de parada/seguimiento (`core' generado)(The spanish warning says "too many files open").
If I kill and restart Pulseaudio manually, plasmashell launches OK and works fine for a while but after a few minutes or hours (it depends on audio playing, I think) it crashes again with the same output.
I think that the problem is related with the fact of my computers having two different sound cards (motherboard-integrated Intel HDA and USB headphones). I've always had a bit of trouble trying to switch from headphones to speakers and vice-versa but never before to the point of Plasma crashing or being impossible to switch to headphones like now.
I noticed that multimedia options under KDE System Preferences sometimes shows the real names of my audio devices (when everything is working OK) and sometimes it shows "pulse", "alsa" & "jack" instead and sometimes it only shows "PulseAudio Server". Whenever it doesn't show the real names of the devices the only one which works is the integrated one (no way to make the USB headphones work).
At first I though it was an issue with my desktop computer fresh installation, but then I booted my laptop and realized that it was affecting it too. Maybe the problem is related with an update because Plasma & Pulseaudio always worked fine on the laptop. I was on Plasma 5.4 when the problem started but it persists on recent update to 5.5.
I didn't edit any sound configuration files, and the packages that I manually installed related to sound and KDE are:
lib32-alsa-plugins
plasma-meta
pulseaudio-alsaI would really appreciate any help on this... And sorry for my bad English!
Last edited by wulfara (2015-12-15 00:08:57)
Offline
If you occasionally get other cards in phonon than your real devices, something is blocking pulse from starting. can you post
sudo fuser -v /dev/snd/*when it doesn't work and crashes? shm errors are also kinda worrying. I don't know if the bug is still there, but are you using a java program and use openjdk7 as your java implementation? There is (was?) a bug that leaked shared memory and lead to all kinds of issues not unlike the one you are experiencing here. Switching to openjdk8 might be an option here.
Offline
Thanks for your answer V1del.
When it crashes fuser shows:
# fuser -v /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/controlC0: wulfara 2981 F.... pulseaudio
/dev/snd/controlC1: wulfara 2981 F.... pulseaudio
/dev/snd/controlC2: wulfara 2981 F.... pulseaudioThe devices shown in that moment under System Preferences are "pulse", "alsa" and "jack". Then if I manually restart Pulseaudio and Plasma, Plasma does not crash, but the only device listed unser System Preferences is "PulseAudio Sound Server", and fuser shows now:
# fuser -v /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/controlC0: wulfara 2302 F.... pulseaudio
/dev/snd/controlC1: wulfara 2302 F.... pulseaudio
/dev/snd/controlC2: wulfara 2302 F.... pulseaudio
/dev/snd/pcmC2D0c: wulfara 2302 F...m pulseaudio
/dev/snd/pcmC2D0p: wulfara 2302 F...m pulseaudioToday I noticed something new: As I said, when I manually restart Pulseaudio KDE System Preferences shows "PulseAudio Sound Server" in the devices list (making impossible to switch between integrated sound card and USB headphones) but 'pavucontrol' shows all of my devices correctly (and allows switching) but it eventually fails after some time showing the message:
Stablishing connection to PulseAudio. Please wait...in the graphical app, and:
shm_open() failed: The file or directory does not existin the terminal.
Restarting pulseaudio again works but I have to do it now and again to keep it working (and restarting applications which lose sound).
I didn't know about the openjdk7 bug. I had Eclipse and openjdk7 installed and switched to openjdk8 now. The issue persists but thanks for the advice ![]()
Last edited by wulfara (2015-12-14 12:51:30)
Offline
OK I found the problem. It is a known bug of PulseAudio 7 with FireJail (a tool for sandboxing applications https://wiki.archlinux.org/index.php/Firejail)
It is discussed here: https://github.com/netblue30/firejail/issues/69
The workaroud is to edit '/etc/pulse/default.pa' and replace:
load-module module-native-protocol-unixwith:
load-module module-native-protocol-unix srbchannel=noA PulseAudio developer posted in that thread that they will fix it in the future but for now this makes PulseAudio and FireJail to work together correctly.
Plasma System Preferences is showing back all of my devices by its name and allows switching via "Prefer" button.
I should have realized before that it all began when started to test Firejail...
Offline