Bluetooth reconnect on startup/waking up

Hey there,

I’m a relatively new user to KDE (only have some experience with ubuntu) and I recently decided to make the swich to this DE. I was wondering if it was possible to make my bluetooth headphones automatically reconnect when the pc starts up or when it wakes up from sleep mode. I have already set the device as trusted, but it doesn’t seem to want to reconnect.

Any switches to recommended packages for this would also be greatly appreciated as I’m just going with what I’m finding for things like bluetooth managers (in my case blueman)

Managed to make it work with a bash script in /usr/lib/systemd/system-sleep/

I put the following in (replace with the device address of the device)

#!/bin/bash

case "$1" in
  post)
    for i in {1..10}; do
      if bluetoothctl show >/dev/null 2>&1; then
        break
      fi
      sleep 1
    done
    bluetoothctl connect <address>
    ;;
esac

Upon getting out of suspend the script will check every second for ten seconds to see if bluetoothctl is up and if it is, connect to specific device address. After ten seconds, it gives up.

Let me know if I’m missing something that could go wrong with this, but otherwise my issue is resolved :slight_smile: