Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 62

Thread: Problem with xset dpms force off

  1. #41
    Join Date
    Mar 2011
    Beans
    3

    Re: Problem with xset dpms force off

    Quote Originally Posted by dstein View Post
    This will have the problem that the monitor turns on after a few seconds, as described in El Raspa's original post.
    Oh, I see... It actually just lengthened the time before the monitor turning back on (2sec -> 1 min). Sorry about that. I guess I should have waited longer than 30 secs to be sure.

  2. #42
    Join Date
    Mar 2011
    Beans
    3

    Re: Problem with xset dpms force off

    Ok. Apparently how you call on the screensaver might matter. Could you test

    Code:
    gnome-screensaver-command -a && xset dpms force off
    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 =P
    Last edited by sehyoun; March 5th, 2011 at 12:59 AM.

  3. #43
    Join Date
    Aug 2008
    Beans
    5

    Re: Problem with xset dpms force off

    Quote Originally Posted by lunatico View Post

    The weird thing is that a simple command like:
    Code:
    #!/bin/bash
    sleep 2
    xset dpms force off
    does the trick...
    I am trying to make a gnome-screensaver module based on that script. I just needs some good documentation on how to make .desktop modules. Anyone?

    Using Google get's me nowhere

  4. #44
    Join Date
    Feb 2008
    Beans
    722

    Re: Problem with xset dpms force off

    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????

  5. #45
    Join Date
    May 2011
    Beans
    1

    Arrow Re: Problem with xset dpms force off

    My solution lcdonoff script - simple and elegant
    Code:
    #/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
    replace OID by your device

    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

  6. #46
    Join Date
    Nov 2009
    Beans
    1,196

    Re: Problem with xset dpms force 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.

  7. #47
    Join Date
    Mar 2007
    Location
    Pensacola, Fl
    Beans
    1,055
    Distro
    Xubuntu 11.04 Natty Narwhal

    Re: Problem with xset dpms force off

    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:
    Code:
    #!/bin/bash
    xflock4 &
    sleep 3
    python /home/user/scripts/screenlock
    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.

    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

  8. #48
    Join Date
    Aug 2008
    Beans
    24

    Re: Problem with xset dpms force off

    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!

  9. #49
    Join Date
    Nov 2009
    Beans
    1,196

    Re: Problem with xset dpms force off

    Quote Originally Posted by nxmehta View Post
    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!

    Haha, I hope so too. Regardless, I'm sure I speak for all of us on here: thanks for the script.

  10. #50
    Join Date
    Feb 2007
    Beans
    22

    Re: Problem with xset dpms force off

    Running Gnome 3 on Arch with the same issue but I can't get the script to work, I get this error:

    Code:
    File "./monitoroff.sh", line 21
        print display.next_event()
                    ^
    SyntaxError: invalid syntax
    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.

    It's a shame gnome-power-manager as yet to fix this conflict with xset dpms force off.

Page 5 of 7 FirstFirst ... 34567 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •