elementary / switchboard-plug-bluetooth

Switchboard Bluetooth Plug
GNU General Public License v3.0
24 stars 11 forks source link

Bluetooth speaker connected by one user doesn't allow access with another user #177

Open ayoungethan opened 3 years ago

ayoungethan commented 3 years ago

What Happened

User A connects bluetooth speaker. User B then switches to their account. Speaker is still connected, but not accessible. User B disconnects bluetooth through any means (turning off bluetooth, turning off or re-pairing speaker). Bluetooth speaker audio is still inaccessible until either a. User A logs back in and disconnects from Bluetooth speaker or b. User A logs back in and changes audio output back to another source.

At this point, the speaker becomes available in Switchboard Audio as an output sink, but still will not play audio in User B's account.

Expected Behavior

When User B logs in, User B should either a. have access to already-connected audio devices or b. able to disconnect and reconnect to enable access via their account, without having to completely log out and log back in or restart the computer.

Steps to Reproduce

See above. This is a problem with multi-user systems.

  1. User A connects to bluetooth audio device.
  2. User B tries to access same bluetooth audio device and cannot.
  3. User B tries to disconnect and reconnect, and still cannot access bluetooth audio for that device.
  4. This hasn't been tested with different devices for User A and User B. Testing for this would help determine the level of the issue.

Logs

dmesg is spammed with:

snd_hda_intel 0000:06:00.1: spurious response 0x0:0x0, last cmd=0x620000 snd_hda_intel 0000:06:00.1: spurious response 0x0:0x0, last cmd=0x620000 Bluetooth: hci0: urb 000000004e1c6efe submission failed (90) Bluetooth: hci0: sending frame failed (-90) Bluetooth: hci0: SCO packet for unknown connection handle 0

Platform Information

Latest release: elementary OS 5.1.7 Hera AMD Ryzen 7 PRO 4750G with Radeon Graphics, Gigabyte Aorus Pro B550i motherboard with Intel AX200 wifi/bluetooth

ayoungethan commented 3 years ago

In my system, I have one administrative user and one user with non-administrative privileges. When the non-administrative user "grabs" the bluetooth connection first, the administrative user cannot access bluetooth audio. I can only reclaim connection to bluetooth by logging out the account that grabbed the bluetooth connection first.

ayoungethan commented 2 years ago

This bug is still relevant in 6.1 -- Second user to log in does not have permission to access bluetooth devices.

I'm hypothesizing (I don't really have evidence) that this is impacted by the same policies that rightfully do not allow one user access to another USB storage device that another user has mounted. That makes sense for disk drives, but access to bluetooth audio should be handled at a system level, treated like any other audio device, available to whatever account is currently active.