-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Wireplumber module crashes on audio context change #1907
Comments
Can you see if this patch fixes it for you? It has in my testing https://github.com/Alexays/Waybar/compare/master...smoak:Waybar:fix-wireplumber-crashes.patch |
It doesn't crash anymore, but volume is not updated. After some investigation, the issue is with "get-default-configured-node-name" which returns the name of the sink configured to be the default, but not the current selected sink. So in my case, it always gets my configured default aka my bluez output, even when it's not connected. I changed it to get the name from Also, I understand better what happens during tty changes. When I switch to a tty which doesn't have a session of the same user opened, it "unplugs" devices from the user and "plugs" it to the new user. Now that the module handle hotplug of a soundcard, it also handle "hotplug" of internal devices. So it should work with |
Thanks. That explanation makes sense. I have updated my branch with what you have stated (ie getting the default node name via |
I tested it, it works perfectly after I plug/unplug devices. But there is an issue at startup, onObjectManagerInstalled still uses the configured default. |
I don't think this is possible. There is only the default nodes api to use. Otherwise, this module would have to be a full blown manager application in order to access the internals of Pipewire. I could add a config option (e.g. |
The wireplumber module causes waybar to crash when the wireplumber context changes.
This is probably due to the fact that
node.id
is not a stable identifier for nodes.How to replicate
Sway v1.7
Waybar v0.9.16
libwireplumber v0.4.13
config.conf:
style.css empty
There are several ways to trigger the issue.
Disconnect sink
If you have a USB soundcard, a bluetooth headset or anything that you can disconnect:
wpctl set-default <id>
Change TTY
For some reasons, wireplumber reassign a new id to every node when I open a new tty.
(opt) check nodes id with
wpctl status
(opt) check nodes id again
Output
Note 1: I triggered the error by switching tty2 at ~10:14:47.4
Note 2:
Node 31
was the default Audio/Sink node when waybar startedRelated issue
Suggestion
objects-changed
?)node.name
instead ofnode.id
(doesn't fix the related issue though)The text was updated successfully, but these errors were encountered: