Bug 379245

Summary: plasma-pa does not honor switching pulseaudio server by using pax11publish
Product: [Unmaintained] plasma-pa Reporter: Mads <mads>
Component: generalAssignee: David Rosca <nowrep>
Status: RESOLVED WORKSFORME    
Severity: normal CC: mads, plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Mads 2017-04-26 11:15:18 UTC
If you have several pulseaudio servers running on your network and you want to switch to one of them on the fly, you can use the command "pax11publish -e -S <pulseaudio_hostname>". It works great, but unfortunately plasma-pa does not follow suit itself. It still shows and controls the settings for the server it connected to during startup.

If pulse-pa could switch pulseaudio host on the fly like normal audio playing applications does, it would be great!
Comment 1 David Rosca 2017-04-30 08:34:15 UTC
Can you please post output of

qdbus org.pulseaudio.Server /org/pulseaudio/server_lookup1 org.PulseAudio.ServerLookup1.Address

before and after you switch server?
Comment 2 Mads 2017-05-02 07:23:23 UTC
$ qdbus org.pulseaudio.Server /org/pulseaudio/server_lookup1 org.PulseAudio.ServerLookup1.Address
unix:path=/run/user/1000/pulse/dbus-socket
$ pax11publish -e -S another_pulseserver
$ qdbus org.pulseaudio.Server /org/pulseaudio/server_lookup1 org.PulseAudio.ServerLookup1.Address
unix:path=/run/user/1000/pulse/dbus-socket

They stay the same, because as far as I understand it, pax11publish only changes data stored as properties in my X root window:

$ xprop -root | grep ^PULSE_
PULSE_SESSION_ID(STRING) = "c2"

$ pax11publish -e -S another_pulseserver

$ xprop -root | grep ^PULSE_
PULSE_COOKIE(STRING) = "...very_long_string_containing_a_pulse_cookie..."
PULSE_SERVER(STRING) = "another_pulseserver"
PULSE_SESSION_ID(STRING) = "c2"

I have created a '.config/pulse/cookie' file at both client and server and enabled tcp server at the daemon side, or else I reckon this wouldn't work.
Comment 3 David Rosca 2017-05-02 07:26:53 UTC
Thank you, in that case we should listen for the root window x property change.

How does it work in audio players, do you need to restart playback or it switches automatically right after you do pax11publish?
Comment 4 Mads 2017-05-02 07:31:24 UTC
In e.g. audacious, I have to press the stop button and then press play again for the audio to switch server, it won't switch the currently playing stream on the fly. But you don't have to restart the application, just stop the audio stream and then start it again.
Comment 5 Justin Zobel 2022-11-06 09:24:58 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 6 Bug Janitor Service 2022-11-21 05:12:48 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2022-12-06 05:19:25 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!