Bluetooth keeps turning on on its own

Idk what is causing this to happen. It doesn’t seem to be an issue with GNOME or KDE since the issue is happening on both.

If I turn off bluetooth, like with bluetoothctl power off or doing it through GNOME or KDE settings, it turns off. But then ~1min later it turns on again. I don’t know what is causing this. Also when bluetooth is on, pipewire and/or dbus has high CPU usage which makes the power usage very high on my laptop. This issue started happening in the past few weeks. It probably started after I updated NixOS, but I don’t know when exactly it started.

This is my config (the computer this is happening on is jinlon, I didn’t check if it’s happening on gaming-computer)

What are some things I should try to find out what is causing this?

❯ neofetch
          ▗▄▄▄       ▗▄▄▄▄    ▄▄▄▖            rajas@jinlon 
          ▜███▙       ▜███▙  ▟███▛            ------------ 
           ▜███▙       ▜███▙▟███▛             OS: NixOS 25.05.20250309.e3e32b6 (Warbler) x86_64 
            ▜███▙       ▜██████▛              Host: HP Jinlon 
     ▟█████████████████▙ ▜████▛     ▟▙        Kernel: 6.12.18 
    ▟███████████████████▙ ▜███▙    ▟██▙       Uptime: 4 days, 19 hours, 57 mins 
           ▄▄▄▄▖           ▜███▙  ▟███▛       Packages: 1770 (nix-system), 1538 (nix-user), 6 (flatpak) 
          ▟███▛             ▜██▛ ▟███▛        Shell: bash 5.2.37 
         ▟███▛               ▜▛ ▟███▛         Resolution: 1920x1280 
▟███████████▛                  ▟██████████▙   DE: Plasma 6.3.2 (Wayland) 
▜██████████▛                  ▟███████████▛   WM: kwin 
      ▟███▛ ▟▙               ▟███▛            Icons: breeze-dark [GTK2/3] 
     ▟███▛ ▟██▙             ▟███▛             Terminal: .konsole-wrappe 
    ▟███▛  ▜███▙           ▝▀▀▀▀              CPU: Intel i7-10610U (8) @ 4.900GHz 
    ▜██▛    ▜███▙ ▜██████████████████▛        GPU: Intel CometLake-U GT2 [UHD Graphics] 
     ▜▛     ▟████▙ ▜████████████████▛         Memory: 10096MiB / 15867MiB 
           ▟██████▙       ▜███▙
          ▟███▛▜███▙       ▜███▙                                      
         ▟███▛  ▜███▙       ▜███▙                                     
         ▝▀▀▀    ▀▀▀▀▘       ▀▀▀▘

The first thing would be to look at the logs: journalctl -b -u bluetooth -u dbus -u pipewire. Also, if it’s hardware-related, look at the kernel messages: sudo dmesg | grep -i blue.

journalctl -b -u bluetooth -u dbus -u pipewire

does not have any logs when bluetooth turns on by itself.
dmesg did not show anything either.

But I opened up the GNOME Logs app, and I found this:

 3:02:37 PM dockerd: e[33m2025-03-20 15:02:37.584 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth adapter hci0 [48:51:C5:88:95:AE] successfully turned back ONe[0m

so I suspect Docker was turning on the Bluetooth! I stopped and removed the Docker container so I will see if the problem goes away.

I’m pretty sure that solved the problem. It was the Home Asistant Docker container btw. I probably installed it to test out home assistant and then forgot about it.