Bug 71721 - ACPI shutdown no longer works in VirtualBox since kernel 3.12
Summary: ACPI shutdown no longer works in VirtualBox since kernel 3.12
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Off (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Lan Tianyu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-08 16:31 UTC by Richard Musil
Modified: 2014-05-12 01:26 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.12+
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
kernel 3.13.6 ACPI shutdown does not work (2.37 KB, application/octet-stream)
2014-03-08 16:31 UTC, Richard Musil
Details
kernel 3.11.10 ACPI shutdown does work (3.73 KB, text/plain)
2014-03-08 16:32 UTC, Richard Musil
Details
kernel 3.13.6 ACPI shutdown does not work (2.37 KB, text/plain)
2014-03-08 16:34 UTC, Richard Musil
Details
git bisect log (2.57 KB, text/plain)
2014-03-13 23:40 UTC, Richard Musil
Details
button.patch (453 bytes, patch)
2014-03-14 05:49 UTC, Lan Tianyu
Details | Diff
power button event handler (gentoo x64) (2.56 KB, text/plain)
2014-03-14 08:49 UTC, Richard Musil
Details

Description Richard Musil 2014-03-08 16:31:35 UTC
Created attachment 128601 [details]
kernel 3.13.6 ACPI shutdown does not work

I have been running gentoo x64 guest in Windows 7 x64 VirtualBox host for some time. There is an option to execute ACPI shutdown of the guest directly from VirtualBox console window menu.
Note: I am running vanilla kernel in gentoo (i.e. no gentoo patches).

This was working until kernel version 3.11 included (right now I am at 3.11.10, but it worked on all versions before). After upgrading to kernel 3.12 (and eventually 3.13) I noticed I can no longer ACPI shutdown the guest. It looks like the event is ignored. (I have tried with and without VirtualBox extensions, it does not matter).

I got ACPI traces from working kernel (3.11.10) and non-working kernel (3.13.6) which I include in the attachment.

As suggested by the trace it seems that in v3.13.6 GPE00 register is disabled. In v3.11.10 the same register in enabled. I tried to reenable GPE00 in v3.13.6 by:

echo "enable" > /sys/firmware/acpi/interrupts/gpe00

but while it shows the register GPE00 after this as "enabled" it does not help the shutdown to succeed.
Comment 1 Richard Musil 2014-03-08 16:32:24 UTC
Created attachment 128611 [details]
kernel 3.11.10 ACPI shutdown does work
Comment 2 Richard Musil 2014-03-08 16:34:20 UTC
Created attachment 128621 [details]
kernel 3.13.6 ACPI shutdown does not work
Comment 3 Lan Tianyu 2014-03-12 04:55:07 UTC
This seems a regression. Could you do a bisect between v3.11.10 and v3.13.6 to find out which commit cause this issue?
Comment 4 Richard Musil 2014-03-13 23:39:05 UTC
According to bisect output the first bad commit is:
[1696d9dc57e062ce5200f6a42a6aaada15b434bb] ACPI: Remove the old /proc/acpi/event interface

Full log from bisect is in the attachments.
Comment 5 Richard Musil 2014-03-13 23:40:09 UTC
Created attachment 129321 [details]
git bisect log
Comment 6 Lan Tianyu 2014-03-14 05:49:20 UTC
Created attachment 129361 [details]
button.patch

Please try this patch and attach the ACPI power button event file.  It's /etc/acpi1/events/powerbtn on my ubuntu machine.
Comment 7 Richard Musil 2014-03-14 08:49:00 UTC
@Lan Thanks for the patch. I applied it to v3.13.6 stable and it solves the issue, i.e. ACPI shutdown button works again.

I attache my powerbtn handler as well, but I guess it is no longer relevant. Also I am running pure server config, no X subsystem is present, so while the handler is quite convoluted, I guess only the last line applies in my case.
Comment 8 Richard Musil 2014-03-14 08:49:46 UTC
Created attachment 129371 [details]
power button event handler (gentoo x64)
Comment 9 Lan Tianyu 2014-03-15 13:50:41 UTC
Thanks for test. I will upstream the patch soon.
Comment 10 Lan Tianyu 2014-03-15 17:42:14 UTC
Patch has sent to ACPI maillist.
https://patchwork.kernel.org/patch/3838071/

Note You need to log in before you can comment on or make changes to this bug.