小编use*_*377的帖子

无法将 sleep hook 适配到 systemd

出于某种原因,我的机器出现暂停问题,具体来说,它在暂停后立即恢复。经过一些研究,我能够通过使用以下循环在 14.04 上解决这个问题,根据这个答案:https : //askubuntu.com/a/268172

#!/bin/bash
case $1 in
    hibernate)
            echo "Going to suspend to disk!"
            ;;
    suspend)
            echo "Fixing acpi settings."
            for usb in 'XHC' 'EHC1' 'EHC2';
            do
                    state=`cat /proc/acpi/wakeup | grep $usb | cut -f3 | cut -d' ' -f1 | tr -d '*'`
                    echo "device = $usb, state = $state"
                    if [ "$state" == "enabled" ]
                    then
                            echo $usb > /proc/acpi/wakeup
                    fi
            done
            echo "Suspending to RAM."
            ;;
    thaw)
            echo "Suspend to disk is now over!" …
Run Code Online (Sandbox Code Playgroud)

suspend wakeup systemd 15.04

5
推荐指数
1
解决办法
836
查看次数

标签 统计

15.04 ×1

suspend ×1

systemd ×1

wakeup ×1