I am not going to commit this, well not yet. Maybe ask again in a year
or two.
This is a subtle debugging technique that has saved us a lot of time.
When these failures happen, it is best not to print a newline, and
thus cause a screen scroll. That hits deep code paths, and sometimes
has made a suspend/resume/hiberante bug impossible to find.
One day, when things suspend/resume is even better than now, this should
be applied.
I have commited the other bit.
>Index: acpi_machdep.c
>===================================================================
>RCS file: /cvs/src/sys/arch/amd64/amd64/acpi_machdep.c,v
>retrieving revision 1.63
>diff -u -p -r1.63 acpi_machdep.c
>--- acpi_machdep.c 19 Sep 2014 20:02:25 -0000 1.63
>+++ acpi_machdep.c 16 Oct 2014 03:25:29 -0000
>@@ -304,7 +304,7 @@ acpi_sleep_cpu(struct acpi_softc *sc, in
> #ifdef HIBERNATE
> if (state == ACPI_STATE_S4) {
> if (hibernate_suspend()) {
>- printf("%s: hibernate_suspend failed",
>+ printf("%s: hibernate_suspend failed\n",
> DEVNAME(sc));
> hibernate_free();
> return (ECANCELED);
>@@ -321,7 +321,7 @@ acpi_sleep_cpu(struct acpi_softc *sc, in
> boothowto &= ~RB_POWERDOWN;
>
> acpi_sleep_pm(sc, state);
>- printf("%s: acpi_sleep_pm failed", DEVNAME(sc));
>+ printf("%s: acpi_sleep_pm failed\n", DEVNAME(sc));
> return (ECANCELED);
> }
> /* Resume path */