How to force X to use a specific GPU / output

Polytropon freebsd at
Sat Nov 30 21:07:40 UTC 2019

On Sat, 30 Nov 2019 15:38:24 -0500, Vlad D. Markov wrote:
> I use a little script to select which monitor to use.
> Is that what you are looking for?
> #set -x
> intern=LVDS1
> extern=VGA1
> if xrandr | grep -q "$extern connected"; then
>     xrandr --output "$intern" --off --output "$extern" --auto
> #       echo "turning on external"
> else
>     xrandr --output "$extern" --off --output "$intern" --auto
> #       echo "turning on internal"
> fi

Thanks for this pointer - yes, xrandr is a very convenient tool
for switching the outputs. I tried this with LVDS, HDMI-0 and VGA-0,
back and forth, in various combinations, but whenever the laptop's
own display comes back on, the green pixels are there, while the
image on all other outputs - as expected - is absolutely normal.
I can even switch to "unsuitable" modes like 640x480, but the
problem just gets magnified. ;-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list