You are not logged in.

#1 2012-06-06 03:29:27

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Linux and Power management (screensaver, sleep, hibernate, etc.)

Since my recent switch from XFCE to dwm, I've found myself becoming more familiar with a lower level of Linux, without all the convenient DE wrapping, and I ran into the issue of managing power management.  On the most basic level (e.g., a fresh install of Arch, using ttys only), what power management options are there, if any?  Screensaver, turning off the screen, sleep, hibernate, etc?

Also, how do desktop environment power management work?  Do they use the same backends for power management or do they have their own way of doing things?  If I use, say XFCE power management at the same time as the tty level power managers, what conflicts, if any, will arise?  For example, right now I'm using xfce4-power-manager, xscreensaver, pm-utils, laptop-mode-tools, and X DPMS, all of which control power policies.  Is there an order in which settings apply, or do I have to go and manually set everything's settings to the same values?

Last edited by darkfeline (2012-06-06 03:59:30)

Offline

#2 2012-06-06 04:48:29

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: Linux and Power management (screensaver, sleep, hibernate, etc.)

man setterm
man xset

plus all the power management goodies that come with the various DEs.

Personally I think power management under GNU/Linux is a bit of a mess.
Since I don't like any predefined power-/screen-savers, I have:

# for X
xset -dpms
xset s off
xset s noblank
xset s noexpose
# for tty
setterm -blank 0
setterm -powerdown 0

in my .xinitrc. From there I use power management manually when I need it.
When it comes to pm-utils, laptop-mode, etc. I suggest you do a lot of reading. But there are probably other people here who can help you with that.

Offline

#3 2012-06-06 05:14:00

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: Linux and Power management (screensaver, sleep, hibernate, etc.)

I agree that Linux power management is messy, especially the interaction between multiple sources of power management.  I'm poking the mess with a stick that couldn't be long enough. 

xset s doesn't seem to work with xscreensaver, so that's problematic in my case.  xscreensaver seems to have its own power management, but X DPMS has its own as well (configured through xorg.conf files).  (Unless xscreensaver is just calling xset itself; more research is needed.)  I'm also using xfce4-power-manager on top of that, so lots of fun trying to figure out what configures what.

In this case, what's the difference between setterm and xset?  If I do setterm -powerdown 1 and I configure DPMS to shutdown after 30 minutes, does that mean the computer will shutdown after 1 minute idle when I'm looking at a tty only or after 1 minute even in X?

Offline

Board footer

Powered by FluxBB