LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 08-16-2007, 06:07 AM   #1
adrianmariano
Member
 
Registered: Dec 2004
Distribution: Ubuntu Oneiric
Posts: 101

Rep: Reputation: 15
Power Management: how to do it?


I'm using a desktop (not a laptop) but I want some basic power management features: I would like the monitor to shut off after a period of idle. I would like the system to go into some kind of power saving state after a period of idle. And I would like to be able to temporarily override both of these settings in the case that I'm watching a DVD or such.

I'm using the FVWM2 window manager.

I found a HOWTO on shutting off the monitor using DPMS, but when I experimented with commands like

Code:
/usr/bin/xset dpms force off
I got erratic behavior. For a while only "standby" would turn off the monitor. Selecting "off" or "suspend" would cause the monitor to turn off for a moment and then turn back on. The HOWTO says this happens because you're running some conflicting program such as a screen saver, but I couldn't find such a program running. And then the behavior changed: now all three choices are turning the monitor off. What could explain this erratic behavior?

Regarding suspension of the system, it appears that hibernation works fine but less extreme power saving modes do not work properly. I tried s2ram but it says the machine is unknown and does nothing. I tried 'echo -n mem > /sys/power/state' and the system changed state (power light was blinking) but then I couldn't wake it up. How am I supposed to wake it up from this state? I tried 'echo -n standby > /sys/power/state' and the system went into a standby state but when it woke up the ps/2 mouse wouldn't work. I'm a little surprised: I would have thought that hibernation would be the trickiest one to get working.

But assuming that I can get these things working, suppose I want the monitor to shut off after Z minutes idle, the system to go into standby after X minutes of idle and hibernate after Y minutes of idle. I want to be able to disable this without rebooting X so I can watch a DVD. How can I do this?
 
Old 08-16-2007, 06:14 AM   #2
Okie
Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 950

Rep: Reputation: 30
Code:
!#/bin/bash

/bin/setterm -blank 15 -powersave powerdown -powerdown 30
this should get your monitor to go in to powersaving mode, not sure what to do about getting your harddrive to powerdown...
 
Old 08-17-2007, 07:58 AM   #3
adrianmariano
Member
 
Registered: Dec 2004
Distribution: Ubuntu Oneiric
Posts: 101

Original Poster
Rep: Reputation: 15
I checked the man page for setterm and noticed that it uses APM for its power management functions. But I have read that APM is old and obsolete and that I should be using ACPI. Does this mean setterm is obsolete?
 
Old 08-17-2007, 08:47 AM   #4
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 516

Rep: Reputation: 34
Which distro are you using?

Code:
Section "ServerFlags"
	Option 		"BlankTime" 		"10"
	Option 		"StandbyTime" 		"20"
	Option 		"SuspendTime" 		"30"
	Option 		"OffTime" 		"40"
EndSection
in the X configuration file worked for me. Haven't tried it a long time any more since the newer distros seem to have monitor blanking swithed on somehow. I believe it is done using the graphic card and not APM/ACPI.

Best,
Ott
 
Old 08-17-2007, 04:33 PM   #5
adrianmariano
Member
 
Registered: Dec 2004
Distribution: Ubuntu Oneiric
Posts: 101

Original Poster
Rep: Reputation: 15
Well, when I started testing the "off" setting and the "suspend" setting both caused the monitor to flash off briefly and then come back on. So just setting those times in the xorg.conf isn't the full answer. The other problem is that if I need to change it on the fly (e.g. to watch a dvd) then I have to restart X.

I'm using Debian Lenny but I usually use the fvwm window manager. I poked around in Gnome, which came installed, and it has a configuration option as part of the gnome-screensaver for screen blanking, though it only had two settings, and it put my system into a standby state from which I couldn't recover.

Perhaps the solution is to install a screen saver program of some sort? It appears, actually, that there are only three, xscreensaver, kscreensaver and gnome-screensaver.
 
Old 08-17-2007, 11:37 PM   #6
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 516

Rep: Reputation: 34
Hmm.... Which graphic card are you using? Well, this is completely foreign field for me...
Once at sarge I used xscreensaver, and that one worked well for me (sort of intel integrated graphics, do not remember more).

Suspend/hibernate: I regularily hibernate my etch desktop. What I did: In

/etc/acpi/events/powrbtn

I replaced the last line to point to the script

/etc/acpi/hibernate

The hibernate script should be better to use than direct suspending as it does a lot of good stuff like brings down (and later up) net, usb and so on. It works almost perfectly, the only issue is that gnome still thinks I am going to shut the computer down (and brings up corresponding dialog). But fvwm works fine.

Best,
Ott
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Management Kazul Linux - Newbie 1 10-12-2005 10:52 AM
Power Management UmneyDurak Fedora 0 09-22-2005 02:27 PM
Power Management poochdog Fedora 2 09-01-2005 08:29 AM
Enabling power save/power management/cpu freq scaling features for a Debian system zero79 Debian 0 12-19-2004 01:17 PM
Power Management(sysfs) /sys/power/state mavrick613 Linux - General 0 05-24-2004 03:04 PM


All times are GMT -5. The time now is 06:06 PM.

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