[rhelv6-list] power saving (suspend) automatic setup

Gary Gatling gsgatlin at eos.ncsu.edu
Wed Feb 23 20:54:45 UTC 2011


Hello,

I am trying to automate a RHEL 6 install that will produce a machine that 
suspends to RAM after 600 seconds. (10 minutes of inactivity)

If I log into a freshly insatalled machine and run gnome-power-preferences, and then set "Put computer to sleep when inactive 
for :" 10 minutes and then log out, it seems the computer suspends to RAM 
as expected. (I know I've seen it do the right thing once at least)

If I set these gconf strings, the computer does not suspend to RAM. maybe 
gnome-power-preferences is doing other things besides setting gconf 
strings?

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type integer --set /apps/gnome-power-manager/timeout/sleep_computer_ac 600

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type integer --set /apps/gnome-power-manager/timeout/sleep_computer_battery 600

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type integer --set /apps/gnome-power-manager/timeout/sleep_computer_ups 600

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type integer --set /apps/gnome-power-manager/timeout/sleep_display_ac 600

gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /apps/gnome-power-manager/disks/spindown_enable_ac true

Has anyone figured out a automated way to install a machine and have it 
sleep after a certian amount of time automatically? Wanting to do this
to potentially save power costs in big computer labs. I am creating an rpm 
package to deliver the settings in a kickstart install.

I thought about having a cron job just run:

/usr/sbin/pm-suspend

every 15 minutes if no one is logged in. But that won't work very well if
someone is just logging in just as the machine runs the sleep cron. That 
might piss off some users and seem like a bug.

Also, do I need to set these settings as the "gdm" user rather than root?

I ask since gdm is running on X when no one is logged in.

Thanks for any ideas anyone has?

Gary Gatling     | ITECS Systems




More information about the rhelv6-list mailing list