Inserting x200s into (ultrabase) docking station mirror screen is always activated leading to non optimal resolution
- by kiu
Builtin LCD should be 1440x900
External LCD should be 1920x1080
If X200s is inserted into docking station the option mirror screen is always activated leading to a resolution of 1152x864 which looks terrible on the builtin and external lcd.
My manual configuration for docking mode (seperate screens with maximum resolution) should be respected, but "Make Default" button has no consequences.
Found a quick fix, but this cant be the offical ubuntu way...
/etc/udev/rules.d/99-vga.rules:
SUBSYSTEM=="drm", ACTION=="change", RUN+="/usr/local/sbin/vga_changed.sh"
/usr/local/sbin/vga_changed.sh:
#!/bin/bash
dmode="$(cat /sys/class/drm/card0-VGA-1/status)"
export DISPLAY=:0.0
if [ "${dmode}" = disconnected ]; then
/usr/bin/sudo -u kiu /usr/bin/xrandr --output LVDS1 --mode 1440x900 --pos 0x0 --output VGA1 --off
elif [ "${dmode}" = connected ]; then
/usr/bin/sudo -u kiu /usr/bin/xrandr --output LVDS1 --mode 1440x900 --pos 0x0 --output VGA1 --auto --mode 1920x1080 --right-of LVDS1
fi