Bluetooth disabled on KDE when I start the day

Try this:

A startup service with root privileges can start your BT connection automatically without any password required. The following is a simple system service I wrote to delay Bluetooth startup. Delaying your Bluetooth startup will hopefully remove any clashes that are preventing Bluetooth from initiating correctly.

The best way to ensure there is no Bluetooth conflicts at startup is to blacklist the btusb module.

To blacklist the btusb module, run this command:

echo 'blacklist btusb' | sudo tee /etc/modprobe.d/blacklist_btusb.conf

This will create an /etc/modprobe.d/blacklist_btusb.conf file which will prevent the bluetooth module from starting automatically. Even with Bluetooth blacklisted, your Bluetooth can still be started by alternate means. To do this automatically after a slight time delay, create the following restart bluetooth service:


Restart Bluetooth Service

With a text editor create:

/etc/systemd/system/restart-bt.service

Systemd service file contents:

#cat /etc/systemd/system/restart-bt.service
#systemctl enable restart-bt.service
#systemctl start restart-bt.service
#systemctl stop restart-bt.service
#systemctl disable restart-bt.service
#systemctl status restart-bt.service
#systemctl daemon-reload


[Unit]
Description=Restart Bluetooth Service
WantedBy=multi-user.target 
After=network.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/sleep 5
ExecStart=/usr/bin/modprobe btusb
ExecStop=-/usr/bin/systemctl restart bluetooth

[Install]
WantedBy=multi-user.target 

Save the newly created service file, then enable the service:

systemctl enable restart-bt.service

Then restart.

Bluetooth should now automatically be started after all your other drivers and network components have been loaded at startup.

If this service does not correct your issue, then you can disable this service and delete the /etc/modprobe.d/blacklist_btusb.conf blacklist file.


2 Likes