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!
On 04/19/2013 11: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 currently install the following as /etc/X11/xinit/xinitrc.d/nolvds.sh
#!/bin/sh # Disable LVDS if another output is up if xrandr --current | grep -qE '^(DVI|VGA).* connected' then lvds=$(xrandr --current | awk '$1 ~ /LVDS/ { print $1 }') xrandr --output $lvds --off fi
On 04/19/2013 10:55 PM, Orion Poplawski wrote:
On 04/19/2013 11: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 currently install the following as /etc/X11/xinit/xinitrc.d/nolvds.sh
#!/bin/sh # Disable LVDS if another output is up if xrandr --current | grep -qE '^(DVI|VGA).* connected' then lvds=$(xrandr --current | awk '$1 ~ /LVDS/ { print $1 }') xrandr --output $lvds --off fi
Of course just after sending this I realized that this is what runs *after* login as well. My work around to get the login window onto the proper screen has been to set GreeterScreen as needed in /etc/kde/kdm/kdmrc.
On Fri, 19 Apr 2013, Ian Pilcher wrote:
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.
[snip]
Can anyone think of a better way to do this?
Check out the 'GreeterScreen' option in /etc/kde/kdm/kdmrc. With my video card, the usually-off HDMI output is screen 0 with the always-on DVI output being screen 1. I specify 'GreeterScreen -2' to force the login fields to the DVI output.
Dave
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