Userland autostart pulseaudio starts after session triggered apps such as firefox #121

Open
opened 10 months ago by deloptes · 5 comments
Collaborator

Basic information

  • TDE version: R14.1
  • Distribution: Buster
  • Hardware: amd64

Description

On two desktops I observer following behaviour.
When firefox is open when desktop being shut down, or Skype (it is running as applet). After start up these are triggered before pulseaudio being started.
It looks like the TDE session starts previously running apps before userland such as pulseaudio.

Steps to reproduce

  1. Login and make sure PA is running
  2. KMix shows PA as default audio mixer
  3. Start Firefox and make sure it can play audio (youtube or so)
  4. without closing Firefox reboot
  5. Login
  6. Firefox starts automatically (recoverd by SM)
  7. Firefox can not play audio
  8. KMix is missing PA in the mixer
  9. Restart Firefox and KMix and they behave as expected

Screenshots

<!-- This is a comment. Please fill in the required fields below. The comments provide instructions on how to do so. Note: You do not need to remove comments. --> ## Basic information - TDE version: R14.1 - Distribution: Buster - Hardware: amd64 <!-- Use SL/* labels to set the severity level. Please do not set a milestone. --> ## Description On two desktops I observer following behaviour. When firefox is open when desktop being shut down, or Skype (it is running as applet). After start up these are triggered before pulseaudio being started. It looks like the TDE session starts previously running apps before userland such as pulseaudio. ## Steps to reproduce 1. Login and make sure PA is running 2. KMix shows PA as default audio mixer 3. Start Firefox and make sure it can play audio (youtube or so) 4. without closing Firefox reboot 5. Login 6. Firefox starts automatically (recoverd by SM) 7. Firefox can not play audio 8. KMix is missing PA in the mixer 9. Restart Firefox and KMix and they behave as expected ## Screenshots <!-- If it seems useful, please provide provide one or more screenshots. -->
Poster
Collaborator

See also this PR #120

See also [this PR #120](https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/pulls/120)
Owner

Problem confirmed on my computer too.

Problem confirmed on my computer too.
Poster
Collaborator

Looks like if priority is set to 0 it works, other wise not.

I did a copy of pulseaudio.desktop to /opt/trinity/etc/xdg/autostart/pulseaudio.desktop

and changed

Exec=start-pulseaudio-x11-trinity

X-TDE-autostart-phase=0

I did a copy of start-pulseaudio-x11 to start-pulseaudio-x11-trinity

    if [ x"$TDE_FULL_SESSION" = x"true" ]; then
       /usr/bin/pactl load-module module-device-manager "do_routing=1" > /dev/null
    fi

It works as expected. I am wondering if something changed on TDE side. In the README.autostart it says

KDE session startup occurs in the following sequence:

Window manager startup
Autostart phase 1
Session restoration
Autostart phase 2

When looking into the launcher debug it seems that it spawns any kind of apps in the phase 1 - thus it could be luck or not if PA is staretd before whatever needs it.
I'm just wondering why it does not started before the session stuff.

Looks like if priority is set to 0 it works, other wise not. I did a copy of pulseaudio.desktop to /opt/trinity/etc/xdg/autostart/pulseaudio.desktop and changed ``` Exec=start-pulseaudio-x11-trinity X-TDE-autostart-phase=0 ``` I did a copy of start-pulseaudio-x11 to start-pulseaudio-x11-trinity ``` if [ x"$TDE_FULL_SESSION" = x"true" ]; then /usr/bin/pactl load-module module-device-manager "do_routing=1" > /dev/null fi ``` It works as expected. I am wondering if something changed on TDE side. In the README.autostart it says > KDE session startup occurs in the following sequence: > > Window manager startup > Autostart phase 1 > Session restoration > Autostart phase 2 When looking into the launcher debug it seems that it spawns any kind of apps in the phase 1 - thus it could be luck or not if PA is staretd before whatever needs it. I'm just wondering why it does not started before the session stuff.
Owner

Hi Emanoil,

I guess the difference is that you are autostarting it at phase 0 now, althogh I am just guessing by looking at your comment.

In any case this is a topic we should come up with a good solution, since I guess more and more people will use PA at some point.

Hi Emanoil,<br/> I guess the difference is that you are autostarting it at phase 0 now, althogh I am just guessing by looking at your comment. In any case this is a topic we should come up with a good solution, since I guess more and more people will use PA at some point.
Poster
Collaborator

Hi,
yes, if it was not clear let me explain once again.

  1. tested with phase=1, but without success
  2. tested with phase=0, with success

My question now is regarding the documentation describing the startup of TDE. Are firefox or skype not part of the session restauration. Why is not phase 0 in the description?

It could be the problem is somewhere else.

Hi, yes, if it was not clear let me explain once again. 1. tested with phase=1, but without success 2. tested with phase=0, with success My question now is regarding the documentation describing the startup of TDE. Are firefox or skype not part of the session restauration. Why is not phase 0 in the description? It could be the problem is somewhere else.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.