2019-06-27 16:41:45 +03:00
|
|
|
#!/bin/sh
|
|
|
|
# This script goes to /usr/lib/systemd/system-sleep/
|
|
|
|
# Remember chmod a+x bluetooth-fix.sh
|
|
|
|
# It will soft block bluetooth and restore it while waking up
|
2019-06-27 16:48:19 +03:00
|
|
|
# This fixes the problem that prevents the computer to suspend while bluetooth
|
|
|
|
# is on.
|
|
|
|
# See: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1774994
|
|
|
|
#
|
2019-06-27 16:41:45 +03:00
|
|
|
case $1/$2 in
|
|
|
|
pre/*)
|
|
|
|
echo "Bluetooth fix: Going to $2..."
|
|
|
|
rfkill block bluetooth
|
|
|
|
;;
|
|
|
|
post/*)
|
|
|
|
echo "Bluetooth fix: Waking up from $2..."
|
|
|
|
rfkill unblock bluetooth
|
|
|
|
;;
|
|
|
|
esac
|