You are not logged in.

#1 2009-05-14 17:50:06

loutr
Member
Registered: 2009-05-14
Posts: 3

Turn on display with LIRC

Hi everyone,

I've been using this forum stealthily for quite some time, but never posted because the questions I had had already been answered. Obviously, today it's not the case smile

I'm in the process of building an HTPC, running Arch and XBMC. Everything works fine, so I'm down to the little details that have been bugging me. One of them is that I can't turn on the monitor with my remote control (WinFast Y04G0004 in case that matters). I've bound this script to the power key with  irexec :

#!/bin/bash
MONITORSTAT=`xset -display :0 q|grep -c Monitor\ is\ On`
if [ "$MONITORSTAT" -eq "1" ]; then
        xset -display :0 dpms force off
elif [ "$MONITORSTAT" -eq "0" ]; then
        xset -display :0 dpms force on
fi
exit

The display turns off fine (power saving mode, LED turns orange), then if I hit the key again it turns on (exits power saving mode, LED turns green), but it stays black ; I have to hit a key on the keyboard to see X again.
Thanks in advance for helping me smile

Offline

#2 2009-05-15 01:03:42

blueprint
Member
Registered: 2008-12-04
Posts: 4

Re: Turn on display with LIRC

Isn't that screensaver?

Offline

#3 2009-05-15 05:34:05

loutr
Member
Registered: 2009-05-14
Posts: 3

Re: Turn on display with LIRC

You were right, it was the screensaver. I had turned any automatic screensaving off, and I can't see why "xset dpms force off" would turn on the screensaver, so I didn't even think of trying that out. But adding "xset -display :0 s off" to the elif part of the script did the job, thank you smile

Offline

Board footer

Powered by FluxBB