Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Where does pipewire / wireplumber save the coupling
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sat Jul 13, 2024 6:28 pm    Post subject: Where does pipewire / wireplumber save the coupling Reply with quote

Hi,

I recently successfully connected a bluetooth headset to google-chrome (which runs as an unprivileged user, using the same pulse socket as my main user).

Unfortunately, the headset ran out of battery, and google-chrome switched to standard loudspeaker output.
Even after recharging, google-chrome continued outputting to standard loudspeaker while all other applications (with pulse output) did output to bluetooth.

I removed everything under ~/.local/state which looked like pulse* pipe* wire* for all 3 directories (unprivileged user, privileged user, root) and restarted pipewire and wireplumber: no change. Even rebooting did not change anything.

What eventually helped was that if I ran pavucontrol as unprivileged user then sometimes something with “Google Chrome“ was visible for 1-2 seconds. One time I was lucky and managed to press a button there, and then I could really define the output device. After this, even after rebooting, the google-chrome output goes reliably to bluetooth again. Still, ~/.local/state is empty for the unprivileged user, and for root ~/.local/state/wireplumber contains only two harmless lines. For the privileged user, ~/.local/state/wireplumber contains one file with a line containing "Google Chrome", but this apparently just sets the volume and that it is not muted.

Since obviously the change was stored, it has to be stored in some other file. I would like to know where so that I do not have to bet on luck next time to hit some button which appears for 1-2 seconds, if at all.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6147
Location: Dallas area

PostPosted: Sat Jul 13, 2024 7:47 pm    Post subject: Reply with quote

As far as I know pipewire doesn't save anything, wireplumber does and it goes in .local/state/wireplumber/*
Code:
/.local/state/wireplumber $ ls
default-nodes  default-routes  restore-stream  sm-settings  stream-properties


This is with it set up for single user, I have no idea where things go with multi-user pipewire
What user does pipewire/wireplumber run under?
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
octonoodle
n00b
n00b


Joined: 21 Feb 2024
Posts: 8

PostPosted: Sat Jul 13, 2024 8:38 pm    Post subject: Reply with quote

not needed.

Last edited by octonoodle on Mon Jul 15, 2024 2:00 am; edited 1 time in total
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sat Jul 13, 2024 8:49 pm    Post subject: Reply with quote

Anon-E-moose wrote:
As far as I know pipewire doesn't save anything, wireplumber does and it goes in .local/state/wireplumber/*
Code:
/.local/state/wireplumber $ ls
default-nodes  default-routes  restore-stream  sm-settings  stream-properties
As mentioned, I have removed these files for all 3 relevant users, and even after rebooting the previous setting persisted; also, there was no obvious related change in any of these files after I fixed the issue with pavucontrol, but now after rebooting it continues to work.
Quote:
What user does pipewire/wireplumber run under?

Under my main wayland user. The only difference to the default setup is that I use
/etc/pipewire/pipewire-pulse.conf.d/pipewire-pulse.conf wrote:
"unix:/path/to/pipewire.socket"
and correspondingly (for my main wayland user and the unprivileged user running google-chrome)
Quote:
PULSE_SERVER=/path/to/pipewire.socket
and of course
/etc/pulse/client.conf wrote:
autospawn = no
(but pulseaudio-daemon is not installed, anyway).
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6147
Location: Dallas area

PostPosted: Sun Jul 14, 2024 9:43 am    Post subject: Reply with quote

I don't run pulse, does it keep any data anywhere?
I don't think wireplumber handles pulse per se, IIRC it only handles alsa/bluetooth.
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sun Jul 14, 2024 6:08 pm    Post subject: Reply with quote

Anon-E-moose wrote:
I don't run pulse, does it keep any data anywhere?

I have no idea. I checked once more all my files in ~/.config, ~/.local, and ~/.cache, and I found some ~/.config/pulse, but the timestamps of the files in it are some years old. There is one exception for the root directory where there is some cookie file which is just 14 days old, probably from some experiments of getting bluetooth to work.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3430

PostPosted: Thu Jul 25, 2024 3:45 pm    Post subject: Reply with quote

mv: you will probably able to fix it in a matter of seconds with wpctl (while headset is connected)
run wpctl status to find devices' node numbers and set-default your headset.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Mon Aug 05, 2024 9:11 pm    Post subject: Reply with quote

szatox wrote:
mv: you will probably able to fix it in a matter of seconds with wpctl (while headset is connected)
run wpctl status to find devices' node numbers and set-default your headset.

The problem is not the default: The headset was the default all of the time - that's why all applications did use it.
The problem was that apparently for google-chrome (youtube) some special setting was stored on disk somewhere, and this storage apparently somehow belongs to wireplumber/pipewire, because eventually I could change the storage with pavucontrol while deleting config data for google-chrome did not help.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3430

PostPosted: Mon Aug 05, 2024 10:47 pm    Post subject: Reply with quote

I see. Well, I don't know pulseaudio side of things, I only use alsa and jack protocols.
I found some state in $HOME/.local/state/wireplumber/ though. Perhaps this is what you were looking for.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sat Aug 10, 2024 6:40 pm    Post subject: Reply with quote

szatox wrote:
I found some state in $HOME/.local/state/wireplumber/ though. Perhaps this is what you were looking for.

Thanks for the reply. Unfortunately, this is not what I was looking for: I had cleaned this, and the behavior survived a reboot anyway.
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 449
Location: Naarm/Melbourne, Australia

PostPosted: Sun Aug 11, 2024 4:54 am    Post subject: Reply with quote

i'm wondering whether the issue might be state saved by Chrome .... What's the output of:
Code:
$ cat ~/.config/google-chrome/Default/Preferences | jq | grep 'sound\|speaker'

(assuming you're using the 'Default' profile and have app-misc/jq installed)?
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6780

PostPosted: Sun Aug 11, 2024 5:14 am    Post subject: Reply with quote

flexibeast wrote:
i'm wondering whether the issue might be state saved by Chrome ....

I also had ~/.config/google-chrome and ~/.cache/google-chrome temporarily removed before one of the reboots, and it did not change anything. Anyway, now (with the restored directory and the sound switched back with pavucontrol), I see nothing there ("speaker_selection": {} and also the less output around sound does not contain anything with youtube).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum