How to turn off screen blanking

Antonio Olivares olivares14031 at gmail.com
Wed Aug 10 21:10:59 UTC 2011


> I have a kiosk system I am almost done building and the last snag is
> attempting to make it so idle time (no keyboard or mouse attached) does not
> blank the screen.   I have already tried the following:
>
> vidcontrol -S off
> disabling acpi and apmd from the kernel config
> enabling dpms via the kernel config and then running xset -dpms
>
> Any other ideas?

I had a similar situation, but I had a monitor with built in speakers
and it turned off automatically(screen saver/dpms), and I had to wake
it up in order to play some songs and I could hear them :)  The
monitor was in sleep mode.  I had a script that powered it back up:

/***************************************************************/
#!/bin/sh

export DISPLAY=:0
/usr/local/bin/xset dpms force on;
/usr/local/bin/xterm -display :0 -bg white \
-e /usr/local/bin/mplayer --really-quiet -shuffle -playlist
~/.playlist -stop-xscreensaver & PID=$! > /dev/null 2>&1
sleep 1800
kill $PID
/usr/local/bin/xset +dpms
/***************************************************************/

The line that should do it is this one :

/usr/local/bin/xset dpms force on;

The rest was for playing music at a certain time :) [via crontab
entry], several kind members of this list suggested the $PID=$! trick
and then kill $PID.  I was trying to use killall -9
/usr/local/bin/mplayer to stop mplayer from playing, then I found that
pkill /usr/local/bin/mplayer to do it.  But that was not optimal.
Hope you test it and that it would work for what you intend to use it
for :)

Regards,

Antonio


More information about the freebsd-questions mailing list