Bug 77611

Summary: power buton wake from freeze asks to power-off machine
Product: Power Management Reporter: Len Brown (lenb)
Component: Hibernation/SuspendAssignee: Rafael J. Wysocki (rjw)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.15 Subsystem:
Regression: No Bisected commit-id:
Attachments: ACPI / button: Do not propagate wakeup-from-suspend events

Description Len Brown 2014-06-10 15:29:36 UTC
# echo freeze > /sys/power/state

use power button to wake system

result:

system wakes up
GUI (say, on Ubuntu 14.04) will ask if I want to reboot or poweroff

desired result:

system wakes up w/o asking about poweroff
Comment 1 Zhang Rui 2014-06-11 08:32:20 UTC
I think we can fix this in ACPI button driver to send a pm wakeup event only, i.e, do not send input and netlink event for a power button express during freeze mode, just like the trick we do in drivers/acpi/sleep.c for S3.
What do you think?
Comment 2 Rafael J. Wysocki 2014-07-18 21:27:56 UTC
Created attachment 143421 [details]
ACPI / button: Do not propagate wakeup-from-suspend events

This patch fixes the problem for me.
Comment 3 Len Brown 2015-07-22 01:13:33 UTC
in v3.17-rc1:

commit e71eeb2a6bcc6282b95215eb353a3ac9ce3e0de3
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Wed Jul 23 00:59:04 2014 +0200

    ACPI / button: Do not propagate wakeup-from-suspend events