On 04/20/2013 03:16 AM, Ian Pilcher wrote:
My new laptop has the ability to support up to 3 concurrent displays.
I
have found that this is actually a problem when I try to use it in my
home office, where the (closed) laptop is placed into a docking station
that is connected to two external displays.
The default X behavior is to use both external displays *and* the built-
in display. Of course, the KDM login fields end up on the invisible
built-in display.
I can't use a static X configuration to work around this problem,
because there are plenty of times that I'll want to use the built-in
display. I need to do this:
if /usr/bin/grep -q closed /proc/acpi/button/lid/LID/state; then
NUM_DISPLAYS=`/usr/bin/grep ^connected$
/sys/class/drm/card0-*/status | /usr/bin/wc -l`
[ $NUM_DISPLAYS -gt 1 ] && /usr/bin/xrandr --output LVDS1 --off
fi
(This disables the built-in display when the laptop is closed *and*
there is at least one external display connected.)
In theory I should be able to add this to /etc/kde/kdm/Xsetup, but it
seems that kdm_greet is already running when this script is executed, so
the theme geometry gets all messed up. (My external displays do not
have the same resolution as the built-in display.)
For now, I've replaced /usr/libexec/kde4/kdm_greet with a wrapper script
that does the xrandr stuff and then runs the actual program. This is
obviously fragile, however.
Can anyone think of a better way to do this?
Thanks!
I have this exact configuration. I run two external displays with the
laptop lid closed whilst in the dock and the LVDS display disabled.
I use kscreen for any display manipulation and, although it had a few
glitches in the beginning, I find it rock solid at the moment (although,
admittedly, my config is pretty static at the moment).
My default config is LVDS1 disabled and HDMI2 and HDMI3 enabled.
https://fedoraproject.org/wiki/Features/KScreen
--
Kindest Regards,
Brad Hubbard
Software Maintenance Engineer
Red Hat Global Support Services
Asia Pacific Region