You are not logged in.

#1 2012-09-16 13:48:09

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 192
Website

Long delay on KDE login caused by Pulseaudio

Hi all,

I am experiencing an annoying delay after logging into KDE. This happened very recently, where I moved to pure systemd and upgraded kde (I am not sure what the exact cause is). It looks like https://bbs.archlinux.org/viewtopic.php?pid=1157890, but instead of not starting, I get a long delay.

Example:
timestamp 0 - login
timestamp 8 - desktop is loaded partially and startup freezes
timestamp 33 - loading the desktop continues

This is very reproducable, I logout and login again - the issue repeats with the same times. I have isolated the problem to /usr/bin/start-pulseaudio-x11, line:

/usr/bin/pactl load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null

Stracing it shows that it freezes after sending the load-module command to pulseaudio over the native socket in /tmp/pulse-XXX/native and waiting for a response. This takes about 25 seconds, the same as in the example above.

The above timestamp tests have been performed by adding the next to ~/.bash_profile:

if mkdir /tmp/checks 2>/dev/null; then
        for ((i=0; i<=40; i++)); do
                [ -d /tmp/checks ] || break
                p=00$i
                p=${p:0-2}
                ps xww -o user,pcpu,cmd >> /tmp/checks/$p-ps
                cp $HOME/.xsession-errors /tmp/checks/$p-xe
                sleep 1
        done
fi &

I then use the next to check the differences between two ps outputs (after using wc -l to count the lines in the files and using `date -r XX-ps` to check the timestamp):

read a b; colordiff -u <(sed 's/[0-9]\.[0-9]//' $a-ps) <(sed 's/[0-9]\.[0-9]//' $b-ps)|less -r

Similar to http://lists.fedoraproject.org/pipermai … 11721.html which appears to be solved, but not for me.

Does anyone else experience this issue? Any solutions?

System is up-to-date, KDE 4.9.1, pulseaudio 2.1, systemd, laptop.

Edit: the problem occured since I patched kdm to set XAUTHORITY (not sure if that is related), after replacing with the original kdm binary, the issue seems to be gone is still existent.

Last edited by Lekensteyn (2012-09-16 20:50:27)

Offline

#2 2012-09-16 16:11:00

Box0
Member
From: Italy
Registered: 2011-09-21
Posts: 218

Re: Long delay on KDE login caused by Pulseaudio

May be this: https://bbs.archlinux.org/viewtopic.php?id=132765

try to remove /etc/xdg/autostart/pulseaudio.desktop or the other pulseaudio file in there and see if it makes some difference. It actually worked for me.

Last edited by Box0 (2012-09-16 16:14:11)

Offline

#3 2012-09-16 20:52:57

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 192
Website

Re: Long delay on KDE login caused by Pulseaudio

Well yes, that just avoids the issue by preventing start-pulseaudio-x11 from starting. I'll try that workaround until a real solution shows up. Thanks for your reply.

I'll try this patch from Ubuntu quantal does not seem to work:

From b4389a752385afd6e65e412a8488828ee3648fbd Mon Sep 17 00:00:00 2001
From: Zsolt Rizsanyi <rizsanyi@users.sourceforge.net>
Date: Sun, 27 Jun 2010 15:16:13 +0100
Subject: [PATCH 2/2] In KDE only start pulseaudio from the KDE specific desktop file

---
 src/daemon/pulseaudio.desktop.in |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/daemon/pulseaudio.desktop.in b/src/daemon/pulseaudio.desktop.in
index 99bdbd0..47b2eb4 100644
--- a/src/daemon/pulseaudio.desktop.in
+++ b/src/daemon/pulseaudio.desktop.in
@@ -6,5 +6,6 @@ _Comment=Start the PulseAudio Sound System
 Exec=start-pulseaudio-x11
 Terminal=false
 Type=Application
+NotShowIn=KDE;
 Categories=
 GenericName=

Creating an empty ~/.config/autostart/pulseaudio.desktop overrides the one in /etc/xdg/ and seems to work.

Last edited by Lekensteyn (2012-09-16 22:21:58)

Offline

Board footer

Powered by FluxBB