You are not logged in.

#1 2011-02-20 23:36:35

davidm
Member
Registered: 2009-04-25
Posts: 371

Auto suspend on idle without Gnome or KDE? [SOLVED]

This may be a stupid question but I've never had to actually mess with this before on a system without Gnome or KDE installed (they have their own utilities which tends to make this easy) and I've spent an hour researching to no avail.

I'm looking for a way to force the entire computer to automatically suspend to RAM after 30 minutes of no keyboard or mouse activity. I already have pm-utils and xscreensaver installed and 'pm-suspend' already works great when I call it manually but what I'm missing is a way to detect the idle and actually call 'pm-suspend' automatically.  I do have HAL and udev.  Of course it runs X too but there is no D.E. installed.  Only various Window managers.

BTW- this is for a Desktop not a laptop if that is significant for some reason.  The reason for it is basically I want this computer to suspend (to save power) at night and other times when it's not being used.

Thanks for any help you can give! smile

Last edited by davidm (2011-02-21 01:58:18)

Offline

#2 2011-02-20 23:44:56

davidm
Member
Registered: 2009-04-25
Posts: 371

Re: Auto suspend on idle without Gnome or KDE? [SOLVED]

Hmm.  Without fail right after posting I usually find the answer. smile

It would seem I can still use something like xfce4-power-manager still even though I am running a WM only.

Offline

#3 2011-02-21 01:10:53

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Auto suspend on idle without Gnome or KDE? [SOLVED]

Xautolock is another solution.

Scott

Offline

#4 2011-02-21 01:13:33

davidm
Member
Registered: 2009-04-25
Posts: 371

Re: Auto suspend on idle without Gnome or KDE? [SOLVED]

Still welcoming some help after all....

I've been attempting to use xfce4-power-manager but am having an issue where as a normal user actual power management options other than for the monitor are disabled.  It works fine as root but not as a normal user.

User is a member of the power group.
Have consolekit installed.
Launching WM from .xinitrc (No Display manager such as slim) using 'exec ck-launch-session /usr/local/bin/wm'

Anything I am missing for why this wouldn't work? 

Trying to use the debug option:

(xfce4-power-manager:2633): xfce4-power-manager-WARNING **: Unable to connect to session managet : Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
                                
(xfce4-power-manager:2633): xfce4-power-manager-WARNING **: could not map keysym 1008ffa8 to keycode
                                
                                
** (xfce4-power-manager:2633): WARNING **: No outputs have backlight property
** (xfce4-power-manager:2633): DEBUG: executed /usr/sbin/xfpm-power-backlight-helper --get-max-brightness; retval: 1024
** (xfce4-power-manager:2633): DEBUG: xfpm_brightness_setup_helper: get-max-brightness returned -1
** (xfce4-power-manager:2633): DEBUG: no brightness controls available

Last edited by davidm (2011-02-21 01:17:51)

Offline

#5 2011-02-21 01:24:01

davidm
Member
Registered: 2009-04-25
Posts: 371

Re: Auto suspend on idle without Gnome or KDE? [SOLVED]

firecat53 wrote:

Xautolock is another solution.

Scott

In looking at the man page it looks as if that will do the trick.  Perhaps a much simpler solution too.  Thank you, giving it a shot now!

UPDATE:

Works perfectly so far with a simple:

'xautolock -time 35 -locker "sudo pm-suspend" &'

Thanks again!

Last edited by davidm (2011-02-21 01:57:40)

Offline

Board footer

Powered by FluxBB