Bluetooth stopped working

I was using using my PS5 controller with F36. However recently it stopped paring. I thought it was the controller but then I realised my desktop cannot find any bluetooth devices (I tested with my phone, and the controller paired with my laptop, also Fedora, just fine). I have now upgraded to F37, but my problem has persisted. I’m not really sure how to debug this.

These are some of the things I have tried:

# lshw -short | grep -i blue
/0/100/2.1/0/0/5                        communication  AX200 Bluetooth
# lsusb  | grep -i blue
Bus 001 Device 003: ID 8087:0029 Intel Corp. AX200 Bluetooth
# bluetoothctl show
No default controller available
# bluetoothctl devices
No default controller available
# bluetoothctl info
Missing device address argument
# lsmod | grep -e bt -e blue
btusb                  65536  0
btrtl                  28672  1 btusb
btbcm                  24576  1 btusb
btintel                49152  1 btusb
btmtk                  16384  1 btusb
bluetooth             880640  15 btrtl,btmtk,btintel,btbcm,bnep,btusb
rfkill                 36864  9 iwlmvm,asus_wmi,bluetooth,cfg80211

Turning it on/off from the UI reflects correctly in the output of rfkill. Also I notice that there’s an error in the logs:

# journalctl --no-hostname -b -u bluetooth
Dec 11 22:32:54 systemd[1]: Starting bluetooth.service - Bluetooth service...
Dec 11 22:32:54 systemd[963]: ConfigurationDirectory 'bluetooth' already exists but the mode is different. (File system: 755 ConfigurationDirectoryMode: 555)
Dec 11 22:32:54 bluetoothd[963]: Bluetooth daemon 5.66
Dec 11 22:32:54 bluetoothd[963]: Starting SDP server
Dec 11 22:32:54 bluetoothd[963]: profiles/audio/vcp.c:vcp_init() D-Bus experimental not enabled
Dec 11 22:32:54 bluetoothd[963]: src/plugin.c:plugin_init() Failed to init vcp plugin
Dec 11 22:32:54 bluetoothd[963]: profiles/audio/mcp.c:mcp_init() D-Bus experimental not enabled
Dec 11 22:32:54 bluetoothd[963]: src/plugin.c:plugin_init() Failed to init mcp plugin
Dec 11 22:32:54 bluetoothd[963]: profiles/audio/bap.c:bap_init() D-Bus experimental not enabled
Dec 11 22:32:54 bluetoothd[963]: src/plugin.c:plugin_init() Failed to init bap plugin
Dec 11 22:32:54 bluetoothd[963]: Bluetooth management interface 1.22 initialized
Dec 11 22:32:54 systemd[1]: Started bluetooth.service - Bluetooth service.

Not sure what to make of this, I have searched the errors but did not find anything. I also noticed bt-adapter coredumps:

 $ bt-adapter -i
ERROR:lib/bluez/adapter.c:165:adapter_get_dbus_object_path: assertion failed: (ADAPTER_IS(self))
Bail out! ERROR:lib/bluez/adapter.c:165:adapter_get_dbus_object_path: assertion failed: (ADAPTER_IS(self))
Aborted (core dumped)

Any thoughts, pointers?

The only other relevant thread I found was this, but it is unresolved.

That tells you the file or directory is not writable. 755 → rwxr-xr-x & 555 → r-xr-xr-x.

What is the output of rfkill
What is the difference if you run sudo restorecon -r / and wait for it to finish then try again (just in case it is a change in selinux policies)

On my system I see

[root@eagle /]# ls -ld /etc/bluetooth/
drwxr-xr-x. 2 root root 4096 Nov 17 07:11 /etc/bluetooth/
[root@eagle /]# ls -ld /etc/bluetooth/*
-rw-r--r--. 1 root root 11118 Nov 17 07:11 /etc/bluetooth/main.conf

I noticed the permission error message, but couldn’t find out which directory it’s referring to. I checked /etc/bluetooth, but it looked normal.

# lt -d /etc/bluetooth/
drwxr-xr-x. 1 root root 18 Nov 17 14:11 /etc/bluetooth/
# lt /etc/bluetooth/
total 12K
-rw-r--r--. 1 root root 11K Nov 17 14:11 main.conf

rfkill shows the following. The blocked changes to unblocked when I turn on BT from the UI or using rfkill, but it never manages to detect a device.

$ rfkill 
 0 bluetooth hci0     blocked unblocked
 1 wlan      phy0   unblocked unblocked

I’ll report back with the results of restorecon.

No luck after restorecon either :frowning:

I also searched for other directories named bluetooth and checked permissions with
ls -ld $(find /usr -type d -name bluetooth 2>/dev/null )
ls -ld $(find /etc -type d -name bluetooth 2>/dev/null )
Doing the same starting at / was an extended wait but seemed to give the same results when it finally completed. This one did add /var/lib/bluetooth and one under the selinux tree.

Note that bluetooth devices do not remain in active scanning mode. It shows that the modules are loaded, and the device is configured. The UI turns on the scan in prep for connection or pairing so I am not 100% certain I understand when you say that it never manages to detect a device.

Are you saying that it scans but does not connect to an already paired device? That it scans but never sees another device that is also in pairing mode? That it never scans?

What are you expecting?
What are you trying to do?
What is the current bluetooth config?
Do you have a paired device it cannot connect to? If this is the case I sometimes have had to unpair from both devices then re-pair them.
Do you have a device that is not paired and has never been paired but the system cannot see it when it is placed in pairing mode?
Do you have a device that has previously been paired but is now not recognized? If this is the case then again you may need to wipe out the pairing info on (and for) the device then re-pair it.

No luck:

# find /usr -type d -name bluetooth -exec ls -ld \{\} \; | cut -d' ' -f1 | uniq 
# find /etc -type d -name bluetooth -exec ls -ld \{\} \; | cut -d' ' -f1 | uniq 

Regarding what I’m trying/expecting:

  • My controller was paired, but does not get detected any more
    • I have tried putting my controller in pairing mode, so that I can repair it, but that does not get detected either
  • I enable bluetooth on my phone to test so that I can pair, but it does not get detected
  • when I turn BT on, I also do not see any other devices (belonging to my flatmate, and neighbours)
  • all of the above works as expected on my laptop with exact same Fedora version and setup

Edit: the laptop does not have the core dump I get with bt-adapter -i


Here’s a comparison of what I see for the desktop (not working):

and the laptop (working as expected):

FYI, Upstream bug for the configuration directory permissions. systemd logs `ConfigurationDirectory 'bluetooth' already exists but the mode is different. (File system: 755 ConfigurationDirectoryMode: 555)` · Issue #414 · bluez/bluez · GitHub

You can override the service temporarily to see if it’s contributing to the issue:
systemctl edit bluetooth.service

### Anything between here and the comment below will become the new contents of the file


### Lines below this comment will be discarded

You can undo the override with systemctl revert bluetooth.service

This little bit seems to imply that something critical to bluetooth was corrupted during the upgrade and will need repaired. The error noted indicates the same since you found the permissions noted in that error seem to not exist.

You might need to first remove everything bluetooth related then reboot and do a new clean install of the same. At times that seems the only way to fix a ‘minor’ bit of corruption since even a reinstall does not do a checksum verify of the files.

I tried the above, no luck.

I also tried removing and reinstalling bluetooth related modules:

  • I created a list of packages from dnf remove blue\* --noautoremove
  • then executed the above command
  • then reinstalled everything using dnf install $(cat list)

I still get the crash with bt-adapter -i, and no devices are detected when I turn on BT from the UI.

Thanks for trying to help me. I’ll go to bed now, it’s very very late here. If you have any other ideas, I’ll debug further tomorrow.

PS: I put up the coredump from bt-adapter on fpaste in case it gives any ideas.

Because of an unrelated matter, I had to reflash my BIOS. After setting up everything, all Bluetooth devices are detected again! I guess for whatever reason something got corrupted, although can’t see how. I haven’t fiddled with the BIOS ever since I initially setup the computer.

Bios updates are provided because the manufacturer finds it is necessary. It seems you got hit by software updates that were incompatible with the older bios and the updated bios fixed that.

Yeah could be. I reflashed my BIOS for something else entirely though :stuck_out_tongue: . I upgraded my RAM to a higher frequency, but while choosing the new profile, I made a mistake and corrupted the BIOS. If I hadn’t messed up, never would have known.

I’m wondering what could I have done differently in my initial debugging that could indicate to the issue. Also, wouldn’t this still be a bug that needs to be fixed?

I have no clue how you would debug an issue related to bios other than trying a different identical machine with the updated bios and the same software. If the updated bios fixes the problem then the issue is bios related. If not then it would be OS related → probably kernel or drivers or firmware.

Is it still a bug if the updated bios fixed the issue? I would not consider it such. Instead I would consider that the bug was fixed because the bios update fixed the problem and the bug was thus related to out-of-date bios software.

Hmm, that’s true. I’ll document the details here then, just in case someone else encounters the issue.

My hardware:

$ inxi -M
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: TUF GAMING B550M-PLUS (WI-FI) v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 2806
    date: 10/27/2022
  • BIOS version with the problem: 2423
  • BIOS version with the fix: 2806 (shown above)