Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-17-2009, 11:34 AM   #1
Registered: Aug 2007
Posts: 36

Rep: Reputation: 4

Hi everyone.
I am having a little trouble. In order to save energy i need put a worksation (Suse 10.1) into hibernate mode. This work fine.

But now i want auto-ibernate after 30 min of idle.
googling i found a way to do with "who -a" (i don probe yet), but i put "watch who -a" and dont show the X session idle time, only ttys inactive time.

I someone have any clue, il appreciate.Regards
Old 10-17-2009, 11:46 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
Which desktop do you use. There usually is a powersave applet for that. A generic method could be to use an X screen saver which might be configurable for that. I'm not certain if the "DPMS" section of xorg.conf if just for the monitor, but if you have an external monitor you will want to read up on this section's options: "BlankTime", "StandbyTime", "SuspendTime" and "OffTime".

You may find this ACPI action script written for the thinkpad a useful guide:

So Google terms you can search for are Linux DPMS ACPI "action script".

Good Luck!

Last edited by jschiwal; 10-17-2009 at 11:49 AM.
Old 10-17-2009, 01:17 PM   #3
Registered: Aug 2007
Posts: 36

Original Poster
Rep: Reputation: 4
Thanks for the response, but is not exactly my need. i am looking get the same function that kpowersave but executing my own hibernate script. (that work fine for me).

Equally is an interesting point
Old 10-19-2009, 07:44 AM   #4
Registered: Aug 2007
Posts: 36

Original Poster
Rep: Reputation: 4
Thumbs up

This is the script that i am using. Write here if some of you need it can grabit

# discover video card's ID
ID=`lspci | grep VGA | awk '{ print $1 }' | sed -e 's@0000:@@' -e 's@:@/@'`

# securely create a temporary file
#TMP_FILE=`mktemp /var/tmp/video_state.XXXXXX`trap 'rm -f $TMP_FILE' 0 1 15
TMP_FILE=`mktemp /var/tmp/video_state.XXXXXX`
trap 'rm -f $TMP_FILE' 0 1 15

# switch to virtual terminal 1 to avoid graphics corruption in X
chvt 2

# dump current data from the video card to the temporary file
cat /proc/bus/pci/$ID > $TMP_FILE

# write all unwritten data (just in case)

# suspend
#echo -n mem > /sys/power/state
echo -n disk > /sys/power/state

# restore video card data from the temporary file on resume
cat $TMP_FILE > /proc/bus/pci/$ID

# switch back to virtual terminal 7 (running X)
#chvt 7

# remove temporary file
rm -f $TMP_FILE


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB pen drives not auto prompting or auto mounting on KDE3.5 (PCLOS) k.king Linux - General 1 03-17-2009 03:16 PM
Auto Hibernate/Suspend works, but computer restarts when resuming wild_oscar Linux - Software 2 02-02-2008 08:25 AM
cli hibernate works but gnome panel hibernate fails BCarey Linux - Desktop 1 06-08-2007 10:21 AM
Auto Hibernate Problems freddyfish Linux - Software 0 04-20-2006 08:54 AM
auto-completion - how does it work & can my script args auto-complete? BrianK Programming 1 06-11-2004 04:51 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration