system_powerdown only works once
Host environment
- Operating system: Debian
- OS/kernel version: Linux 6.1.2
- Architecture: x86_64
- QEMU flavor: qemu-system-x86_64
- QEMU version: 7.2.0
- QEMU command line: (sorry, not minimal...)
qemu-7.2.0/build/qemu-system-x86_64 -M pc,accel=kvm -m 12G -smp 7 -cpu host -L /firmware \
-nodefaults -nographic -vga none -display none \
-device vfio-pci-igd-lpc-bridge,addr=0x1f,multifunction=on \
-device vfio-pci,host=00:02.0,addr=02.0,x-vga=on,x-igd-gms=3 \
-device vfio-pci,host=00:1f.3,addr=0x1f.3 \
-device qemu-xhci \
-drive file=/disk/win.img,id=hda,format=raw \
-serial mon:stdio
Emulated/Virtualized environment
- Operating system: Windows 10 LTS
- OS/kernel version: ???
- Architecture: x86_64
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
- Boot a guest configured to sleep when it receives a power button event
-
system_powerdown
from the monitor to tell it to sleep -
info status
to verify that it is suspended - Wake the guest, either with
system_wakeup
or moving the mouse or something -
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.
Edited by Trammell Hudson