浏览代码

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.
Maximilian Luz 5 年之前
父节点
当前提交
04c59f410c
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      root/lib/systemd/system-sleep/sleep

+ 11 - 0
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.