出于某种原因,我的机器出现暂停问题,具体来说,它在暂停后立即恢复。经过一些研究,我能够通过使用以下循环在 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)