Systemd service to start bluetooth on laptop

I want to start bluetooth with my laptop (default is power off) on kde.
I have enabled it with systemctl enable.
If i start manually (systemctl start bt) it works.
But when I restart its not powering on the bluetooth.
Possibly its happening to early in the boot process? Or I need it to happen after login?

bt.service

[Unit]
Description=Bluetooth Power On
After=network.target bluetooth.service

[Service]
Type=oneshot
ExecStart=/usr/bin/bluetoothctl power on
ExecStart=/usr/bin/bluetoothctl discoverable on
ExecStart=/usr/bin/bluetoothctl pairable on
User=${USER}

[Install]
WantedBy=default.target

If the service is actually bt.service, compare that with bluetooth.service as it is specified in the unit file…

Now, what do you think is wrong with this?

Cheers.

1 Like

edit the /etc/bluetooth/main.conf - please see Bluetooth - ArchWiki

An alternative solution is to tell TLP (there is a nice gui tlpui) to remember the last state and restore is on startup. That is what i did.

Hi @gibbz,

You need to enable the service to haver it start at boot:

sudo systemctl enable bt

Hope this helps!

Looks like they tried something similar:

Missed that, my humble apologies to everyone involved.

1 Like