lkml.org 
[lkml]   [2020]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: How can a userspace program tell if the system supports the ACPI S4 state (Suspend-to-Disk)?
Date
> From: Pavel Machek <pavel@ucw.cz>
> Sent: Monday, December 21, 2020 11:08 AM
>
> On Sat 2020-12-12 01:20:30, Dexuan Cui wrote:
> > Hi all,
> > It looks like Linux can hibernate even if the system does not support the ACPI
> > S4 state, as long as the system can shut down, so "cat /sys/power/state"
> > always contains "disk", unless we specify the kernel parameter "nohibernate"
> > or we use LOCKDOWN_HIBERNATION.
> >
> > In some scenarios IMO it can still be useful if the userspace is able to detect
> > if the ACPI S4 state is supported or not, e.g. when a Linux guest runs on
> > Hyper-V, Hyper-V uses the virtual ACPI S4 state as an indicator of the proper
> > support of the tool stack on the host, i.e. the guest is discouraged from
> > trying hibernation if the state is not supported.
>
> Umm. Does not sound like exactly strong reason to me.

Hi Pavel,
Thanks for the reply. I realized that it may be better for me to add the code
to Hyper-V specific driver: https://lkml.org/lkml/2020/12/22/719

Let's see how it goes that way. :-)

Thanks,
Dexuan

\
 
 \ /
  Last update: 2020-12-23 22:05    [W:0.139 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site