can_suspend_to_{x}

Richard Hughes hughsient at gmail.com
Sat May 6 01:44:41 PDT 2006


On Sat, 2006-05-06 at 10:28 +0200, Danny Kukawka wrote:
> On Friday 05 May 2006 22:16, 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
> 
> IMO no. The kernel interface in /sys/power/state provide standby, mem, disk 
> why should the related keys in HAL named other than they are currently? I 
> don't see a reason to change this. If you would name/translate your desktop 
> application you can do what name the methodes as you want/prefer.

Yes, but choosing names that one team/developer prefers makes this
totally non-uniform across different projects, which is bad for users.

> > 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. 
> 
> Why not also call this methodes SuspendToDisk() and SuspendToRAM(), which is 
> for me more clear than Hibernate/suspend.

Does it? What if the hibernate action is saving the data to a network
share in the case of a diskless workstation?
Also, having different names mean developers have to manually remember
the association between two forms of terminology.

> > I'm sending similar emails to other projects 
> > as I want to make this as standardised as possible.
> 
> Some comments to [1]:
> ......................................................................
> > I hope this page can convert some of the wacky/zany/confusing/crazy software 
> > out there to stick to common names.
> 
> Why should a project change the name of the translations? There are projects 
> which exist longer than hal/gpm and using s2ram/s2disk. Why should they 
> change the by their users well known names? I see no inducement to do this.

No, but 95% of the feedback to the mails I've sent has been *very*
positive. It seems other people think this need to be cleared up as
well.

> > Developing gnome-power-manager (and a chunk of the power management in HAL) 
> > gives me first-hand experience of the ways users, distros, packagers and 
> > developers can and do get this wrong.
> 
> Why do you think they do this wrong? For KDE e.g. IMO everybody know already 
> the terms s2ram/s2disk/standby from klaptop and kpowersave since a long time. 
> Why should this be wrong and why should they change this?

Okay, I asked my mum what the differences between s2ram, s2disk and
standby are. She's not a wizz on a computer, but she's certainly no
newbie...

...and she didn't have a clue.

I'm not saying I'm forcing people to change the names used in software,
I'm saying it makes sense to all use the same terminology.

> > Bad Nomenclature
> > - Sleep  
> > - Standby
> > - Suspend-to-RAM 
> 
> Btw. Standby is used under KDE related to standby from /sys/power/state. 

Cool, I'll add this as a note.

> ......................................................................
> 
> > 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.
> 
> No, this is not undocumented API. Take a look at the SPEC.

Okay, n/p - but changing key names has been done before and it's trivial
to add fallbacks in code that can't depend on newer versions of HAL.

Richard.



More information about the hal mailing list