Audio stops after disconnecting Bluetooth headset

Asked by b00n

I am using an Intel NUC with internal WiFi/Bluetooth and Seiki TV as a monitor, Ubuntu 14.04 64-bit with all recent updates and no particular customizations. When I disconnect the Bluetooth headset, all audio stops working.

Reproduce-by:

 * Reboot and log in.
 * "System settings > Sound" shows "HDMI/DisplayPort built-in audio"
 * "Test Sound > Test (Front Left)" works
 * Power-on BT headset
 * Open terminal
 * Run "pulseaudio -kill"
 * Wait... "Headset MW600" appears in "System settings > Sound"
 * Select "Headset MW600"
 * "Test Sound > Test (Mono)" works
 * Power-off BT headset
 * [optional, does not change result] run "pulseaudio -kill"
 * Select "HDMI/DisplayPort built-in audio"
 * "Test Sound > Test (Front Left)" causes "System settings" to gray out a long time (e.g., a minute)
 * Sound is no longer working in any obvious way

Via https://help.ubuntu.com/community/SoundTroubleshootingProcedure I did

  wget -O alsa-info.sh http://www.alsa-project.org/alsa-info.sh && chmod +x ./alsa-info.sh && ./alsa-info.sh

It brings up a first screen "This script visits the following ... to collect diagnostic information ..." I clicked <OK> and it apparently just hangs. I can Ctrl-C it.

If I run 'top', pulseaudio is about 1% of CPU on an ongoing basis. This seems high to me.

The instructions here say "what you think should happen instead", which is: I should be able to power-off the BT headset and audio should keep working.

UPDATE: I found another problem and removed blueman (as in sudo apt-get remove blueman) and after doing that, it seems that the symptom above has gone away.

For my needs, I'd say this is "fixed", but it also seems undesirable to have situations where things go bad with a hang. If somebody thinks this is worth chasing, I can re-install blueman and run tests people suggest to help diagnose the problem.

EDIT: Jeremy (comment #2), as noted in my earlier update, the problem _occurs_ with blueman installed and goes away when blueman is removed.

EDIT: actionparsnip (comment #2): I filed bug 1451204.

Edit: Jeremy (comment #3): Oops, I did not notice the versions are different. Yes, I am by default using the trusty version 1.23-git201403102151-1ubuntu1 that you mention. I installed the utopic version from the site you mentioned. The behavior is different but not "all better". Following the scenario above:

 * Reboot and log in.
 * "System settings > Sound" shows "HDMI/DisplayPort built-in audio"
 * "Test Sound > Test (Front Left)" does NOT work. I tried clicking several times, nothing.
 * I plugged in a wired headset, switched to it and back to HDMI, and the 2nd (and subsequent) times I tried sound test on HDMI, it worked.
 * Power-on BT headset. The BT headset appears in System Settings > Sound even without running "pulseaudio --kill".
 * Open terminal and run "pulseaudio --kill" anyway, just to be semi-consistent with the first scenario.
 * Select "Headset MW600"
 * "Test Sound > Test (Mono)" does not work. I clicked several times and could see the "Test Sound" button going briefly a different color, but the test pane did not come up.
 * Switch to HDMI output and test; it worked.
 * Switch back to BT output and the 2nd time (and subsequent) it worked.
 * Power-off BT headset
 * BT headset icon remains in System Settings > Sound. Without this version of blueman, when I power-off the headset, the icon is removed.
 * Select HDMI output; test sound works fine.
 * Select BT output (with headset power off), Test Sound pane comes up stereo (headset is listead as HSP), running the test causes HDMI sound output.
 * Power on headset, still appears in System Settings > Sound
 * Test output brings up mono pane and output is to headset and sounds as expected.

Not part of the original question, but as an extra bonus symptom:

 * In System Settings > Sound, try changing BT headset to A2DP. It switches, but test sound brings up mono pane (and sounds mono).
 * Open blueman and select [Headset] > Audio Profile > A2DP
 * In System Settings > Sound, test sound brings up stereo pane, but clicking produces no audio out.
 * In System Settings > Sound, select [Headset] > Mode > HSP
* Test sound still brings up the stereo pane and produces no sound output.
 * Putting blueman back to HSP profile now leads to a mono pane and yes there is audio output.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu alsa-driver Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I suggest you report a bug

Revision history for this message
Jeremy (wa113y3s) said :
#2

Install blueman from http://packages.ubuntu.com/utopic/blueman and see if the issue is fixed

Revision history for this message
Jeremy (wa113y3s) said :
#3

But have you tried the Utopic version of blueman?

What version do you have

dpkg -l | grep blueman

The utopic version is blueman (1.23-git201406261335-deb-1ubuntu1) and trusty should be (1.23-git201403102151-1ubuntu1)

Revision history for this message
Dan Dascalescu (ddascalescu+launchpad) said :
#4

I have the same problem on Ubuntu 16.04.1 64-bit. DEL E7450 laptop, connected to an LG HBS900 headset.

1. Pair the headset
2. All Settings -> Sound, set the mode to High Fidelity Playback (A2DP Sink) (otherwise the sound is horrible)
3. Test, ensure "Front Left" and "Front Right" sound as they should.
4. Disconnect the headset via the Bluetooth indicator in the system tray.
5. Connect the headset to another device and play audio through it (I took a call).
6. Connect back the headset to the laptop.
7. Attempt to play audio, say in SMPlayer.

No audio comes through. SMPlayer doesn't advance the seek button.

8. Run `pulseaudio --kill`.
9. Reconnect the headset a bunch of times.
10. In All Settings -> Sound, try to set the mode to High Fidelity. Only the Headset mode worked, with mono sound.

After a couple more reconnections, I could finally get A2DP sound again.

However, the sound SKIPS randomly a couple times a minute. Playing the exact same MP3 with the exact same player (SMPlayer) on Kubuntu 16.04.1 doesn't reproduce this problem, despite presumably using the same Bluetooth stack.

Super frustrating.

Can you help with this problem?

Provide an answer of your own, or ask b00n for more information if necessary.

To post a message you must log in.