Manuel Reimer | 21 Dec 2010 22:10
Picon
Favicon

How to *disable* suspend/hibernate?

Hello,

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?

Thanks in advance

Yours

Manuel

Robby Workman | 23 Dec 2010 06:04

Re: How to *disable* suspend/hibernate?

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"/>
(Continue reading)


Gmane