Disable bluetooth on boot

I want to have bluetooth disabled on boot, but still be able to turn it on after boot. However, after rebooting, GNOME’s bluetooth setting is reset. Things I’ve tried:

hardware.bluetooth.powerOnBoot = pkgs.lib.mkForce false;
environment.etc."bluetooth/main.conf".text = "Autoenable=false";```

Overwriting the main.conf file is pointless if you set powerOnBoot = false;.

But this only controls the bluez daemon and it’s entirely possible that something else is re-enabling bluetooth. I don’t use GNOME but are you sure there isn’t a setting there that is switching it back on?

On Ubuntu, I have to gsettings set org.blueman.plugins.powermanager auto-power-on false. Also if TLP may interfere with BL auto-start.

1 Like

Thanks man, TLP was the culprit! services.tlp.setting.DEVICES_TO_DISABLE_ON_STARTUP = "bluetooth"; fixes it and can still be enabled during runtime in GNOME settings.

1 Like