Bug 214272

Summary: Power Management YaST module changes due to pm redesign
Product: [openSUSE] openSUSE 10.2 Reporter: Holger Macht <hmacht>
Component: YaST2Assignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Critical    
Priority: P5 - None    
Version: Alpha 5 plus   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Holger Macht 2006-10-22 15:07:31 UTC
The following changes need to be made to the YaST2 power management module to correspond to the new power management architecture (see also FATE 301180)

First window
============

Other Settings... (at the bottom)
---------------------------------

The dialog 'Battery Warning...' can be completely dropped

The dialog 'ACPI Settings...' can be completely dropped

Dialog 'Suspend Permissions':

 Beginning with 10.2, we will have a new location to store such
 permissions. Until now, it is stored somewhere below
 /etc/sysconfig/powersave. The new method uses PolicyKit to specify and
 request privileges. PolicyKit has its configuration below
 /etc/PolicyKit/privileges.d/. There you can find the following files
 which are relevant:

             hal-power-hibernate (suspend to disk)
             hal-power-suspend   (suspend to ram)
             hal-power-standby   (standby)

 [Note: We are pretty early with using PolicyKit as privilege manager, but
 more and more applications will use it in future, so maybe the YaST team
 needs a generic mechanism to change privileges in future, something like
 sysconfig editor is now, or a helper utility for PolicyKit configuration]

 A so called privilege descriptor looks as follows:

 --
 # This privilege specifies who is allowed to hibernate the system.

 [Privilege]
 RequiredPrivileges=
 SufficientPrivileges=desktop-console
 Allow=uid:root
 Deny=
 CanObtain=True
 CanGrant=True
 ObtainRequireRoot=False
 --

 The only thing you need actually to know is the line
 'SufficientPrivileges=desktop-console'. This means that any user which
 has the privilege desktop-console (aka is at a local console) possesses
 the specified privilege, in this case hal-power-hibernate. So to prevent
 a user to actually possess this privilege, the line has simply to be

   SufficientPrivileges=

 Root always possesses this privilege (Allow=uid:root).

Edit schemes --> edit a particular scheme:
------------------------------------------

 First window with Scheme name and description:
   - box labeled 'CPU' which contains CPU frequency scaling and throtting
     options can be removed

 Next window with 'Hard Disk' and 'Cooling Policy' options has to be kept
 for now.

So you see that the only things which remain are actually the Suspend
permissions, the harddisk settings and the Cooling policy. There might be
new things like entering a password for an encrypted swap partition in the
future, though, but there has to be more work to do in the base system at
first. All other settings which vanished are now configurable with a
client like gnome-power-manager or kpowersave. So to compensate this a
little bit, I thought about adding a text explaining these changes in the
first window. A text to say something like this:

  Beginning with openSUSE 10.2, a lot of configuration options have been
  removed from the Power Management YaST module. All vanished settings
  have to be configured with a graphical client such as
  gnome-power-manager or kpowersave.

Thanks very much in advance,
       Holger
Comment 1 Ladislav Slezák 2006-10-23 15:47:33 UTC
Implemented in yast2-power-management-2.14.0 (for beta1)