graphic: 0.920 boot: 0.843 architecture: 0.758 device: 0.740 arm: 0.623 performance: 0.617 PID: 0.458 files: 0.410 ppc: 0.385 permissions: 0.380 semantic: 0.377 debug: 0.321 register: 0.275 socket: 0.264 TCG: 0.233 mistranslation: 0.168 vnc: 0.165 peripherals: 0.152 VMM: 0.151 kernel: 0.081 user-level: 0.070 i386: 0.041 network: 0.036 risc-v: 0.025 hypervisor: 0.021 KVM: 0.016 virtual: 0.012 assembly: 0.011 x86: 0.007 system_powerdown only works once Description of problem: When the guest is configured to sleep on power button events, something in the ACPI states are not restored coming out of resume. The first call to `system_powerdown` succeeds, but the second after waking the system is rejected in `acpi_pm1_evt_power_down()` since `ar->pm1.evt.en` is zero coming out of the resume path. There is probably something deeper (or perhaps in seabios?) since removing the test in that handler doesn't cause a second sleep either. Steps to reproduce: ![image](/uploads/60876bde4027c42699f2edf936bd874d/image.png) 1. Boot a guest configured to sleep when it receives a power button event 2. `system_powerdown` from the monitor to tell it to sleep 3. `info status` to verify that it is suspended 4. Wake the guest, either with `system_wakeup` or moving the mouse or something 5. `system_powerdown` has no effect Additional information: This is using qemu-7.2.0 built from source with a Windows 10 guest and IGD GPU+audio passthrough.