I am having an issue with Fedora 38 Gnome and my Sony WH-1000XM4 headset.
Every time i reboot, the headset reconnects to Bluetooth, however, only Handsfree mode shows up in the Sound settings, so it gets stuck with HSP/HPF and sounds like crap.
If i turn off the headset and turn it back on, then it reconnects to Bluetooth and this time the Headset mode shows up and High Fidelity A2DP sink mode is correctly selected.
I’ve tried a whole bunch of low hanging fruit fixes, but nothing seems to help. Is this some kind of timing issue? Can anyone please help figure this one out?
I just need the Headset mode with High Fidelity A2DP sink to show up and work after reboot, so I don’t have to power off and on the headset after every reboot.
journalctl err entries:
Jul 16 00:21:04 laptop18 bluetoothd: profiles/audio/avdtp.c:avdtp_parse_rej() OPEN request rejected: Bad State (49)
Jul 16 00:21:50 laptop18 bluetoothd: src/profile.c:ext_io_disconnected() Unable to get io data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
Jul 16 00:22:16 laptop18 bluetoothd: profiles/audio/avdtp.c:avdtp_parse_rej() OPEN request rejected: Bad State (49)
Jul 16 00:22:41 laptop18 bluetoothd: src/profile.c:ext_io_disconnected() Unable to get io data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
Jul 16 00:22:55 laptop18 kernel: Bluetooth: hci0: SCO packet for unknown connection handle 257
One odd thing I noticed during testing is: if I log in really quickly. before Bluetooth connects at the login screen, then everything works correctly. But If Bluetooth connects as I am still at the login screen, then I have to power off and power on the headset. So it seems like the issue doesn’t happen if Bluetooth connects when I am actually logged into my account. Is this some kind of bug? Is there a way for me to delay the Bluetooth connection until after I log in?
Hello @maxts ,
I think if you check
/etc/bluetooth/main.conf for your configuration, you could set
DiscoverableTimeout = 0 so that the headset remains discoverable forever. Aside from that you could look at Bluez which controls the bluetooth interface to see what options you have at startup. If you know the service file systemd is calling for the bluetooth interface at startup, you could set it to need a target of user login before starting the bluetooth service. Though off the top of my head I am uncertain what that target is called.
Hello @jakfrost ,
Thank you for the suggestions. I tried looking into Bluez and using bluetoothctl, but not sure what exactly to do in the command mode there. I guess i’ll keep looking, but this seems like a bug of some sort, just not sure where to report it, as I don’t know if it’s a Bluez issue, or PipeWire issue, or WirePlumber issue. I’m a Linux newbie.
I was hoping the errors on the journal would be more of a hint as to where the problem is.
man bluetoothctl should give ample documentation or
I ended up working around this by doing the following:
in Gnome Settings → Sound
Select the Headset as the Output
Select the Config you would like:
High Fidelity Playback (A2DP Sink, codec AAC)
After doing this I used a terminal to do the following:
mine looked like
I then copied this file to
sudo cp ~/.local/state/wireplumber/default-profile /var/lib/gdm/.local/state/wireplumber/
After rebooting, this appears to be selecting the right profile.
Note, I also worked around this by adding this to my ~/.bash_profile but it seemed a bit clunky.
bluetoothctl disconnect 24:29:34:A5:A8:75
bluetoothctl connect 24:29:34:A5:A8:75
you can get the device information with
when it is connected.
Thank you for the tips. I’ll try it out and will report back!
Looks like diconnecting and reconnecting via the .zprofile did the trick! Exactly what I was looking for, even if it’s “a bit clunky”
PS: copying the default profile for wireplumber did not help, as the profiles don’t show up at all until disconnecting/reconnecting after login. Once disconnected and reconnected, the correct profile was being selected anyway.