If my Bluetooth headset was connected to the laptop and is turned back on, it tries to reconnect to the laptop. Even if I have disconnected the headset before suspending the laptop. This wakes the laptop, but the resume then hangs.
I do not want to laptop to resume from suspend on Bluetooth connection attempts. Is there a way to do this?
If using KDE, the simplest way would be to click the Bluetooth icon in the panel and click the slider at the top to disable it, before putting the machine to sleep.
[Unit]
Description=Disable Bluetooth before going to sleep
Before=sleep.target
Before=suspend.target
Before=hybrid-sleep.target
Before=suspend-then-hibernate.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/bluetoothctl power off
ExecStop=/usr/bin/bluetoothctl power on
[Install]
WantedBy=sleep.target
WantedBy=suspend.target
WantedBy=hybrid-sleep.target
WantedBy=suspend-then-hibernate.target
Enable this service and check if Bluetooth devices disconnect when going to sleep, and whenever Bluetooth goes back up after waking up the system.