Bluetooth headset's reconnect resumes laptop

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?

Probably. Even likely.
Some system info would surely help …

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.

Archwiki - Bluetooth immediately waking up suspend-to-idle devices

you can disable Bluetooth completely before going to sleep - install bluez-utils and create this file:

/etc/systemd/system/bluetooth-disable-before-sleep.service
[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.

This does seem to solve my problem! Thanks a lot!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.