Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] Automatically Turning Off your Monitor
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
VoiDeR
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2003
Posts: 122

PostPosted: Thu Aug 09, 2007 1:38 pm    Post subject: Reply with quote

davjel wrote:
try
Code:
xset dpms force on


I tried that. The monitor wakes up but the screen is still black till i move the mouse or something.
Back to top
View user's profile Send private message
Jedidiah
n00b
n00b


Joined: 16 Nov 2004
Posts: 13

PostPosted: Mon Aug 13, 2007 4:07 am    Post subject: Reply with quote

I use the following script with my mythtv box to accomplish exactly what you are trying to do:

Code:
#!/bin/bash
export DISPLAY=":0.0"

STATUS=`xset -q | grep 'Monitor'`
if [ "$STATUS" == "  Monitor is On" ]
then
        #uncomment next line when troubleshooting
        #echo "turning display off"
        xset dpms force off
else
        #uncomment next line when troubleshooting
        #echo "turning display on"
        xset dpms force on
        xset dpms 0 0 0
        xset dpms s off
        xset dpms s reset
fi

unset STATUS


then in my lircrc file i have the following which calls the script
Code:
begin
   prog = irexec
   button = POWER
   config = /etc/power.sh
end


this little script turns my monitor off (its an old CRT) to the standby state and then brings it back out of stand by. There is no need to have a keyboard or mouse attached to the computer.
Back to top
View user's profile Send private message
VoiDeR
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2003
Posts: 122

PostPosted: Mon Aug 13, 2007 1:28 pm    Post subject: Reply with quote

Thanks Jedidiah that works great.
Back to top
View user's profile Send private message
UnoSD
Apprentice
Apprentice


Joined: 27 Jun 2011
Posts: 273

PostPosted: Wed Apr 04, 2012 11:37 am    Post subject: Reply with quote

Can please someone tell me why, even if xset works great with dpms, when i put "OffTime" "60" in my "ServerLayout" section in my xorg.conf, i still have Off time: 0 when I call xset -q?

P.s. it DOES work with "BlankTime" option...

P.p.s. it doesn't work either when i put xset dpms 0 0 3600 into the Gnome's autostart, works just in a terminal... (xset s X X works everywhere...)
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Wed Apr 04, 2012 1:23 pm    Post subject: Reply with quote

UnoSD wrote:
Can please someone tell me why, even if xset works great with dpms, when i put "OffTime" "60" in my "ServerLayout" section in my xorg.conf, i still have Off time: 0 when I call xset -q?

P.s. it DOES work with "BlankTime" option...

P.p.s. it doesn't work either when i put xset dpms 0 0 3600 into the Gnome's autostart, works just in a terminal... (xset s X X works everywhere...)
Check your powermanagment setting in Gnome's configuration.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
UnoSD
Apprentice
Apprentice


Joined: 27 Jun 2011
Posts: 273

PostPosted: Thu Apr 05, 2012 8:04 am    Post subject: Reply with quote

ppurka wrote:
UnoSD wrote:
Can please someone tell me why, even if xset works great with dpms, when i put "OffTime" "60" in my "ServerLayout" section in my xorg.conf, i still have Off time: 0 when I call xset -q?

P.s. it DOES work with "BlankTime" option...

P.p.s. it doesn't work either when i put xset dpms 0 0 3600 into the Gnome's autostart, works just in a terminal... (xset s X X works everywhere...)
Check your powermanagment setting in Gnome's configuration.


Probably you're right (if you meant that is gnome-power-manager which mess with the xorg.conf settings), but there's no "standby, suspend, off" choice in g-p-m, how can I handle it? Is there a way to tell it not to change my settings?
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Thu Apr 05, 2012 12:28 pm    Post subject: Reply with quote

I'm running gnome-power-manager (at work, on a non-Gentoo) system, and though it says to turn off the monitor after 20 or 30 minutes, it never does. My home systems run Gentoo and either icewm or xfce, and they all turn the monitor off correctly. I haven't had time to debug the gnome-power-manager problem at work.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Thu Apr 05, 2012 4:17 pm    Post subject: Reply with quote

I don't use gnome. But all the DEs do try to mess with all the system level settings, so that they can provide you a pretty GUI to configure them.

IIRC, kde did have a control which would make it stop messing with DPMS settings in X. I am not sure if it is still configurable nowadays (it's been years since I used kde). Gnome on the other hand is not too well known for providing options. You should ask in the Desktop Environments forum; you have better chance of getting pertinent reply there.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Thu Apr 05, 2012 4:50 pm    Post subject: Reply with quote

I've messed with the pretty GUI, and it says it will turn off power after 20 or 30 minutes. It just doesn't do what it says it's going to do. I've also done the right "xset things" in my personal .bashrc startup script, but those get overridden. I'll see if this rings a bell over in the DE forums, though.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
UnoSD
Apprentice
Apprentice


Joined: 27 Jun 2011
Posts: 273

PostPosted: Thu Apr 05, 2012 6:17 pm    Post subject: Reply with quote

Probably, the only solution is to unmerge(/deactivate from autostart) gnome-power-manager (and it could also not work). Even looking in gconf doesn't solve anything...

However, the X blanking works without caring about g-p-m so I left it in my xorg.conf. I'm using the g-p-m standby time instead of xset dpms. So it all should work as I wanted to...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum