Bug 267766 - Pulse audio freezes desktop for 10-15 seconds on first KDE login
Summary: Pulse audio freezes desktop for 10-15 seconds on first KDE login
Status: RESOLVED FIXED
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: Pulsesupport (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 09:06 UTC by Texstar
Modified: 2011-05-10 16:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Texstar 2011-03-06 09:06:51 UTC
Version:           4.5 (using KDE 4.6.1) 
OS:                Linux

When starting the computer from a cold boot with pulse audio enabled causes the KDE 4.6.1 desktop to freeze for 10-15 seconds before the desktop becomes responsive and the login sound is produced. This only happens on a cold boot. Any future logout and logins after fist boot work as expected.

I did not experience this delay with KDE 4.6.0 desktop. It sounds like KDE 4.6.1 is killing the existing pulse audio server then re-spawning it causing the delay.



Reproducible: Always

Steps to Reproduce:
Enable pulse audio and do a cold boot.
Comment 1 Colin Guthrie 2011-03-06 20:00:05 UTC
Even a kill and restart of the PA Server shouldn't cause 10-15 seconds of lockup - more like 1-2s max - so I'd say something else is going on.

You say that it doesn't happen except on first login? Can you perhaps try logging out, then logging in quickly on a text terminal and type "pulseaudio -k" then logout and then try a graphical login again. This should basically simulate the state of PA on a cold boot (normally after logging out the PA daemon will stay alive for a minute or two in case it's needed again before committing suicide). 

Alternatively, just wait a couple minutes after logging out to let the PA daemon die before logging back in again.

Does the same delay come back under either of the above circumstances?
Comment 2 Texstar 2011-03-06 22:25:07 UTC
Yes it does the same thing but I just found what is causing it.

The pulseaudio-kde.desktop file in the /etc/xdg/autostart folder from our pulseaudio-module-x11-0.9.22 package. If I remove the desktop file from the autostart folder everything starts properly. 

pulseaudio-kde.desktop calls start-pulseaudio-kde.
Comment 3 Texstar 2011-03-07 07:18:24 UTC
Args, it is still intermittent so I'll keep digging around to see what changed between KDE 4.6.0 and 4.6.1.
Comment 4 Texstar 2011-03-07 09:15:55 UTC
Tested PA with KDE 4.6.1 on standard sata system and everything is ok. The intermittent problem may be due to a timing issue since that system boots from a ssd drive. I am going to start clean with an updated ISO on the ssd drive just to make sure something isn't boogered somewhere.
Comment 5 Colin Guthrie 2011-03-07 10:51:02 UTC
If there is a timing issue, I wouldn't be overly surprised, but I don't get one on my SSD here (tho' not tested 4.6.1 yet... and I have a patch that changes how knotify outputs sound - so not a great test bed really!)

I have had some suspicion of a startup timing issue for a while but it should not result in a delay - it's more a case of miss-detecting that PA had started and falling back to ALSA mode.... perhaps this could trigger a code path that does lead to a delay tho'....
Comment 6 Texstar 2011-05-10 16:13:17 UTC
Removed 3 different desktop files on my system related to pulse and no more delays.
Comment 7 Colin Guthrie 2011-05-10 16:57:00 UTC
I wonder why these would cause problems. Certainly one of the .desktop files is needed for proper interaction with KDE (otherwise you'll get what I call "degraded mode" in System Settings -> Multimedia: see http://pulseaudio.org/wiki/KDE for screenshots).

Certainly, 10-15s delay should not be a result of this :s It would be interesting to get further debugging but it's quite hard to capture that data during login without affecting the issue itself :s