On Sun, Dec 07, 2014 at 06:05:16PM +0100, Alessandro DE LAURENZIS wrote: > Greetings, > > With OpenBSD 5.6 release, I finally have a pretty functional (and > usable) hibernation function (not on all my hardware, but at least for > a not-so-recent HP laptop it works!). >
Which machines don't work, and how do they break? I would like to know. Please file a bug report (man sendbug). Thanks. -ml > I was digging into my scripts in order to apply some quirks before > hibernating the machine, and noticed that the man page lacks some info. > > In particular, the code already support a specific file to be executed > before entering the S4 state (/etc/apm/hibernate), even if uses the same > file (/etc/apm/resume) after resuming from both S3 and S4 (if my > understanding is wrong, please correct me). > > So: > > 1) a proposed patch for the man page (as per the 5.6 code): > > --- ./usr.sbin/apmd/apmd.8 Thu Jul 24 03:04:58 2014 > +++ ./usr.sbin/apmd/apmd.8.patched Sun Dec 7 17:47:58 2014 > @@ -137,14 +137,15 @@ > in the requested state after running the configuration script and > flushing the buffer cache. > .Pp > -Actions can be configured for the following five transitions: > +Actions can be configured for the following six transitions: > suspend, > +hibernate, > standby, > resume, > powerup, > and > powerdown. > -The suspend and standby actions are run prior to > +The suspend, hibernate and standby actions are run prior to > .Nm > performing any other actions (such as disk syncs) and entering the new > state. > @@ -159,6 +160,7 @@ > Default device used to control the APM kernel driver. > .Pp > .It /etc/apm/suspend > +.It /etc/apm/hibernate > .It /etc/apm/standby > .It /etc/apm/resume > .It /etc/apm/powerup > @@ -169,6 +171,7 @@ > by examining the name by which it was called, > which is one of > suspend, > +hibernate, > standby, > resume, > powerup, > > 2) a question: why two different files for entering suspend/hibernate > states, but only one for resuming? At the moment, I do not apply any > quirks on resume, but having the possibility to differentiate b/w S3 and > S4 wake-up could be useful in some corner cases. > > Thanks in advance for your time. > > -- > Alessandro DE LAURENZIS > [mailto:just22....@gmail.com] > LinkedIn: http://it.linkedin.com/in/delaurenzis