Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using xset dpms force off to manually turn my screen off to save power. However, it turns back on after some time (20 - 40 seconds).

Distro: Ubuntu-Lucid

Graphics: Intel 4500 MHD

Trying steps in this solution (Turning off screensaver or wireless) did not work. Can it be due to any other reasons like network (magic packet) or usb devices?

Result of xset -p:

Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000000
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    off    02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:       off
    06: Suspend:     off    07: Mute:        off    08: Misc:        off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  500    repeat rate:  30
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  0
Colors:
  default colormap:  0x20    BlackPixel:  0    WhitePixel:  16777215
Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType,built-ins
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On
share|improve this question
1  
You're using it manually from command line or xset is binded to some keyboard shortcut? On my brother laptop this command was binded to some keys and after that monitor was turned off and on again, because when he was releasing key next event was emitted. Turning it off after quick sleep solved problem: perl -e 'select(undef,undef,undef,.1)' && xset dpms force off - this perl expression do sleep for 0.1 sec. –  pbm Dec 1 '10 at 20:40
    
I used to have the shortcut key problem too thats why created an icon. Your perl -e 'select(undef,undef,undef,.1)' && xset dpms force off command when typed in terminal did the work. Now trying this with the shortcut icon. –  crodjer Dec 1 '10 at 21:07
    
The command does not work with the shortcut icon. –  crodjer Dec 1 '10 at 21:24
    
Maybe increase the sleep (also I would use the command "sleep n" to sleep n seconds); it might be that your clicking the icon and moving the mouse(sliding your fingers over the touchpad) sends later events. –  kasterma Dec 2 '10 at 16:54
    
no, I cant execute two commands directly frm a shortcut, will try creating a script. –  crodjer Dec 2 '10 at 19:21

4 Answers 4

This seems to be a known bug and you can read more detail on launchpad as well as on ubuntuforums. The issue is that somehow gnome-power-manager and the xset commands conflict with each other.

The solution is to run xset dpms force off in a loop, a python script pretty much works for most of us.

Give it a try, and see how it goes.

share|improve this answer

Had this problem on AMD/HP laptop. Also running 10.04.3/32, same problem. Got this solution from another forum:

#!/bin/sh  
perl -e 'select(undef,undef,undef,.1)' && xset dpms force off

I put that in a sh file, set it executable, and linked that to the panel shortcut. Worked like a charm, monitor stays off. I've got no idea what the hell that weird perl script does. Hope this helps someone out some time :)

share|improve this answer
1  
select at perldoc.perl.org reveals it's a way to sleep 100ms. Depending on your /bin/sleep, sleep 0.1 could achieve the same. (Not that I understand why this sleep is there at all.) –  sr_ Apr 13 '12 at 11:13

I assume that loop has a sleep otherwise I wouldn't use it. I used cron with this set to run every 5 mins (enter crontab -e from the command-line as your X11 logged in user):

*/5 * * * * /usr/bin/env DISPLAY=:0.0 xset -dpms
share|improve this answer

I've had that problem before, basically my mouse was causing it, flip the side on it's back when you aren't using it.

share|improve this answer
    
@oneofone...This can't be the problem in mycase. I have a laptop, hence no mouse. –  crodjer Dec 2 '10 at 4:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.