Ok. Apparently how you call on the screensaver might matter. Could you test
I tested it twice up to 5 minutes and once up to 20 minutes this time. I hope it didn't just lengthen the wait time again since 20 mins is about at the edge of my patience =PCode:gnome-screensaver-command -a && xset dpms force off
Last edited by sehyoun; March 5th, 2011 at 12:59 AM.
Same problem here. Something is defeating the screen auto-shut off... like sending mouse or keyboard events to the system. This is a worldwide energy disaster with millions of screens lit up when they should be off! How may megawatts of wasted energy is that?!
Never mind scripts and workarounds... this thread is old, so why haven't the devs fixed this????
My solution lcdonoff script - simple and elegant
replace OID by your deviceCode:#/bin/sh OID='LVDS1' STATE=`xrandr | grep $OID | grep -c "ted ("` case $STATE in '1') xrandr --output $OID --auto ;; '0') xrandr --output $OID --off ;; esac
posted also at
http://paste2.org/p/1400104
...and the best is - you can still control your music player, while your LCD is turned off
That works, but only if you have that script set on a button, not an icon. Though, I have only tested it on a laptop, so I do not know if it works on a desktop. I'm sure it can be adapted, though. Of course, you can usually turn those monitors off.
Nxmehta's script still is my choice, and hasn't failed me for several Ubuntu versions, including Natty.
A little bit of a thread revival (1 month ~), but I wanted to thank nxmehta for his script and also pass a little info on for those who might want screenlock at the same time.
I KNOW there is a more elegant way, so when one of you guys read this and think of that better way, be sure to post and make me feel stupid
I created one script (simply called 'lock') that contained:
and then pasted nxmehta's python script into another script at that location. I then bound a key combination to execute 'lock', which enables screen lock and follows by executing nxmehta's script to turn off (and keep off!) the monitor.Code:#!/bin/bash xflock4 & sleep 3 python /home/user/scripts/screenlock
I did it this way in hopes I can use his script to figure out how to get the screensaver itself to shut off the monitor ( )
Thanks again..
Stop Trusted Computing! http://www.cl.cam.ac.uk/~rja14/tcpa-faq.html
Asus Rampage 2 Extreme/2.66GHz i7 Quad/6GB DDR3 1600MHz 8-8-8-24/2x Nvidia 9800GTX+
2x150GB 10krpm HD/2x1TB 7200RPM HD/3ware RAID/
Xubuntu 11.04/Arch Linux/Gentoo Linux/Fedora
Wow, it's been almost exactly 1 year since I posted that python script... and the bug still isn't fixed in Ubuntu. Glad that some people are getting use out of it though I guess.
I'll check in around June 2012... here's hoping that people don't have to keep using a python script to turn their screen off!
Running Gnome 3 on Arch with the same issue but I can't get the script to work, I get this error:
I've switched to xfce4-power-manager which doesn't integrate in the Gnome 3 top bar, but I'll make do for the meantime.Code:File "./monitoroff.sh", line 21 print display.next_event() ^ SyntaxError: invalid syntax
It's a shame gnome-power-manager as yet to fix this conflict with xset dpms force off.
Bookmarks