[ltp] xorg and intel driver

Takis Diakoumis linux-thinkpad@linux-thinkpad.org
Tue, 10 Jul 2007 08:33:41 +1000


Hi 

that was all very very helpful, i didn't know about xrandr and i think
its the way t go for this and works very nicely. the blog post and
directions there was especially helpful - thanks.

i have added this to my video action script as follows: (it can no doubt
be improved but works fine) i needed the display in there because when
running it from Fn-F7 it complains that it can't open one.

#!/bin/sh

DISPLAY=:0.0
STATUS_FILE=/usr/local/thinkpad/video_status

STATUS=0

if [ -f ${STATUS_FILE} ]; then
    STATUS=`cat ${STATUS_FILE}`
fi

if [ "${STATUS}" == "0" ]; then
    xrandr -d ${DISPLAY} --auto
    STATUS=1
else
    xrandr -d ${DISPLAY} --output VGA --off
    STATUS=0
fi

echo ${STATUS} > ${STATUS_FILE}

thanks again.

Takis