Bluetooth: Difference between revisions
imported>Rskew Add troubleshooting step showing when/how to enable Broadcom firmware |
imported>Mdedetrich Add information on how to automatically switch to bluetooth audio headset on connect |
||
Line 134: | Line 134: | ||
* To enable A2DP, run: <syntaxhighlight lang="console">$ pacmd set-card-profile "$(pactl list cards short | egrep -o bluez_card[[:alnum:]._]+)" a2dp_sink</syntaxhighlight> | * To enable A2DP, run: <syntaxhighlight lang="console">$ pacmd set-card-profile "$(pactl list cards short | egrep -o bluez_card[[:alnum:]._]+)" a2dp_sink</syntaxhighlight> | ||
* To set the device as the default audio output, run: <syntaxhighlight lang="console">$ pacmd set-default-sink "$(pactl list sinks short | egrep -o bluez_sink[[:alnum:]._]+)"</syntaxhighlight> | * To set the device as the default audio output, run: <syntaxhighlight lang="console">$ pacmd set-default-sink "$(pactl list sinks short | egrep -o bluez_sink[[:alnum:]._]+)"</syntaxhighlight> | ||
You can also set pulseaudio to automatically switch audio to the connected bluetooth device when it connects, in order to do this add the following entry into the pulseaudio config | |||
<syntaxhighlight lang="nix">{ | |||
... | |||
hardware.pulseaudio.extraConfig = " | |||
load-module module-switch-on-connect | |||
"; | |||
... | |||
}</syntaxhighlight> | |||
Note that you may need to clear the pulseaudio config located at `~/.config/pulse` to get this to work. Also you may have to also have to unset and then reset the default audio device, see https://github.com/NixOS/nixpkgs/issues/86441 for more info | |||
==Troubleshooting== | ==Troubleshooting== |