I have a Bluetooth speaker as a slave in a Master/Slave power strip with the main system as a Master.
This helps enormously with energy savings.
When the system wakes up, the service needs to restart with delay so the just powered on Bluetooth speaker can reconnect to the system.
One way to solve the problem is by creating an executable reconnect_to_bluetooth.sh at /lib/systemd/system-sleep:
#!/bin/sh
case $1/$2 in
pre/*)
echo "Other"
;;
post/*)
sleep 40 # Because Bluetooth speaker turns on in about 30 seconds
systemctl restart bluetooth-autoconnect.service
;;
esac
I have a Bluetooth speaker as a slave in a Master/Slave power strip with the main system as a Master. This helps enormously with energy savings. When the system wakes up, the service needs to restart with delay so the just powered on Bluetooth speaker can reconnect to the system. One way to solve the problem is by creating an executable
reconnect_to_bluetooth.sh
at/lib/systemd/system-sleep
: