[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Issues resuming from hibernation



On Sunday, December 25, 2016 8:17:48 PM CET solitone wrote:
> This depends on the lid being open. If I close the lid, the laptop goes to
> suspend (thanks to KDE's settings) and stays there. In contrast, when I
> suspend from KDE's menu, it suspends but it wakes up immediately after.

BTW, this is not as it is supposed to work, is it? When the lid is open, and 
the system suspends/hibernates, the lid sends a wakeup signal as soon as the 
system has gone to sleep mode. This seems an odd behaviour. Perhaps it is the 
laptop firmware that misbehaves.

In any case, as a workaround I've put the following script in /lib/systemd/
system-sleep/

#!/bin/sh
#
# /lib/systemd/system-sleep/lid_wakeup_disable 
#
# Avoids that system wakes up immediately after suspend or hibernate
# with lid open (e.g. suspend/hibernate through KDE menu entry)
#
# Tested on MacBookPro12,1

case $1 in
  pre)
    if cat /proc/acpi/wakeup | grep -qE '^LID0.*enabled'; then
        echo LID0 > /proc/acpi/wakeup
    fi
    ;;
esac


Reply to: