Bug 19228

Summary: 6_rc0: /etc/X11/xinit.d/50pulseaudio causes 20+ second launch delay
Product: Mageia Reporter: Bit Twister <bittwister2>
Component: RPM PackagesAssignee: Colin Guthrie <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: mageia, marja11, thierry.vignaud
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: pulseaudio-9.0-3.mga6.src.rpm CVE:
Status comment:

Description Bit Twister 2016-08-21 15:49:24 CEST
Description of problem:

/etc/X11/xinit.d/50pulseaudio causes 20+ second desktop launch delay when using xfce desktop environment.

Guessing reason is incorrect $SESSION check.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. assuming xfce task package is installed
2. set DISPLAYMANAGER=sddm in /etc/sysconfig/desktop
3. reboot system
4. At the plymouth login screen, select xfce desktop, then log in.
5. count the seconds until xfce desktop shows up.

Workaround:
change    GNOME|KDE*|xfce4)
to        GNOME|KDE*|*xfce*)
in /etc/sysconfig/desktop

I have no clue if other changes are required when using plymouth login manager because for xfce $SESSION=startxfce4
Comment 1 David Walser 2016-08-21 16:53:55 CEST
I wonder if this is related to the changes in Bug 17617 (which are still buggy, patch available there).
Comment 2 Bit Twister 2016-08-21 19:00:55 CEST
(In reply to David Walser from comment #1)
> I wonder if this is related to the changes in Bug 17617 (which are still
> buggy, patch available there).

It would not surprise me one bit. What little rooting around I have done seems a fair amount of code wants the $DESKTOP=(GNOME,KDE?,xfce?,...) type value but that variable is no longer set in /etc/sysconfig/desktop.

$ cat /etc/sysconfig/desktop
DISPLAYMANAGER=sddm


My guess any code looking at $SESSION can not vector using the DESKTOP name.

I did create ~/.DESKTOP with
DISPLAYMANAGER=sddm
DESKTOP=xfce4

and next login gave me a locked up environment. :(
Comment 3 Bit Twister 2016-08-22 09:16:23 CEST
A little more testing seems to indicate $SESSION will contain the Exec value I.E.
grep Exec= /usr/share/xsessions/*

I tried a Plasma desktop and $SESSION had /usr/bin/startkde

Summary: 6_rc0: /etc/X11/xinit.d/50pulseaudio causes 20+ second launch delay for xfce4 => 6_rc0: /etc/X11/xinit.d/50pulseaudio causes 20+ second launch delay

David Walser 2016-08-22 13:53:53 CEST

CC: (none) => mageia, thierry.vignaud

Comment 4 Marja Van Waes 2016-08-22 19:43:21 CEST
Assigning to Colin, even if the above gives the impression the bug has nothing to do with pulseaudio.

Colin is so brilliant, he might understand what's going on and how to fix it in a snap second :-D

CC: (none) => marja11
Assignee: bugsquad => mageia

Comment 5 David Walser 2016-08-26 16:51:00 CEST
See if the update to PulseAudio 9.0 in Cauldron improves things.

Also, chksession has been fixed.
Comment 6 Bit Twister 2016-08-26 17:51:37 CEST
(In reply to David Walser from comment #5)
> See if the update to PulseAudio 9.0 in Cauldron improves things.

Nope, made my problems worse. At the moment I am still trying to get puleaudio to work as a system daemon with either  pulseaudio-9.0-1 or -2


> Also, chksession has been fixed.

Maybe it was but nothing has fixed this problem.

Here is the proof. I added the echo statement

# cat /etc/X11/xinit.d/50pulseaudio 
#!/bin/sh
# to be sourced
echo "SESSION=$SESSION" > $HOME/SESSION.TXT
case "$SESSION" in
        GNOME|KDE*|xfce4)
                # XDG is supported so we don't need to do anything.
                # as XDG Autostart will "just work"(tm)
                ;;
        *)
                /usr/bin/start-pulseaudio-x11
                ;;
esac

Rebooted the system and 
    $ cat $HOME/SESSION.TXT
    SESSION=startxfce4
shows that start-pulseaudio-x11 will always cause the delay.
Bit Twister 2016-10-13 10:38:32 CEST

Source RPM: pulseaudio-8.0-5.mga6.src.rpm => pulseaudio-9.0-3.mga6.src.rpm

Comment 7 Bit Twister 2017-01-23 21:29:23 CET
Seems to be working.

Status: NEW => RESOLVED
Resolution: (none) => FIXED