Bug 1164412 - Cannot get "High Fidelity" / A2DP mode to stick as default (+ other nuances) - Seeming culprit to my inexperienced eye: /etc/gdm/Xsession[1865]: (cinnamon-settings-daemon:14167): media-keys-plugin-WARNING **: Unable to get default sink
Summary: Cannot get "High Fidelity" / A2DP mode to stick as default (+ other nuances) ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: bluez
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Don Zickus
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-15 01:50 UTC by Hef
Modified: 2015-12-02 16:31 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 04:59:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
'pacmd list cards' of working A2DP connection of headphones (28.80 KB, text/plain)
2014-11-15 01:50 UTC, Hef
no flags Details

Description Hef 2014-11-15 01:50:03 UTC
Created attachment 957750 [details]
'pacmd list cards' of working A2DP connection of headphones

Description of problem:
Using Jabra Revo (bluetooth) Wireless Headphones, I cannot get the "High Fidelity" / A2DP mode to stick as the default.  Actually, the it seems like the cinnamon-settings-daemon is making it where my headset will not even connect by default!  Basically, when I start from a clean slate (steps following), the headset will connect and will reconnect fine, as long as I don't start up the cinnamon-settings-daemon - Once I do, my headset will not connect until I manually select it each time from then on out.

Steps I'm using to get to a clean slate:
* rm -rf ~/.pulse; rm -rf ~/.config/pulse
* sudo systemctl restart bluetooth
* pulseaudio -k (and make sure it respawns)

When I try to connect/reconnect my headset, the following are the defaults in the files under ~/.config/pulse/*default-[sink|source] files:

***********************************************************
* Clean slate:
***********************************************************
17:31:38 [richard.hefner@RichardHefT440 ~/.config/pulse] # cat 895c007c7a794915a98c4b505f7a1781-default-s*
alsa_output.pci-0000_00_1b.0.analog-stereo
alsa_input.pci-0000_00_1b.0.analog-stereo

And I see the following in the logs:
/etc/gdm/Xsession[1865]: (cinnamon-settings-daemon:14167): media-keys-plugin-WARNING **: Unable to get default sink

--- Before powering on my headset, I need to also do a 'power on' in 'bluetoothctl'..?

***********************************************************
* Initial connection of bluetooth headset:
***********************************************************
17:35:50 [richard.hefner@RichardHefT440 ~] # cat ~/.config/pulse/895c007c7a794915a98c4b505f7a1781-default-s*
bluez_sink.34_DF_2A_0C_F2_0D
bluez_source.34_DF_2A_0C_F2_0D

---snip---
kernel: input: 34:DF:2A:0C:F2:0D as /devices/virtual/input/input33
gdm-Xorg-:0[1341]: (II) config/udev: Adding input device 34:DF:2A:0C:F2:0D (/dev/input/event19)
gdm-Xorg-:0[1341]: (**) 34:DF:2A:0C:F2:0D: Applying InputClass "evdev keyboard catchall"
gdm-Xorg-:0[1341]: (**) 34:DF:2A:0C:F2:0D: Applying InputClass "system-keyboard"
gdm-Xorg-:0[1341]: (II) Using input driver 'evdev' for '34:DF:2A:0C:F2:0D'
gdm-Xorg-:0[1341]: (**) 34:DF:2A:0C:F2:0D: always reports core events
gdm-Xorg-:0[1341]: (**) evdev: 34:DF:2A:0C:F2:0D: Device: "/dev/input/event19"
gdm-Xorg-:0[1341]: (--) evdev: 34:DF:2A:0C:F2:0D: Vendor 0 Product 0
gdm-Xorg-:0[1341]: (--) evdev: 34:DF:2A:0C:F2:0D: Found keys
gdm-Xorg-:0[1341]: (II) evdev: 34:DF:2A:0C:F2:0D: Configuring as keyboard
gdm-Xorg-:0[1341]: (**) Option "config_info" "udev:/sys/devices/virtual/input/input33/event19"
gdm-Xorg-:0[1341]: (II) XINPUT: Adding extended input device "34:DF:2A:0C:F2:0D" (type: KEYBOARD, id 17)
gdm-Xorg-:0[1341]: (**) Option "xkb_rules" "evdev"
gdm-Xorg-:0[1341]: (**) Option "xkb_model" "pc104"
gdm-Xorg-:0[1341]: (**) Option "xkb_layout" "us"
---snip---

The only thing here is that the headset is not in A2DP mode and it sounds terrible.  

***********************************************************
* Disconnect:
***********************************************************
17:36:59 [richard.hefner@RichardHefT440 ~] # cat ~/.config/pulse/895c007c7a794915a98c4b505f7a1781-default-s*
alsa_output.pci-0000_00_1b.0.analog-stereo
alsa_input.pci-0000_00_1b.0.analog-stereo

---snip---
/etc/gdm/Xsession[1865]: (cinnamon-settings-daemon:14167): media-keys-plugin-WARNING **: Unable to get default sink
gdm-Xorg-:0[1341]: (II) config/udev: removing device 34:DF:2A:0C:F2:0D
gdm-Xorg-:0[1341]: (II) evdev: 34:DF:2A:0C:F2:0D: Close
gdm-Xorg-:0[1341]: (II) UnloadModule: "evdev"
---snip---

***********************************************************
* Reconnect:
***********************************************************
17:36:59 [richard.hefner@RichardHefT440 ~] # cat ~/.config/pulse/895c007c7a794915a98c4b505f7a1781-default-s*
bluez_sink.34_DF_2A_0C_F2_0D
bluez_source.34_DF_2A_0C_F2_0D

---snip---
/etc/gdm/Xsession[1865]: (cinnamon-settings-daemon:14167): media-keys-plugin-WARNING **: Unable to get default sink
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: input: 34:DF:2A:0C:F2:0D as /devices/virtual/input/input35
gdm-Xorg-:0[1341]: (II) config/udev: Adding input device 34:DF:2A:0C:F2:0D (/dev/input/event19)
gdm-Xorg-:0[1341]: (**) 34:DF:2A:0C:F2:0D: Applying InputClass "evdev keyboard catchall"
gdm-Xorg-:0[1341]: (**) 34:DF:2A:0C:F2:0D: Applying InputClass "system-keyboard"
gdm-Xorg-:0[1341]: (II) Using input driver 'evdev' for '34:DF:2A:0C:F2:0D'
gdm-Xorg-:0[1341]: (**) 34:DF:2A:0C:F2:0D: always reports core events
gdm-Xorg-:0[1341]: (**) evdev: 34:DF:2A:0C:F2:0D: Device: "/dev/input/event19"
gdm-Xorg-:0[1341]: (--) evdev: 34:DF:2A:0C:F2:0D: Vendor 0 Product 0
gdm-Xorg-:0[1341]: (--) evdev: 34:DF:2A:0C:F2:0D: Found keys
gdm-Xorg-:0[1341]: (II) evdev: 34:DF:2A:0C:F2:0D: Configuring as keyboard
gdm-Xorg-:0[1341]: (**) Option "config_info" "udev:/sys/devices/virtual/input/input35/event19"
gdm-Xorg-:0[1341]: (II) XINPUT: Adding extended input device "34:DF:2A:0C:F2:0D" (type: KEYBOARD, id 17)
gdm-Xorg-:0[1341]: (**) Option "xkb_rules" "evdev"
gdm-Xorg-:0[1341]: (**) Option "xkb_model" "pc104"
gdm-Xorg-:0[1341]: (**) Option "xkb_layout" "us"
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 257
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 257
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 257
avahi-daemon[902]: Invalid legacy unicast query packet.
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
---snip---

#################################################################################

Up to this point, I can connect/reconnect my bluetooth headphones and at least SOMETHING will come out of them.  Once I go into the "Sound Settings" using cinnamon, then I cannot reconnect my headphones successfully.

***********************************************************
* Going into sound settings and selecting my headset
***********************************************************
---snip---
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 48
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 48
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 48
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
kernel: Bluetooth: hci0 SCO packet for unknown connection handle 0
---snip---

***********************************************************
* Then, once I select A2DP, the following pops up:
***********************************************************
/etc/gdm/Xsession[1865]: (cinnamon-settings-daemon:14167): media-keys-plugin-WARNING **: Unable to get default sink

And, monitoring the pulseaudio default-sink/default-source when I have A2DP enabled on my headset and I get the following:

---snip---
bluez_sink.34_DF_2A_0C_F2_0D
alsa_input.pci-0000_00_1b.0.analog-stereo
---snip---

When I disconnect/reconnect after this point, it stays as the following - No matter what I've done so far!

---snip---
17:43:04 [richard.hefner@RichardHefT440 ~] # cat ~/.config/pulse/895c007c7a794915a98c4b505f7a1781-default-s*
alsa_output.pci-0000_00_1b.0.analog-stereo
alsa_input.pci-0000_00_1b.0.analog-stereo
---snip---

So, I set these as default in /etc/pulseaudio/default.pa, but this seems to have no effect:

---snip---
set-default-sink bluez_sink.34_DF_2A_0C_F2_0D
set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo
---snip---

I didn't have an '/etc/bluetooth/audio.conf' file, but I made one with the following (not sure if this is even used):

---snip---
[General]
Disable=Socket
Disable=Headset
AutoConnect=true
HFP=false

[A2DP]
SBCSources=1
MPEG12Sources=0
---snip---

I loaded the 'module-switch-on-connect' module and disabled 'module-switch-on-port-available' .. I tried with both enabled, that didn't help.



Version-Release number of selected component (if applicable):

17:43:30 [richard.hefner@RichardHefT440 ~/.config/pulse] # rpm -qa | grep cinnamon-settings-daemon
cinnamon-settings-daemon-2.4.3-1.fc21.x86_64

How reproducible:

I can't get it to not reproduce, no matter what I do.  I'm wondering if this is just a configuration issue?  Maybe I'm missing something.

Steps to Reproduce:

See above 

Actual results:

Headset fails to connect in either the low audio quality mode or A2DP.. I have to manually select it each time, then it works until I disconnect and have to reconnect later on.

Expected results:

A2DP should automatically connect once the headset is powered on ... Actually, the headset should automatically switch upon connection but also default to A2DP.

Additional info:

Comment 1 Hef 2014-11-15 01:51:59 UTC
If any other information is needed, please do let me know.  Thanks!

Comment 2 leigh scott 2014-11-15 08:03:19 UTC
This is more likely to be a bluez or pulseaudio issue.

Comment 3 leigh scott 2014-11-15 08:18:54 UTC
(In reply to leigh scott from comment #2)
> This is more likely to be a bluez or pulseaudio issue.

looking at this it's more likely to be pulseaudio at fault.

Comment 4 leigh scott 2014-11-15 08:20:55 UTC
(In reply to leigh scott from comment #3)
> (In reply to leigh scott from comment #2)
> > This is more likely to be a bluez or pulseaudio issue.
> 
> looking at this it's more likely to be pulseaudio at fault.

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1160701

Comment 5 leigh scott 2014-11-15 10:02:47 UTC
Can you file an upstream report against cinnamon-settings-daemon please? (I have no bluetooth hardware to test with).

https://github.com/linuxmint/cinnamon-settings-daemon/issues

After digging deeper I found these gnome bug reports

https://bugzilla.gnome.org/show_bug.cgi?id=645756#c3

https://bugzilla.gnome.org/show_bug.cgi?id=735777

which resulted in this commit

https://git.gnome.org/browse/gnome-settings-daemon/commit/?id=2f6f42f1e1283b5bf61613368f54f1fd84806e94

Comment 6 Hef 2014-11-17 17:35:02 UTC
Just filed an upstream report here:  https://github.com/linuxmint/cinnamon-settings-daemon/issues/69

Thanks for looking into this!

Comment 7 Hef 2014-11-20 19:41:40 UTC
For the time being, I just created a daemon/script to poll /sys/class/bluetooth for the bluetooth headphones and use 'pacmd set-card-profile [..] a2dp_sink' to switch it over, once connected. 

The only issue with the cinnamon sound applet was that it didn't reflect the device switch properly..  So, in /usr/share/cinnamon/applets/sound/applet.js:_readOutput, I added some code right before initially getting the default sink to set the default sink if the Jabra was found.  Seems to work ok as a band aid for now.

Comment 8 leigh scott 2015-06-11 06:59:01 UTC
Hi, 

Can you test blueman to see if it helps your audio issues, it will certainly make setup easier.

Comment 9 Fedora End Of Life 2015-11-04 11:29:53 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2015-12-02 04:59:59 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.