Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Karmic - Can't DISable suspend or hibernate

  1. #11
    Join Date
    Mar 2008
    Location
    The Burning Earth.
    Beans
    3,660

    Re: Karmic - Can't DISable suspend or hibernate

    Ubuntu Tweak has a check box to disable both. http://ubuntu-tweak.com/

    It also has a number of useful settings that are a real pain to find normally.
    God does not play dice with the universe - Albert Einstein
    Sure I do, I just use loaded dice. - warfacegod

    An open forum. Its a free for all. Check us out. https://openlinuxforums.org/

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

    Re: Karmic - Can't DISable suspend or hibernate

    Quote Originally Posted by warfacegod View Post
    Ubuntu Tweak has a check box to disable both. http://ubuntu-tweak.com/

    It also has a number of useful settings that are a real pain to find normally.
    No offence, but I distrust those third-party scripts. God knows what harm they do to your system. I don't want my system to run on software from all kinds of shady third-party sources and PPA's, like those that Ubuntu Tweak facilitates...

    The few exceptions I make include only well known 3d party sources like Medibuntu and Opera. But as I said: no offence meant. Everybody makes his own decisions, and after all, it's *your* Linux.

  3. #13
    Join Date
    Mar 2008
    Location
    The Burning Earth.
    Beans
    3,660

    Re: Karmic - Can't DISable suspend or hibernate

    Quote Originally Posted by Pjotr123 View Post
    No offence, but I distrust those third-party scripts. God knows what harm they do to your system. I don't want my system to run on software from all kinds of shady third-party sources and PPA's, like those that Ubuntu Tweak facilitates...

    The few exceptions I make include only well known 3d party sources like Medibuntu and Opera. But as I said: no offence meant. Everybody makes his own decisions, and after all, it's *your* Linux.
    Ubuntu Tweak is hardly shady and it doesn't install anything except itself. You, yourself have the option of installing the software in it's sources list.

    Adobe Flash
    Audacity
    Banshee
    Cairo-dock
    Chromium Browser
    Compiz
    Dropbox

    To name a few. Apparently, these are shady? I believe all of them are available from Add/Remove, Synaptic, and/or Ubuntu Software Center.
    God does not play dice with the universe - Albert Einstein
    Sure I do, I just use loaded dice. - warfacegod

    An open forum. Its a free for all. Check us out. https://openlinuxforums.org/

  4. #14
    Join Date
    Feb 2010
    Location
    Utrecht, Netherlands
    Beans
    47
    Distro
    Ubuntu 8.04 Hardy Heron

    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>
    Thanks marshalium for the idea and Pjotr123 for the addition.
    Had been looking for this a bit

  5. #15
    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
    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.
    well, the fact that a 'logical impossibility' may be created, using two seemingly redundant options, should tell you that your interpretation of the options is probably wrong (this isn't microsoft we're talking about, after all )

    as it happens, your intuition is in this case wrong. active and inactive refer to active and inactive sessions, not to active and inactive hibernation.

    when intuition fails, the manual doesn't : http://manpages.ubuntu.com/manpages/.../polkit.8.html

    though setting inactive to 'yes' doesn't apparently hurt anything, according to this kde policykit tutorial, "it's a good idea to set inactive to 'no'":
    http://techbase.kde.org/Development/...t/Introduction

    i think that pretty much settles the issue, showing that marshallium's post does not need an amendment...

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

    Re: Karmic - Can't DISable suspend or hibernate

    Quote Originally Posted by nanotube View Post
    well, the fact that a 'logical impossibility' may be created, using two seemingly redundant options, should tell you that your interpretation of the options is probably wrong (this isn't microsoft we're talking about, after all )

    as it happens, your intuition is in this case wrong. active and inactive refer to active and inactive sessions, not to active and inactive hibernation.

    when intuition fails, the manual doesn't : http://manpages.ubuntu.com/manpages/.../polkit.8.html

    though setting inactive to 'yes' doesn't apparently hurt anything, according to this kde policykit tutorial, "it's a good idea to set inactive to 'no'":
    http://techbase.kde.org/Development/...t/Introduction

    i think that pretty much settles the issue, showing that marshallium's post does not need an amendment...
    You've convinced me... I rest my case.

  7. #17
    Join Date
    Aug 2008
    Beans
    16

    Re: Karmic - Can't DISable suspend or hibernate

    Hello everybody, my Ubuntu 10.04 can't suspend correctly (suspend = not responding), and I want to disable it.

    Quote Originally Posted by marshalium View Post
    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.
    Maybe this is a good tip, but I don't have config file org.freedesktop.devicekit.power.suspend to edit?

    Code:
    congminh1709@ubuntu:/usr/share/polkit-1/actions$ ls
    com.hp.hplip.policy
    com.ubuntu.devicedriver.policy
    com.ubuntu.systemservice.policy
    com.ubuntu-tweak.daemon.policy
    com.ubuntu.usbcreator.policy
    gdm.policy
    org.debian.apt.policy
    org.debian.aptxapianindex.policy
    org.freedesktop.consolekit.policy
    org.freedesktop.network-manager-settings.system.policy
    org.freedesktop.policykit.policy
    org.freedesktop.RealtimeKit1.policy
    org.freedesktop.SystemToolsBackends.policy
    org.freedesktop.udisks.policy
    org.freedesktop.upower.policy
    org.freedesktop.upower.qos.policy
    org.gnome.clockapplet.mechanism.policy
    org.gnome.cpufreqselector.policy
    org.gnome.gconf.defaults.policy
    screenresolution-mechanism.policy
    congminh1709@ubuntu:/usr/share/polkit-1/actions$
    So, when i run

    Code:
    sudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.power.policy
    It's just open a blank file

    I also tried Ubuntu Tweak, but it doesn't apply the changes for my system, and I can't disable the suspend function.

    Any solution for this case? Thanks.

    Update: I found this, org.freedesktop.devicekit.power.suspend has changed to org.freedesktop.upower.policy. So my new command is

    Code:
    sudo gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy
    After editing and relogin, it works well.
    Last edited by congminh1709; May 5th, 2010 at 05:46 AM.

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

    Re: Karmic - Can't DISable suspend or hibernate

    Quote Originally Posted by congminh1709 View Post
    Update: I found this, org.freedesktop.devicekit.power.suspend has changed to org.freedesktop.upower.policy. So my new command is

    Code:
    sudo gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy
    After editing and relogin, it works well.
    FYI, I believe the correct way to do this in 10.04 is to create a new config file in /etc/polkit-1/localauthority/50-local.d/

    Something like:
    Code:
    sudo gedit /etc/polkit-1/localauthority/50-local.d/disable-suspend.pkla
    And put the following in the file:

    Code:
    [Disable suspend]
    Identity=unix-user:*
    Action=org.freedesktop.upower.suspend;org.freedesktop.upower.hibernate
    ResultActive=no
    ResultAny=no

Page 2 of 2 FirstFirst 12

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
  •