NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.4k stars 13.62k forks source link

Pulseaudio bluetooth audio device profile always set to the highest priority profile after reconnect #89410

Open Dehumanizer77 opened 4 years ago

Dehumanizer77 commented 4 years ago

Describe the bug When the audio profile is set to a bluetooth audio device through pactl, the audio profile is not automatically set when the device reconnects. E.g. I run "pactl set-card-profile 0 headset_head_unit", the profile is correctly set and working, until the device disconnects. Upon reconnect, the profile with the highest priority is set regardless of the last profile set to the device, in my case a2dp_sink_sbc. Sometimes it works the first time the device is connected/reconnected, but any further reconnect breaks it. Additionally, the automatic profile switching from A2DP to HSP/HFP when needed, which is supposed to work when module-bluetooth-policy is loaded with the parameter "auto_switch=2" doesn't work at all and the profile is always set to A2DP even when microphone is requested (e.g. Google Meet is started in a browser and trying to join a meeting).

This started to be an issue in NixOS 20.03, in 19.09 the audio profile was always retained and after device disconnected and connected again, the profile was set to the last one used before the device disconnected.

To Reproduce Steps to reproduce the behavior:

  1. Connect and pair the audio device
  2. Set the profile to anything other than highest priority profile using pactl set-card-profile
  3. Turn off the audio device
  4. Turn the audio device back on and wait until it connects
  5. Repeat steps 3-4
  6. Check the profile with pactl list cards - the active profile is again set to the highest priority profile instead of the last used one.

Expected behavior In the step 6., the profile should be set to the profile set in step 2.

Additional context I was testing it with Jabra Speak 510, both pulseaudio and bluetooth enabled without any special options (pulseaudio with just package = pkgs.pulseaudioFull; and extraModules = [ pkgs.pulseaudio-modules-bt ]; and bluetooth just enabled without any further options). With the exactly same configuration and NixOS 19.09 it works as expected, but doesn't with 20.03. I'm not really sure if it's fault of pulseaudio, bluetooth or something else.

Notify maintainers @lovek323

Metadata

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

Dehumanizer77 commented 3 years ago

The issue still persists in NixOS 20.09 I'd be really glad if it would be solved...

Dehumanizer77 commented 3 years ago

Really noone else does have the same problem?

joncol commented 1 year ago

Just started experiencing the same issue after recently updating. Did you find a solution for this, @Dehumanizer77?

Dehumanizer77 commented 1 year ago

No I didn't and we have replaced the boxes we used for google meet where we were experiencing this issue with google meet hardware so I then didn't investigate further :-( But it's a shame that this still hasn't been addressed apparently.

petermetz commented 7 months ago

Similar or exactly the same issue here:

  1. My galaxy buds 2 work fine for everything except Google Meet.
  2. I tried both Chrome and Firefox to rule out the problem of it being browser specific.
  3. If I close down the Google Meet tab in the browser and open a new one with YouTube, I immediately get sound working again. Once I open Google Meet back up, sound is gone.
  4. On the sound panel accessible from the KDE desktop tray I see the Galaxy Buds 2 option change to Handsfree (Galaxy Buds 2) when the sound breaks.