Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Karmic - Can't DISable suspend or hibernate

  1. #1
    Join Date
    Feb 2008
    Location
    Slough - UK
    Beans
    261
    Distro
    Ubuntu 10.04 Lucid Lynx

    Karmic - Can't DISable suspend or hibernate

    In Jaunty, and other previous releases, it was a simple exercise to disable suspend and hibernate, using the gnome configuration editor:

    apps -> gnome-power-manager -> general

    and unchecking can_hibernate and can_suspend options.

    The "Shutdown the computer" window then only has "Shutdown" and "Restart" as the available options.


    In Karmic, however, this doesn't work. Suspend and Hibernate are still options in the shutdown/restart window.

  2. #2
    Join Date
    Feb 2008
    Location
    Slough - UK
    Beans
    261
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Karmic - Can't DISable suspend or hibernate

    Any ideas?

  3. #3
    Join Date
    May 2006
    Beans
    10

    Re: Karmic - Can't DISable suspend or hibernate

    Yeah I'd like to disable suspend as well, as it does weird things to my system. I haven't been able to find a workaround.

    This bug is on Launchpad though. It's Confirmed and has Medium Importance, so let's hope a fix will come soon.

    https://bugs.launchpad.net/ubuntu/+s...er/+bug/432598

  4. #4
    Join Date
    Feb 2008
    Location
    Slough - UK
    Beans
    261
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Karmic - Can't DISable suspend or hibernate

    Thanks for the pointer Geert.

    I see that the bug is as yet not allocated.

  5. #5
    Join Date
    Jul 2009
    Beans
    850
    Distro
    Ubuntu Development Release

    Re: Karmic - Can't DISable suspend or hibernate

    i think gnome-power manager sucks big time. In my opinion, it need a complete overhaul. Heck, i switched to KDE to escape that thing! It doesn't even have profile support! All u desktop users dont care, but for all the laptops, its a pain in the butt.
    "Microsoft Windows: A collection of 32bit extensions and a graphical shell for a 16bit patch to an 8bit O.S. originally coded for a 4bit microprocessor written by a 2bit company who cant stand 1 bit of competition." Jargon File 4.4.7

  6. #6
    Join Date
    Oct 2008
    Beans
    27
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Karmic - Can't DISable suspend or hibernate

    I found a way to prevent the system from suspending and/or hibernating. The suspend/hibernate options still show up in the menu but if you click on one of them it just locks the screen.

    You just need to edit: /usr/share/polkit-1/actions/org.freedesktop.devicekit.power.policy

    And change the
    Code:
    <allow_active>yes</allow_active>
    entries for suspend and/or hibernate to
    Code:
    <allow_active>no</allow_active>
    So it should look something like this:
    Code:
     
      <action id="org.freedesktop.devicekit.power.suspend">
        <description>Suspend the system</description>
        <message>Authentication is required to suspend the system</message>
        <defaults>
          <allow_inactive>no</allow_inactive>
          <allow_active>no</allow_active>
        </defaults>
      </action>
    
      <action id="org.freedesktop.devicekit.power.hibernate">
        <description>Hibernate the system</description>
        <message>Authentication is required to hibernate the system</message>
        <defaults>
          <allow_inactive>no</allow_inactive>
          <allow_active>no</allow_active>
        </defaults>
      </action>
    Then you will probably need to restart your machine for the changes to take effect.

  7. #7
    Join Date
    Jan 2006
    Location
    Philadelphia
    Beans
    4,076
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Karmic - Can't DISable suspend or hibernate

    the above-mentioned workaround works for me on a fresh install of karmic.

    a little suboptimal, inasmuch as the hibernate option is still there even if 'disabled', but even so i'd rather have it lock the screen than freeze the comp, if i accidentally click on it.

    thanks marshallium for posting it.

  8. #8
    Join Date
    Jul 2006
    Location
    Castrum, Germania Secunda
    Beans
    1,071

    Re: Karmic - Can't DISable suspend or hibernate

    marshalium's tip is correct. Thank you.

    You can only change the text as root, so the terminal command is:
    Code:
    gksudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.power.policy
    --edited: removed a wrong assumption--
    Last edited by Pjotr123; February 7th, 2010 at 12:35 PM. Reason: I removed a wrong assumption.

  9. #9
    Join Date
    Jan 2006
    Location
    Philadelphia
    Beans
    4,076
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Karmic - Can't DISable suspend or hibernate

    Quote Originally Posted by Pjotr123 View Post
    marshalium's tip points in the right direction, but it's not entirely complete, I think.

    I think you should not only change this line from "yes" into "no":
    <allow_active>yes</allow_active>

    but also the line above, from "no" into "yes"!
    <allow_inactive>no</allow_inactive>
    hmm, i only changed allow_active from 'yes' to 'no' and everything worked...

    what in particular didn't work for you when you didn't set allow_inactive to yes?

  10. #10
    Join Date
    Jul 2006
    Location
    Castrum, Germania Secunda
    Beans
    1,071

    Re: Karmic - Can't DISable suspend or hibernate

    I only applied "my" version, which works fine on my machines....

    I'm not sure, but it seems logical to not only forbid "active", but also allow "inactive". The one implies the other. Otherwise you forbid hibernation to be *active*, and also to be *inactive*! A logical impossibility. That feels wrong.

    As I said, I'm not sure. I'm acting solely on my "Linux intuition", which may be quite wrong in this case, of course. However, "my" version works fine, so it's probably not wrong to edit the second line. Superfluous at most, but not wrong.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •