Issue: When using MPD and MPV using PipeWire/Wireplumber, adjusting the audio levels of MPD implicitly sets the the init-volume of MPV when playing music.
Wireplumber updated and made all previous .lua
config files
incompatible with the new version. Great.
Thanks to the Wireplumber git repo and this post, I got the config working again.
If you didn't have a "main" configuration file before, copy over the defaults:
> cp /usr/share/wireplumber/wireplumber.conf ~/.config/wireplumber
Create the new "extra" config directory:
> mkdir ~/.config/wireplumber/wireplumber.conf.d
Then create ~/.config/wireplumber/wireplumber.conf.d/51-mpv-fix.conf
with the following content:
stream.rules = [
{
matches = [
{
application.name = "mpv"
}
]
actions = {
update-props = {
state.restore-props = false
}
}
}
]
A workaround for this issue is as follows, which will make MPV start with 100% volume each time:
Create a file .config/wireplumber/main.lua.d/51-mpv-fix.lua
with the following content:
stream_defaults.rules = {
{
matches = {
{
{ "application.name", "matches", "mpv" },
},
},
apply_properties = {
["state.restore-props"] = false,
},
},
}