Page MenuHomePhabricator

ACPI power event don't work
Closed, ResolvedPublicBUG

Description

Hello!
Currently ACPI power management don't work in 1.2.0-LTS and 1.2.0-rolling+201903040337. For example, if I try to shutdown machine by ACPI signal just nothing happens.
With enabled ACPI debug I see the next messages in logs when machine receiving ACPI signal:

                                **** Context Switch from TID 4294967295 to TID 2357277952 ****
Mar 04 08:45:17 test-06 kernel:     evsci-0081 ev_sci_xrupt_handler  : ----Entry
Mar 04 08:45:17 test-06 kernel:    hwregs-0494 hw_register_read      : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004000 LastAddress 0000000000004001 Length 2  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000100 width 16 from 0000000000004000 (SystemIO)
Mar 04 08:45:17 test-06 kernel:    hwregs-0562 hw_register_read      : ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0494 hw_register_read      : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004002 LastAddress 0000000000004003 Length 2  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000320 width 16 from 0000000000004002 (SystemIO)
Mar 04 08:45:17 test-06 kernel:    hwregs-0562 hw_register_read      : ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:   evevent-0190 ev_fixed_event_detect : Fixed Event Block: Enable 00000320 Status 00000100
Mar 04 08:45:17 test-06 kernel:   hwxface-0221 write_bit_register    : ----Entry 00000003
Mar 04 08:45:17 test-06 kernel:    hwregs-0597 hw_register_write     : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004000 LastAddress 0000000000004001 Length 2  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0364 hw_write              : Wrote: 0000000000000100 width 16   to 0000000000004000 (SystemIO)
Mar 04 08:45:17 test-06 kernel:    hwregs-0696 hw_register_write     : ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:   hwxface-0287 write_bit_register    : BitReg 3, ParentReg 1, Value 00000001, Actual 00000100
Mar 04 08:45:17 test-06 kernel:   hwxface-0292 write_bit_register    : ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:       osl-1057 os_execute            : Scheduling function [00000000d78bfc70(000000007135a52c)] for deferred execution.
Mar 04 08:45:17 test-06 kernel:     evgpe-0633 ev_detect_gpe         : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004021 LastAddress 0000000000004021 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000005 width  8 from 0000000000004021 (SystemIO)
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004020 LastAddress 0000000000004020 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000000 width  8 from 0000000000004020 (SystemIO)
Mar 04 08:45:17 test-06 kernel:     evgpe-0674 ev_detect_gpe         : Read registers for GPE 00: Status=00, Enable=01, RunEnable=05, WakeEnable=00
Mar 04 08:45:17 test-06 kernel:     evgpe-0633 ev_detect_gpe         : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004021 LastAddress 0000000000004021 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000005 width  8 from 0000000000004021 (SystemIO)
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004020 LastAddress 0000000000004020 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000000 width  8 from 0000000000004020 (SystemIO)
Mar 04 08:45:17 test-06 kernel:     evgpe-0674 ev_detect_gpe         : Read registers for GPE 01: Status=00, Enable=00, RunEnable=05, WakeEnable=00
Mar 04 08:45:17 test-06 kernel:     evgpe-0633 ev_detect_gpe         : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004021 LastAddress 0000000000004021 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000005 width  8 from 0000000000004021 (SystemIO)
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004020 LastAddress 0000000000004020 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000000 width  8 from 0000000000004020 (SystemIO)
Mar 04 08:45:17 test-06 kernel:     evgpe-0674 ev_detect_gpe         : Read registers for GPE 02: Status=00, Enable=04, RunEnable=05, WakeEnable=00
Mar 04 08:45:17 test-06 kernel:     evgpe-0633 ev_detect_gpe         : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004021 LastAddress 0000000000004021 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000005 width  8 from 0000000000004021 (SystemIO)
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004020 LastAddress 0000000000004020 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000000 width  8 from 0000000000004020 (SystemIO)
Mar 04 08:45:17 test-06 kernel:     evgpe-0674 ev_detect_gpe         : Read registers for GPE 03: Status=00, Enable=00, RunEnable=05, WakeEnable=00
Mar 04 08:45:17 test-06 kernel:     evgpe-0633 ev_detect_gpe         : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004021 LastAddress 0000000000004021 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000005 width  8 from 0000000000004021 (SystemIO)
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004020 LastAddress 0000000000004020 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000000 width  8 from 0000000000004020 (SystemIO)
Mar 04 08:45:17 test-06 kernel:     evgpe-0674 ev_detect_gpe         : Read registers for GPE 04: Status=00, Enable=00, RunEnable=05, WakeEnable=00
Mar 04 08:45:17 test-06 kernel:     evgpe-0633 ev_detect_gpe         : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004021 LastAddress 0000000000004021 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000005 width  8 from 0000000000004021 (SystemIO)
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004020 LastAddress 0000000000004020 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000000 width  8 from 0000000000004020 (SystemIO)
Mar 04 08:45:17 test-06 kernel:     evgpe-0674 ev_detect_gpe         : Read registers for GPE 05: Status=00, Enable=00, RunEnable=05, WakeEnable=00
Mar 04 08:45:17 test-06 kernel:     evgpe-0633 ev_detect_gpe         : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004021 LastAddress 0000000000004021 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000005 width  8 from 0000000000004021 (SystemIO)
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004020 LastAddress 0000000000004020 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000000 width  8 from 0000000000004020 (SystemIO)
Mar 04 08:45:17 test-06 kernel:     evgpe-0674 ev_detect_gpe         : Read registers for GPE 06: Status=00, Enable=00, RunEnable=05, WakeEnable=00
Mar 04 08:45:17 test-06 kernel:     evgpe-0633 ev_detect_gpe         : ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004021 LastAddress 0000000000004021 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000005 width  8 from 0000000000004021 (SystemIO)
Mar 04 08:45:17 test-06 kernel:   hwvalid-0097 hw_validate_io_request: ----Entry
Mar 04 08:45:17 test-06 kernel:   hwvalid-0114 hw_validate_io_request: Address 0000000000004020 LastAddress 0000000000004020 Length 1  hwvalid-0128 hw_validate_io_request: ----Exit- AE_OK
Mar 04 08:45:17 test-06 kernel:    hwregs-0271 hw_read               : Read:  0000000000000000 width  8 from 0000000000004020 (SystemIO)
Mar 04 08:45:17 test-06 kernel:     evgpe-0674 ev_detect_gpe         : Read registers for GPE 07: Status=00, Enable=00, RunEnable=05, WakeEnable=00
Mar 04 08:45:17 test-06 kernel:     evsci-0105 ev_sci_xrupt_handler  : ----Exit- 0000000000000001

This cause a big problems in virtual environments, as VyOS can't handle stop commands from hypervisor. So, in best case VyOS just powering off after timeout without a correct shutdown.

To process ACPI events we need to include acpid package into the system and use event scripts from Debian (acpi-support-base, don't work without a lot of dependencies) or write our own.

Also, ACPI debug is not compiled which make debug harder. Maybe, adding CONFIG_ACPI_DEBUG=y to kernel configuration is not a very bad idea.

Details

Difficulty level
Normal (likely a few hours)
Version
1.2.0-rolling+201903040337
Why the issue appeared?
Other

Event Timeline

zsdc created this task.Mar 4 2019, 9:38 AM
pasik added a subscriber: pasik.Mar 12 2019, 5:18 PM
c-po claimed this task.Mar 22 2019, 7:58 AM
c-po added a project: VyOS 1.3 Equuleus.
c-po changed Why the issue appeared? from Will be filled on close to Other.
c-po triaged this task as Normal priority.
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.Mar 22 2019, 10:46 AM
c-po moved this task from Need Triage to VyOS 1.2.1 on the VyOS 1.2 Crux board.
c-po edited projects, added VyOS 1.2 Crux (VyOS 1.2.1); removed VyOS 1.2 Crux.
c-po moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.1) board.
c-po closed this task as Resolved.