Automatically switch sound output device to Bluetooth headset & force to A2DP profile on connection
Using Mint 17 + MATE here. My bluetooth headset (Plantronics Backbeat Go2) is connected just fine with my system, but there are several manual steps I have to take to make this work that I would very much like to have automated:
- After every reboot I have to run pactl load-module module-bluetooth-discover in the terminal to get the device to connect at all. I tried putting this in a shell script to run on start up, but no dice :(
- My headset connects automatically with no issues, but it always defaults to Telephony Duplex or even Off instead of A2DP; I've tried and failed with several different strategies to force A2DP :(
- Force the BT headset to be the default output device. Tried several strategies here, too... unfortunately every time I connect the headset the index from pacmd seems to change, so I can't force a default in the PA conf file set-default-sink that way. And using the listed name doesn't seem to work either - if the headset is not present, it switches to the speakers and doesn't switch back if the headset connects :(
Thanks for any advice you might have on resolving these issues!
pulseaudio bluetooth
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
Using Mint 17 + MATE here. My bluetooth headset (Plantronics Backbeat Go2) is connected just fine with my system, but there are several manual steps I have to take to make this work that I would very much like to have automated:
- After every reboot I have to run pactl load-module module-bluetooth-discover in the terminal to get the device to connect at all. I tried putting this in a shell script to run on start up, but no dice :(
- My headset connects automatically with no issues, but it always defaults to Telephony Duplex or even Off instead of A2DP; I've tried and failed with several different strategies to force A2DP :(
- Force the BT headset to be the default output device. Tried several strategies here, too... unfortunately every time I connect the headset the index from pacmd seems to change, so I can't force a default in the PA conf file set-default-sink that way. And using the listed name doesn't seem to work either - if the headset is not present, it switches to the speakers and doesn't switch back if the headset connects :(
Thanks for any advice you might have on resolving these issues!
pulseaudio bluetooth
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
I think the solution is something withudev
, but im not sure how it should be done.
– hschou
Jun 2 '17 at 9:29
add a comment |
Using Mint 17 + MATE here. My bluetooth headset (Plantronics Backbeat Go2) is connected just fine with my system, but there are several manual steps I have to take to make this work that I would very much like to have automated:
- After every reboot I have to run pactl load-module module-bluetooth-discover in the terminal to get the device to connect at all. I tried putting this in a shell script to run on start up, but no dice :(
- My headset connects automatically with no issues, but it always defaults to Telephony Duplex or even Off instead of A2DP; I've tried and failed with several different strategies to force A2DP :(
- Force the BT headset to be the default output device. Tried several strategies here, too... unfortunately every time I connect the headset the index from pacmd seems to change, so I can't force a default in the PA conf file set-default-sink that way. And using the listed name doesn't seem to work either - if the headset is not present, it switches to the speakers and doesn't switch back if the headset connects :(
Thanks for any advice you might have on resolving these issues!
pulseaudio bluetooth
Using Mint 17 + MATE here. My bluetooth headset (Plantronics Backbeat Go2) is connected just fine with my system, but there are several manual steps I have to take to make this work that I would very much like to have automated:
- After every reboot I have to run pactl load-module module-bluetooth-discover in the terminal to get the device to connect at all. I tried putting this in a shell script to run on start up, but no dice :(
- My headset connects automatically with no issues, but it always defaults to Telephony Duplex or even Off instead of A2DP; I've tried and failed with several different strategies to force A2DP :(
- Force the BT headset to be the default output device. Tried several strategies here, too... unfortunately every time I connect the headset the index from pacmd seems to change, so I can't force a default in the PA conf file set-default-sink that way. And using the listed name doesn't seem to work either - if the headset is not present, it switches to the speakers and doesn't switch back if the headset connects :(
Thanks for any advice you might have on resolving these issues!
pulseaudio bluetooth
pulseaudio bluetooth
asked Feb 25 '15 at 17:37
LogosLogos
1715
1715
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
I think the solution is something withudev
, but im not sure how it should be done.
– hschou
Jun 2 '17 at 9:29
add a comment |
I think the solution is something withudev
, but im not sure how it should be done.
– hschou
Jun 2 '17 at 9:29
I think the solution is something with
udev
, but im not sure how it should be done.– hschou
Jun 2 '17 at 9:29
I think the solution is something with
udev
, but im not sure how it should be done.– hschou
Jun 2 '17 at 9:29
add a comment |
2 Answers
2
active
oldest
votes
The first problem occurs because Pulse Audio unloads the bluetooth module after startup, so even if you put it in your startup script, it still gets unloaded a few seconds later.
Solution A
Just add a startup delay in your script, something like:
sleep 10 && pactl load-module module-bluetooth-discover
Solution B (recommended)
- Disable the bluetooth/Pulse Audio plugin.
- Right click your bluetooth icon, select Plugins, then uncheck the Pulse Audio plugin.
- Restart.
Sorry, but I don't have a solution for your remaining two issues.
add a comment |
Re #3, my solution is this:
- Add a unified device (simultaneous output to all devices) that merges all others
- Use that as the default output device
- Keep all other physical outputs muted except the BT headset
The benefit is that all programs can send output to that regardless of whether the BT headset is connected or not. Then, once the headset connects, it starts receiving the sound.
If you do that then you should also set flat-volumes = no
to /etc/pulse/daemon.conf
and only control the unified output with your volume control keys.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f186830%2fautomatically-switch-sound-output-device-to-bluetooth-headset-force-to-a2dp-pr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The first problem occurs because Pulse Audio unloads the bluetooth module after startup, so even if you put it in your startup script, it still gets unloaded a few seconds later.
Solution A
Just add a startup delay in your script, something like:
sleep 10 && pactl load-module module-bluetooth-discover
Solution B (recommended)
- Disable the bluetooth/Pulse Audio plugin.
- Right click your bluetooth icon, select Plugins, then uncheck the Pulse Audio plugin.
- Restart.
Sorry, but I don't have a solution for your remaining two issues.
add a comment |
The first problem occurs because Pulse Audio unloads the bluetooth module after startup, so even if you put it in your startup script, it still gets unloaded a few seconds later.
Solution A
Just add a startup delay in your script, something like:
sleep 10 && pactl load-module module-bluetooth-discover
Solution B (recommended)
- Disable the bluetooth/Pulse Audio plugin.
- Right click your bluetooth icon, select Plugins, then uncheck the Pulse Audio plugin.
- Restart.
Sorry, but I don't have a solution for your remaining two issues.
add a comment |
The first problem occurs because Pulse Audio unloads the bluetooth module after startup, so even if you put it in your startup script, it still gets unloaded a few seconds later.
Solution A
Just add a startup delay in your script, something like:
sleep 10 && pactl load-module module-bluetooth-discover
Solution B (recommended)
- Disable the bluetooth/Pulse Audio plugin.
- Right click your bluetooth icon, select Plugins, then uncheck the Pulse Audio plugin.
- Restart.
Sorry, but I don't have a solution for your remaining two issues.
The first problem occurs because Pulse Audio unloads the bluetooth module after startup, so even if you put it in your startup script, it still gets unloaded a few seconds later.
Solution A
Just add a startup delay in your script, something like:
sleep 10 && pactl load-module module-bluetooth-discover
Solution B (recommended)
- Disable the bluetooth/Pulse Audio plugin.
- Right click your bluetooth icon, select Plugins, then uncheck the Pulse Audio plugin.
- Restart.
Sorry, but I don't have a solution for your remaining two issues.
edited Jun 2 '17 at 9:35
nalzok
74116
74116
answered Feb 8 '16 at 4:49
Mtl DevMtl Dev
2491314
2491314
add a comment |
add a comment |
Re #3, my solution is this:
- Add a unified device (simultaneous output to all devices) that merges all others
- Use that as the default output device
- Keep all other physical outputs muted except the BT headset
The benefit is that all programs can send output to that regardless of whether the BT headset is connected or not. Then, once the headset connects, it starts receiving the sound.
If you do that then you should also set flat-volumes = no
to /etc/pulse/daemon.conf
and only control the unified output with your volume control keys.
add a comment |
Re #3, my solution is this:
- Add a unified device (simultaneous output to all devices) that merges all others
- Use that as the default output device
- Keep all other physical outputs muted except the BT headset
The benefit is that all programs can send output to that regardless of whether the BT headset is connected or not. Then, once the headset connects, it starts receiving the sound.
If you do that then you should also set flat-volumes = no
to /etc/pulse/daemon.conf
and only control the unified output with your volume control keys.
add a comment |
Re #3, my solution is this:
- Add a unified device (simultaneous output to all devices) that merges all others
- Use that as the default output device
- Keep all other physical outputs muted except the BT headset
The benefit is that all programs can send output to that regardless of whether the BT headset is connected or not. Then, once the headset connects, it starts receiving the sound.
If you do that then you should also set flat-volumes = no
to /etc/pulse/daemon.conf
and only control the unified output with your volume control keys.
Re #3, my solution is this:
- Add a unified device (simultaneous output to all devices) that merges all others
- Use that as the default output device
- Keep all other physical outputs muted except the BT headset
The benefit is that all programs can send output to that regardless of whether the BT headset is connected or not. Then, once the headset connects, it starts receiving the sound.
If you do that then you should also set flat-volumes = no
to /etc/pulse/daemon.conf
and only control the unified output with your volume control keys.
answered Dec 16 '18 at 20:16
V13V13
2,809613
2,809613
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f186830%2fautomatically-switch-sound-output-device-to-bluetooth-headset-force-to-a2dp-pr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think the solution is something with
udev
, but im not sure how it should be done.– hschou
Jun 2 '17 at 9:29