From 04c59f410cce9bece57fb62e9f1afab44752b3bd Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 22 Dec 2019 15:56:41 +0100 Subject: [PATCH] sleep-script: bluetooth: Add note to disable bluetooth completely In some instances, bluetooth devices can prevent the device from going to sleep or cause spurious wake-ups. Add a note to the sleep script on how bluetooth can be turned off completely during suspend. --- root/lib/systemd/system-sleep/sleep | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/root/lib/systemd/system-sleep/sleep b/root/lib/systemd/system-sleep/sleep index 71effa692..23315fd5d 100644 --- a/root/lib/systemd/system-sleep/sleep +++ b/root/lib/systemd/system-sleep/sleep @@ -7,6 +7,11 @@ case $1 in bluetoothctl power off fi + ## Disable bluetooth regardless if devices are connected (see notes below) + #if ps cax | grep bluetoothd; then + # bluetoothctl power off + #fi + # handle wifi issues modprobe -r mwifiex_pcie; modprobe -r mwifiex; @@ -59,3 +64,9 @@ esac # experience any issues on suspend/resume, please file an appropriate issue or # join the discussion linked above so that we can fix it. As a temporary # workaround, you may want to uncomment the IPTS-related lines above. +# - For bluetooth: If you have spontaneous wakeups, you may want to disable +# bluetooth completely, regardless if any devices are connected or not, by +# removing the `! bluetoothctl info;` part as indicated in the comment (e.g. +# comment-out the original check and comment-in the one below). Note that you +# may be required to re-connect your devices after resume if you choose this +# change.