You are not logged in.

#1 2018-04-17 22:48:18

vic-t
Member
Registered: 2016-12-11
Posts: 28

libvirt - ovmf without S4 support?

I'm running Win10 Pro as a guest on a current and updated Arch system with libvirtd 4.2.0 and Qemu 2.11.1. It all works fine but sometimes I would prefer to just hibernate Windows instead of shutting it down. Unfortunately, that's not possible.

Running powercfg -h on gives me the following error message:

C:\WINDOWS\system32>powercfg -h on
Hibernation failed with the following error: The request is not supported.

The following items are preventing hibernation on this system.
        The system firmware does not support hibernation.

From what I understand, the firmware, i.e. OVMF, needs to support the S4 state. That should be the case with OVMF so I'm not sure how to proceed. Could this be an OVMF bug or is something else entirely the issue?

Offline

#2 2018-04-18 07:23:02

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: libvirt - ovmf without S4 support?

From what I could find through a quick internet search, OVMF doesn't support S4. Where did you find that S4 is supported?

Offline

#3 2018-04-18 10:34:04

vic-t
Member
Registered: 2016-12-11
Posts: 28

Re: libvirt - ovmf without S4 support?

Clearly, you are right, I missed that. I guess I got confused by the official statement on linux-kvm.org where it says

S4 does not require any particular support from KVM or BIOS.

If hibernation doesn't work, I guess I could do with sleep (S3) which seems supported by OVMF according to https://www.redhat.com/archives/vfio-us … 00011.html. Unfortunately, however, that doesn't work for me either.

C:\WINDOWS\system32>powercfg /A
The following sleep states are not available on this system:
    Standby (S1)
        The system firmware does not support this standby state.

    Standby (S2)
        The system firmware does not support this standby state.

    Standby (S3)
        The system firmware does not support this standby state.

    Hibernate
        The system firmware does not support hibernation.

    Standby (S0 Low Power Idle)
        The system firmware does not support this standby state.

    Hybrid Sleep
        Standby (S3) is not available.
        Hibernation is not available.

    Fast Startup
        Hibernation is not available.

I believe everything is set up correctly on my end.  I'm using Spice with QXL graphics and disk and virtio-drivers for disk and network. I'm not doing any PCI passthrough.

The host system is set up for S3:

$ cat /sys/power/state 
freeze mem disk

Any idea where else to look?

Offline

#4 2018-04-18 21:24:00

lersek
Member
Registered: 2015-03-15
Posts: 38

Re: libvirt - ovmf without S4 support?

OVMF doesn't support S4. One issue that would be necessary to solve first is https://bugzilla.tianocore.org/show_bug.cgi?id=386 .

OVMF supports S3. For the OS to enter S3 suspend, in particular the video driver has to support S3 too. The QXL drivers do support S3.

What could be amiss is a piece of domain XML: https://libvirt.org/formatdomain.html#e … Management . If suspend-to-mem is not enabled, then QEMU might not advertize S3 in the ACPI payload that it generates and that OVMF installs for the OS. OVMF will also not do the necessary fw-level preparations.

I regularly test S3 in various guests, including various Windows versions.

Offline

#5 2018-04-18 22:58:40

vic-t
Member
Registered: 2016-12-11
Posts: 28

Re: libvirt - ovmf without S4 support?

Indeed, the standard XML generated by virt-manager has set suspend-to-mem to no. Now that I changed that, I can put Windows to sleep. Thanks a lot for the hint.

By the way, I just tried to put Windows 10 Pro to sleep five times in a row. It took about 30-60 seconds the first time. The next few times, I had to force off the machine after 5 minutes of not entering sleep state.

This is beyond the scope of my initial question but I'll still add here what I'm shown in the event viewer, lest someone feels like sharing his knowledge.

Error:
A timeout was reached (30000 milliseconds) while waiting for the QEMU-GA service to connect.

Information: 
The following boot-start or system-start driver(s) did not load: 
dam

Warning:
The driver \Driver\WudfRd failed to load for the device ROOT\WPD\0000.

Warning (Unlike the other messages, seems to have happened only once..): 
The application \Device\HarddiskVolume4\Program Files (x86)\SPICE Guest Tools\64\vdagent.exe with process id 3696 stopped the removal or ejection for the device PCI\VEN_1AF4&DEV_1003&SUBSYS_00031AF4&REV_00\3&13c0b0c5&1&38.

Offline

#6 2018-04-18 23:55:55

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: libvirt - ovmf without S4 support?

With a virtual machine you should be able to create a snapshot (e.g. virsh create-snapshot), which you can resume later.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB