[LIVE] XBMC Live on laptop with TV
#3
A while ago I found a simpler fix for this issue. Please note, this is not my code, I can't find the original post, but it works.

Basically, If a connection is sensed on VGA output, it switches the laptop LCD off.

create a file in /etc/X11/Xsession.d called 45custom_randr-settings
and enter the following:
Quote:EXTERNAL_OUTPUT="VGA1"
INTERNAL_OUTPUT="LVDS1"

xrandr |grep $EXTERNAL_OUTPUT | grep " connected "
if [ $? -eq 0 ]; then
xrandr --output $INTERNAL_OUTPUT --off --output $EXTERNAL_OUTPUT --auto
else
xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --off
fi

now you'll note the first two lines pick the internal or external ports,
so by doing
Quote:xrandr -d :0 -q
first, you can pick which ports you want to set.

You should be able to set it for VGA1 or DVI1 and external output.

Hope this helps someone.
Media Companion Dev.
Media Companion - Kodi / XBMC - Media Companion
Reply


Messages In This Thread
[No subject] - by josh4trunks - 2011-02-19, 14:07
[No subject] - by vbat99 - 2011-05-07, 07:29
[No subject] - by Kanej - 2011-05-08, 10:28
[No subject] - by Jester - 2011-05-15, 12:38
[No subject] - by vbat99 - 2011-05-18, 01:01
RE: - by solteir - 2012-07-22, 01:23
Logout Mark Read Team Forum Stats Members Help
[LIVE] XBMC Live on laptop with TV1