Skip to content

Draft: bluez5: handle Volume attribute going away

P V requested to merge pvir/pipewire:bt-hw-volume-away into master

Sometimes BlueZ returns errors from setting the Volume property.

If setting the Volume property fails, assume HW volume is no longer functional, and switch back to software volume. The HW volume will get reactivated if the Volume attribute reappears.


Handle PropertiesChanged invalidation of Volume and Delay properties, by disabling the features when that occurs.


bluez5: retain volume level when changing between sw/hw volume

Add logic for retaining volume level when switching between HW and SW volume control.

This avoids large volume level changes, when hardware volume control becomes disabled or enabled.

This can be tested by a BlueZ patch that makes volume presence toggleable


This should reduce the number of cases where volume becomes un-adjustable, if BlueZ takes the Volume attribute down.


XXX: I'll still want to do something about the error messages that appear on codec switching, where it appears that the Volume attribute is usually not available early enough.

XXX: This is also something that should be partly fixed on the BlueZ side...

Edited by P V

Merge request reports