-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Enable Bluetooth A2DP auto-connect in WirePlumber #5336
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
base: dev
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| ## Auto-connect A2DP playback/capture profiles on Bluetooth devices. | ||
| ## This helps speakers and receivers expose their audio profiles without | ||
| ## requiring manual PipeWire/WirePlumber recovery. | ||
|
|
||
| monitor.bluez.rules = [ | ||
| { | ||
| matches = [ | ||
| { | ||
| device.name = "~bluez_card.*" | ||
| } | ||
| ] | ||
| actions = { | ||
| update-props = { | ||
| bluez5.auto-connect = [ a2dp_sink a2dp_source ] | ||
| } | ||
| } | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| # Turn on bluetooth by default | ||
| chrootable_systemctl_enable bluetooth.service | ||
|
|
||
| mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ | ||
| cp $OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconnect.conf \ | ||
| ~/.config/wireplumber/wireplumber.conf.d/ |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,7 @@ | ||||||||||||
| echo "Enable Bluetooth A2DP auto-connect in WirePlumber" | ||||||||||||
|
|
||||||||||||
| mkdir -p ~/.config/wireplumber/wireplumber.conf.d/ | ||||||||||||
| cp $OMARCHY_PATH/default/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconnect.conf \ | ||||||||||||
| ~/.config/wireplumber/wireplumber.conf.d/ | ||||||||||||
|
|
||||||||||||
| omarchy-restart-pipewire | ||||||||||||
|
||||||||||||
| omarchy-restart-pipewire | |
| systemctl --user restart wireplumber.service pipewire.service | |
| if systemctl --user --quiet is-active pipewire-pulse.service; then | |
| systemctl --user restart pipewire-pulse.service | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in fbb1e2b. omarchy-restart-pipewire now restarts wireplumber.service and pipewire.service, and also restarts pipewire-pulse.service when it is active, so this migration reloads the new WirePlumber rule immediately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This migration always overwrites an existing user rule file if it’s already present (e.g., a user may have created/tuned the same file as a workaround). Consider making this idempotent by only copying when the destination file doesn’t exist, or by backing up the existing file before overwriting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in fbb1e2b. The migration now keeps an existing
~/.config/wireplumber/wireplumber.conf.d/bluetooth-a2dp-autoconnect.confin place instead of overwriting a user workaround file.