Screen blanking for winners (dpms)

Forum rules
Share your brain ;)
User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Screen blanking for winners (dpms)

Unread post by ivanovnegro » Tue Oct 22, 2013 12:27 am

We are minimalists, so we try to use the smallest tools already provided by our system to achieve our goals.

There is something you can do in power management settings but it depends on the software (xfce4-power-manager etc.) you use and many times it interferes with other things, in this case screen blanking.

Of course you can use the "bloated" tools but we want simple here and how Mr. Ivan prefers it as he is fed up with the popular solutions.

It is nothing mind blowing, just for the uninitiated and new to our hot corner.

There is something called dpms settings that can use the power management provided by X for your monitor if supported on your hardware. A lot of times, if it is enabled, it will interfere with the settings you make e.g. with power management tools from the big desktop environments. So, you have to decide what tool you want to use in first place. As we are on the grill here I will adjust it to our likings, the Ivan way, I will just use dpms settings for my screen blanking on laptops to save energy. Whatever software you use, disable now all the settings for the monitor, e.g. in xscreensaver and in xfce4-power-manager etc.

Test if dpms is running/supported on your machine (maybe you have one of those stickers with something like ENERGY STAR):

Code: Select all

xset -q | grep 'DPMS is'
If you want to see what is set:

Code: Select all

xset q
From the terminal you can already play with it:

Code: Select all

xset +dpms
will activate power savings

Code: Select all

xset -dpms
will disable it. See man xset for more commands and options.

And I want to make it persistent. That means I could play with the xorg.conf settings but I am lazy and have no xorg.conf and do not plan to use one. I will just put it in the .xinitrc or .xsession because I use a minimal window manager but you can also put it into your autostart for DEs.

I decided I want just screen blanking and nothing more after a certain time. I put these lines into my .xinitrc:

Code: Select all

# screen settings
xset +dpms     # enable power saving
xset s 10800   # blank screen after 3 hours
That's it. Adjust to your liking.

You can of course do it the other way, disabling it totally and use the other tools and they will finally work or not. :) Then you would do this.

Code: Select all

xset -dpms    # disable power saving
xset s off    # disable screenblanking 
For the hardcore grillers, without X you can use setterm:

Code: Select all

setterm -powersave on  # enable power saving
setterm -blank 10      # blank the after 10 minutes
Look at man setterm for more on this.

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Screen blanking for winners (dpms)

Unread post by wuxmedia » Tue Oct 22, 2013 1:52 am

thanks Ivan, I'm still wrestling with turning the blanking off in wheezy, on my server - it's only tapping a key to wake it up. but annoying none the less.

Code: Select all

 setterm -blank 0
has no effect, [powersave off] gives me some warning.

I think I may have to add a cheat code to the kernel line.
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: Screen blanking for winners (dpms)

Unread post by bones » Tue Oct 22, 2013 2:53 am

Excellent tutorial, thanks Ivan.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: Screen blanking for winners (dpms)

Unread post by dkeg » Tue Oct 22, 2013 3:13 am

good stuff Dave, thank you. Good share. I stumbled across this little gem some time ago, forgot where. I have in my .xinitrc

Code: Select all

## DPMS monitor setting - standby suspend off [in seconds]
xset dpms 300 600 900 &

Work hard; Complain less

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Screen blanking for winners (dpms)

Unread post by machinebacon » Tue Oct 22, 2013 4:29 am

Thanks Ivo.

Users of BBQ can use the command "moviemode" to turn off screen blanking. ;)
..gnutella..

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: Screen blanking for winners (dpms)

Unread post by ivanovnegro » Tue Oct 22, 2013 4:57 am

wuxmedia wrote:

Code: Select all

 setterm -blank 0
has no effect, [powersave off] gives me some warning.
Or try this:

Code: Select all

setterm -blank 0 -powerdown 0

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Screen blanking for winners (dpms)

Unread post by rhowaldt » Tue Oct 22, 2013 8:53 am

thanks ivo - would you consider adding this to the Wiki?
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Screen blanking for winners (dpms)

Unread post by wuxmedia » Tue Oct 22, 2013 9:53 am

thanks Ivano, no effect.
It is in a perma-tmux session... maybe that affects it?

kernel option (add to 'kernel' line in grub - to try it out) edit /etc/default/grub to make it stick

Code: Select all

consoleblank=0
is currently in effect (in NoX)
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: Screen blanking for winners (dpms)

Unread post by dkeg » Tue Oct 22, 2013 12:47 pm

machinebacon wrote:Thanks Ivo.

Users of BBQ can use the command "moviemode" to turn off screen blanking. ;)
oh yeah, that's right, I forgot about that

Work hard; Complain less

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: Screen blanking for winners (dpms)

Unread post by ivanovnegro » Tue Oct 22, 2013 7:00 pm

rhowaldt wrote:thanks ivo - would you consider adding this to the Wiki?
If I still remember how to edit it, I will do it.

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Screen blanking for winners (dpms)

Unread post by rhowaldt » Wed Oct 23, 2013 9:29 am

^ no problem. just shoot me a msg when you've made something, and i'll fix the shit you don't remember or whatever :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: Screen blanking for winners (dpms)

Unread post by ivanovnegro » Wed Oct 23, 2013 2:34 pm

^ Great. Will do then.

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: Screen blanking for winners (dpms)

Unread post by ivanovnegro » Wed Oct 23, 2013 8:30 pm

^ It is a mess, done, just copy and paste and some modifications, you *have* to make a surgery.

http://linuxbbq.org/wiki/index.php?title=Dpms_settings

Not sure what more, it is really just based on the man pages.

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Screen blanking for winners (dpms)

Unread post by rhowaldt » Wed Oct 23, 2013 8:47 pm

^ cool, thanks Ivan, i'll take a look at it!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: Screen blanking for winners (dpms)

Unread post by ivanovnegro » Thu Oct 24, 2013 1:30 am

You are the man. Looks beautiful. Thank you. I knew I forgot some links. Now I also just changed the skin and I can actually see more things. :)

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Screen blanking for winners (dpms)

Unread post by wuxmedia » Thu Oct 24, 2013 2:02 am

^ yes 'mono' skin FTW, as they say.
do you guys think I should I add the kernel setting on the same page?
as setterm does nothing on my wheezy install.
"Seek, and Ye shall find"
"Github | Chooons | Site"

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Screen blanking for winners (dpms)

Unread post by machinebacon » Thu Oct 24, 2013 4:00 am

wux, tried with sudo already? I suppose setterm can't do anything to the hardware and signals back a permission problem if you don't run it as root, just guessing.
..gnutella..

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Screen blanking for winners (dpms)

Unread post by wuxmedia » Thu Oct 24, 2013 4:40 am

just tried as root, no dice.

cheat codes FTW!
"Seek, and Ye shall find"
"Github | Chooons | Site"

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Screen blanking for winners (dpms)

Unread post by machinebacon » Thu Oct 24, 2013 7:00 am

Then take a look at /etc/console-tools/config

there you find the BLANK_TIME and POWERDOWN_TIME entries.

Or this answer: http://superuser.com/questions/152347/c ... g-behavior
by adding it to /etc/rc.local
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Screen blanking for winners (dpms)

Unread post by rhowaldt » Thu Oct 24, 2013 7:18 am

@ivo: no problem :)
i don't use the BBQ skin for the Wiki btw, but the 'classic' one. dunno why, i like it better, that's all.

as for additions to the article: it's a Wiki, so go ahead. if you are unsure about syntax or whatever, aside from using the obvious Google-Fu (look for Mediawiki + what the fuck you wanna do), just let me know you made changes and i'll look them over with OCD superpowers. just remember to keep shit organized, and look for what is already there so we don't get duplicates.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

Post Reply