You are not logged in.

#1 2013-02-13 13:53:25

adam777
Member
Registered: 2012-05-28
Posts: 158

[Solved] Activating Monitor DPMS on boot

Hello all,
I've just migrated from Laptop Mode Tools to the powerdown script and have one problem - I can't get DPMS to work for setting screen shutdown on boot.
I've tried the following:
1. Using the xset command directly in powerup/powerdown (using run or directly) - xset doesn't seem to work as root, so it fails.

2. Using the following 10-monitor.conf in /etc/X11/xorg.conf.d.

Section "MONITOR"
    Identifier "Monitor0"
    Option "DPMS"
EndSection

Section "SERVERLAYOUT"
    Identifier "ServerLayout0"
    Option "BlankTime"  "0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "10"
EndSection

After launch "xset -q" states that DPMS is disabled.

3. Using ~/.xinitrc - doesn't work, perhaps because KDM is enabled as a systemd service?

Thanks, Adam.

PS.
Yes, I'm aware I can use KDE's setting for the screen timeout, but It gave me some weird issues in the past.

Last edited by adam777 (2013-02-14 08:38:02)

Offline

#2 2013-02-14 07:19:23

mityukov
Member
Registered: 2010-10-10
Posts: 66

Re: [Solved] Activating Monitor DPMS on boot

Have you tried to run xset uner the user from within that script?

Something like:

su $USER -c "DISPLAY=:0 xset <your options>"

... Also, you might want to try putting your script to the ~/.kde4/Autostart/ folder -- these scripts are run under the user, when the system boots.

Last edited by mityukov (2013-02-14 07:21:32)

Offline

#3 2013-02-14 07:28:25

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 466

Re: [Solved] Activating Monitor DPMS on boot

adam777 wrote:

1. Using the xset command directly in powerup/powerdown (using run or directly) - xset doesn't seem to work as root, so it fails.

xset needs DISPLAY variable, so you have to run this in scripts:

DISPLAY=:0 xset dpms 0 0 10
adam777 wrote:

3. Using ~/.xinitrc - doesn't work, perhaps because KDM is enabled as a systemd service?

I don't think KDM manages dpms, but I think KDM doesn't use ~/.xinitrc.

Offline

#4 2013-02-14 08:37:47

adam777
Member
Registered: 2012-05-28
Posts: 158

Re: [Solved] Activating Monitor DPMS on boot

mityukov wrote:

... Also, you might want to try putting your script to the ~/.kde4/Autostart/ folder -- these scripts are run under the user, when the system boots.

This worked.
Thank you both.

Offline

Board footer

Powered by FluxBB