Don't offer Hibernate option if no swap

Bug #320208 reported by Michael Terry
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdm
Unknown
Medium
gdm (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gdm

If there's no swap partition, gdm shouldn't offer to hibernate, as it doesn't make sense.

There's an upstream bug with patch that hasn't been commented on. I'll attach a Jaunty debdiff here as well.

Related branches

Revision history for this message
Michael Terry (mterry) wrote :
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Hi Michael. Does this only hide the hibernate option from the GDM greeter? I haven't tried it, but my guess is that is probably the case. The problem is that the gnome-session dialog and FUSA will still offer hibernate even if there is no swap available, as they get the capabilities from HAL (and in turn - pm-utils).

I think this sort of thing should go in to pm-utils really

Changed in gdm:
status: Unknown → Invalid
Revision history for this message
Michael Terry (mterry) wrote :

This only handles the GDM greeter. As I mention in the upstream bug (which is now closed, since that hibernate menu is Ubuntu-specific apparently -- I didn't realize), there are better ways of handling it (via hal like you mention):

"(B) It would be nicer to use HAL to ask the system if it can hibernate. We
could check power_management.can_hibernate which tells us if hibernation
support is even compiled into the kernel. And we could iterate over the
volumes, checking the fstype of each for "swap" -- a cleaner way to check for
swaps."

Which should be done in both GDM, gnome-session, and FUSA.

This patch just does it for GDM, and in the 'easy' way.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Sebastien may you have a look to the patch? Thanks.

Changed in gdm:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.20.8-0ubuntu6

---------------
gdm (2.20.8-0ubuntu6) jaunty; urgency=low

  * debian/control.in:
    - don't depends on xbase-clients the depends workarounded an old xorg issue
    - don't recommends ubuntu-sounds since it is installed by default on ubuntu
      use a suggests and let other distribution install it or not (lp: #260558)
    - recommends alsa-utils rather than depends on it, only gdmplay it using it
      which is not something required to use the login screen (lp: #293075)
  * debian/gdm.init:
    - use w argument to match only the "text" word (lp: #294980)
  * debian/gdmplay:
    - update to fix quoting issue, Antonio Salazar suggested the change
      (lp: #281518)
  * debian/patches/11_powermanagement.patch:
    - "Don't offer hibernate option if no swap partitions exist.
       LP: #320208", thanks to Michael Terry who worked on the change

 -- Sebastien Bacher <email address hidden> Wed, 28 Jan 2009 13:53:48 +0100

Changed in gdm:
status: Confirmed → Fix Released
Michael Terry (mterry)
tags: added: oem-services
Changed in gdm:
importance: Unknown → Medium
status: Invalid → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.