On Thu, Jul 27, 2023 at 10:06:58AM +0000, Salil Mehta wrote:
Hello, We have been trying to verify the "system suspend/Restore" with vCPU Hotplug patches recently and found this functionality does not work on ARM64 with VMs even without our patches i.e. using latest kernel and qemu repository.
estuary:/$ cat /sys/power/mem_sleep [s2idle] estuary:/$ estuary:/$ cat /sys/power/state freeze mem disk estuary:/$ estuary:/$ estuary:/$ echo mem > /sys/power/state [ 60.458445] PM: suspend entry (s2idle) [ 60.458840] Filesystems sync: 0.000 seconds [ 60.459649] Freezing user space processes [ 60.461149] Freezing user space processes completed (elapsed 0.001 seconds) [ 60.461830] OOM killer disabled. [ 60.462144] Freezing remaining freezable tasks [ 60.463188] Freezing remaining freezable tasks completed (elapsed 0.000 seconds) [ 60.463920] printk: Suspending console(s) (use no_console_suspend to debug) (qemu) (qemu) sys system_powerdown system_reset system_wakeup (qemu) system_wakeup Error: wake-up from suspend is not supported by this guest (qemu)
Or using # systemctl suspend
What is the expected behavior or are we missing something?
What is the wakeup source in this experiment ? Is it enabled ? You must have done that before executing "echo mem > /sys/power/state". It is tested to generate the interrupt ?
Typically I use RTC on systems as I need not physical access to the platform to test that. $echo +20 > /sys/class/rtc/rtc0/wakealarm $ echo mem > /sys/power/state
Not sure if RTC is available on your system/VM. You just need to find a working wakeup source for your experiment.
Sorry if you have already tried that and seeing issues. You may have just missed to list it here. Thought I will check. The timer are also disabled during any system level sleeps and hence can't wake up without a valid working wakeup source unlike the normal CPU sleep/idle states.
Also make sure all the drivers have working suspend resume routines, sometimes the driver resume fails and if the console is not yet resumed at that point, you get no logs.
-- Regards, Sudeep