How to *disable* suspend/hibernate?

Robby Workman rw at rlworkman.net
Wed Dec 22 21:04:48 PST 2010


On Tue, 21 Dec 2010 22:10:58 +0100
Manuel Reimer <Manuel.Spam at nurfuerspam.de> wrote:

> I want HAL to report suspend/hibernate to be *not* supported to get
> KDE remove the buttons for those "standby modes" from the K-Menu.
> 
> Just uninstalling pm-utils doesn't do the trick, as you don't check
> the return value or the error code of g_spawn_command_line_sync in
> your code:
> http://cgit.freedesktop.org/hal/plain/tools/hal-system-power-pm-is-supported.c
> 
> So I uninstalled pm-utils and symlinked between /bin/false and 
> /usr/bin/pm-is-supported which finally does the trick.
> 
> Is there a better/more friendly way to do this?


Well, HAL is unmaintained for the most part now, so I doubt you'll
get much of a response (but who knows?).

Since I happen to know that you're on Slackware (or similar), have
a look at /etc/dbus-1/system.d/hal.conf and find this section:

  <!-- Allow members of 'power' group to do power management stuff -->
  <policy group="power">
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.LightSensor"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.DockStation"/>
    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.Leds"/>
  </policy>


Now remove these two lines:

    <allow send_destination="org.freedesktop.Hal"
           send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>


I'm not *certain* that will work, but it might.  TIAS :)

-RW


More information about the hal mailing list