[haiku-commits] Re: haiku: hrev44323 - in src/add-ons/kernel/bus_managers/acpi/acpica: common include components/utilities components/resources components/hardware

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 13 Jul 2012 15:04:44 -0400

On Fri, Jul 13, 2012 at 4:53 AM, Fredrik Holmqvist
<fredrik.holmqvist@xxxxxxxxx> wrote:
>
> Perhaps some way of saving / restoring userland but doing normal
> reboot could work?

Honestly it is probably easier/better to just implement it properly.

This is something I am interested in as well, and I did a bit of
research into the topic a few weeks ago. There is a pretty decent
account of how Linux added support for it (and the associated issues):

http://www.advogato.org/article/913.html

As Ingo alludes driver support is a big part of it, and as the above
article indicates badly written drivers can cause issues. Of course
this may be the one case where Haiku's small set of mostly "in-house"
drivers will be an advantage.

I think the biggest problem with implementing this is debugging. Again
as the above article illustrates, if something goes wrong during the
resume, you pretty much have no way of seeing why, as the system will
be in an unknown state. Probably using a VM would help, but at some
point some extensive testing on real hardware will be necessary.

Also I have a huge pet peeve in other systems which have stupid power
management systems which don't check for certain things in userland
like a video playing or something being downloaded before shutting off
the screen or going to sleep. We already talked about this a few years
ago and there is even a ticket under my ownership about this:

https://dev.haiku-os.org/ticket/3056

Here is the mailing list post with my opinion of how it should work:

//www.freelists.org/post/haiku-development/Disable-screensaver,11

This is definitely an area where Haiku can be innovative and really do
things right. Of course I haven't exhaustively checked other systems
recently, maybe now they all do it right, though somehow I doubt it ;)

Either way the above won't be as relevant before we support sleep,
though the userland part could certainly be prototyped with the
screensaver.

-- 
Regards,
Ryan

Other related posts: