Hi,
My simple script
#!/bin/bash
IN="LVDS1"
EXT="VGA1"
case "$1" in
on)
xrandr --output $IN --off --output $EXT --auto
;;
1440)
xrandr --output $IN --off --output $EXT --mode 1440x900
;;
1280)
xrandr --output $IN --off --output $EXT --mode 1280x1024
;;
off)
xrandr --output $EXT --off --output $IN --auto
;;
*)
echo "Usage: $0 {on/off}\n"
exit 2
esac
Said, at work display is 1280x1024
You did:
vga on
You go at home where display is 1440x900
vga 1440
You go back to work
vga 1280
You go to cafee
vga off
Łukasz Maśko @ 2015-05-08 13:23 rakstīja:
Hello.
I have a Dell laptop, for which I have 2 docking stations (at home and
at
work), both with additional monitor connected. The monitors differ in
resolution. I do not turn my laptop off, I only suspend it to RAM, when
it is
not used.
Let's consider such scenario: laptop is docked at home. Xrandr shows
available
resolution for external screen properly. I turn off the external output
(xrandr --output VGA1 --off), then I suspend it, undock and take to
work,
where I dock again to another docking port and wake it up.
The problem is, that the laptop does not re-read the resolution
configuration
then. it shows resolutions from the monitor which I have at home, not
at work.
I think that after the machine wakes up, it gets no "display changed"
message,
which is pretty logical. ButThen The only way I can have the data
"fixed" is
to unplug the monitor physically and plug it back. And I dont like such
solution, that's not what docking station is for.
Can I somehow make xrandr refresh its readings?
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s