On Tue, Oct 27, 2015 at 08:58:17AM +0200, David Weinehall wrote: > On Fri, Oct 23, 2015 at 12:39:31PM -0700, Jesse Barnes wrote: > > On 10/22/2015 01:35 PM, ville.syrjala@xxxxxxxxxxxxxxx wrote: > > > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > > > > > Do a dry run with rtcwake first to determine if the system even supports > > > the intended suspend state. If not, skip the test. > > > > > > Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3. > > > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > > --- > > > lib/igt_aux.c | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > > > > > diff --git a/lib/igt_aux.c b/lib/igt_aux.c > > > index 04ca25b..f3c76ae 100644 > > > --- a/lib/igt_aux.c > > > +++ b/lib/igt_aux.c > > > @@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void) > > > * seems to fare better. We need to investigate what's going on. */ > > > igt_skip_on_simulation(); > > > > > > + /* skip if system doesn't support suspend-to-mem */ > > > + igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0); > > > + > > > ret = system("rtcwake -s 30 -m mem"); > > > igt_assert_f(ret == 0, > > > "This failure means that something is wrong with the " > > > @@ -384,6 +387,9 @@ void igt_system_hibernate_autoresume(void) > > > * seems to fare better. We need to investigate what's going on. */ > > > igt_skip_on_simulation(); > > > > > > + /* skip if system doesn't support suspend-to-disk */ > > > + igt_skip_on(system("rtcwake -n -s 90 -m disk") != 0); > > > + > > > /* The timeout might need to be adjusted if hibernation takes too long > > > * or if we have to wait excessively long before resume > > > */ > > > > > > > Are there reliable alternatives to the rtcwake alarm? > > Maybe some AMT/MEI wakeup event or some ACPI clock thing (handwaving pretty hard here)? > > Depending on what the hardware supports, for hibernate to disk there's ipmi power-on. > > ipmi-power -h $hostname --stat will show the status of the machine, > ipmi-power -h $hostname --on will power it on. I would have expected to see IPMI only on server platforms. Has it become more widespread at some point? -- Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx