can_suspend_to_{x}

Holger Macht hmacht at suse.de
Sat May 6 04:41:07 PDT 2006


On Fri 05. May - 21:16:37, Richard Hughes wrote:
> In the spirit of making everything consistent [1] I think the:
> 
>   power_management.can_suspend_to_disk
>   power_management.can_suspend_to_ram
> 
> keys should be:
> 
>   power_management.can_hibernate
>   power_management.can_suspend
> 
> As we already call the methods Suspend() and Hibernate() and I'm trying
> to make this a little more sane with all the power stuff for all the
> overlapping nomenclature. I'm sending similar emails to other projects
> as I want to make this as standardised as possible.

I don't think that they should be called Hibernate() and Suspend() in Hal
at all. The first time I looked at gpm and hal, I was completely impartial
in respect to any other OS, and thus, I had absolutely no idea what
Hibernate or Suspend does. I had to look up the code to get what
hibernating does. I really don't care about what the GUI shows to the user
in the end, that's up to the project/desktop to decide, it's a plain
useability issue. The Hal methods should exactly describe what they
actually do in a technical manner. So for me, it would also be ok to call
the HAL methods ACPISleep_S3/S4 or the like. But not Hibernate/Suspend. A
developer which writes a application which uses these methods knows the
technical meaning of suspend to disk, but he may not know what hibernating
does. The frontend can show whatever it likes.

> 
> I figure getting the same names so it all makes sense when we document
> it, is worth the short term pain of breaking (undocumented?) API.
> 
> What do you think?

In a technical discussion, I don't like Hibernate/Suspend for suspend to
disk/ram at all, because these are suitable inventions for the desktop
user, but not for a developer.

> 
> Richard.
> 
> [1] http://live.gnome.org/GnomePowerManager/SleepNames

Regards,
	Holger


More information about the hal mailing list