You are not logged in.

#1 2011-07-12 06:27:25

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

How can I auto-enable DPMS?

For some reason, DPMS isn't already enabled all the time, so whenever I want to use it, I have to enter xset +dpms in the terminal. I tried putting that in my .xinitrc, but that didn't work. I tried making a .desktop file in .config/autostart, no dice.

In case you're wondering, I need DPMS enabled so I can use xlock -dpmsoff 1, so I can both lock my screen and turn off the LED backlight on my Eee PC 900. Kind of annoying to have to do a xset +dpms every time I restart X or my computer!

Offline

#2 2011-07-12 11:11:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How can I auto-enable DPMS?

YAOMTC wrote:

I tried putting that in my .xinitrc, but that didn't work.!

What exactly went wrong?
Have you tried  /etc/rc.local or even .bashrc?

Last edited by karol (2011-07-12 11:13:34)

Offline

#3 2011-07-12 22:08:04

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: How can I auto-enable DPMS?

Wait, so xset +dpms *doesn't* need to be run after X has already been started?

Offline

#4 2011-07-13 00:23:35

Haptic
Member
Registered: 2009-09-03
Posts: 149

Re: How can I auto-enable DPMS?

What went wrong with putting xset +dpms in your .xinitrc?

Offline

#5 2011-07-13 23:31:42

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: How can I auto-enable DPMS?

Like I said, it just didn't work. I put "xset +dpms" on a line at the bottom of my .xinitrc, restarted, and "xset -q" revealed that DPMS was still disabled -- thus, "xlock -dpmsoff 1" does not blank the screen after 30 seconds. However, if (after I've already started X) I do that command in a terminal, DPMS becomes enabled.

Offline

#6 2011-07-19 06:44:38

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: How can I auto-enable DPMS?

Has anyone else had this problem?

Offline

#7 2011-07-19 07:35:50

Wittfella
Member
From: Australia
Registered: 2008-05-27
Posts: 462

Re: How can I auto-enable DPMS?

Just checking - when you say "bottom of my .xinitrc" are you sure its actually being executed. The last thing in your .xinitrc (without an '&' at the end) is what is executed while in the X session.  Things below that won't actually execute until after you quit X.

ie. try the "xset +dpms" higher up in the .xinitrc, before you start the window manager.

Offline

#8 2011-07-19 07:42:18

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: How can I auto-enable DPMS?

# Disable DPMS if on AC
if [ `/bin/awk '{print $2}' /proc/acpi/ac_adapter/ADP1/state` = on-line ]; then
     XAUTHORITY=/home/meyithi/.Xauthority /usr/bin/xset -display :0.0 s off -dpms
fi

I use that in my session script to disable dpms, I don't see any reason as to why

XAUTHORITY=/home/$USER/.Xauthority /usr/bin/xset -display :0.0 s on +dpms

would not enable it.

if it doesn't work you are probably doing something horrible with your session script/.xinitrc

Last edited by Meyithi (2011-07-19 07:43:11)


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#9 2011-07-19 18:44:22

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: How can I auto-enable DPMS?

If you're using "startx" then your .xinitrc is read by the OS.  If you're not using that or some other commandline way to start X then the .xinitrc is not read at all (at least that's what i read earlier in another forum post).  I don't know where else you'd put the dpms setting though, sorry.

Offline

#10 2011-07-20 06:27:45

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: How can I auto-enable DPMS?

I do use startx... Here's my .xinitrc

#exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
xset +dpms
exec ck-launch-session startlxde

xmodmap -e "pointer = 1 9 3 4 5 6 7 2 8 10 11 12 13"

Offline

#11 2011-07-20 06:36:26

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: How can I auto-enable DPMS?

Normally you do not have to enable it by hand with xset. It is normally auto enabled. What's the content of /var/log/Xorg.0.log?

Offline

#12 2011-07-25 18:17:44

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: How can I auto-enable DPMS?

Offline

#13 2011-08-04 05:57:33

YAOMTC
Member
Registered: 2010-02-23
Posts: 204

Re: How can I auto-enable DPMS?

I use LXDE with Openbox, if that makes any difference. I don't think it does...

Offline

Board footer

Powered by FluxBB