Multiple Monitors – Disable Second Non-Existent Screen from Command Line

multiple-monitorsvga

My laptop adds/enables a VGA monitor called vga2 that doesn't actually exist every time I reboot, which fiddles with the mouse speed amongst other annoyances. What can I do to either stop it being enabled or automatically disable it on boot?

Best Answer

You can use the following command:

xrandr --auto

If this doesn't disable your non-existent VGA, then use the following method:

  • First run:

    xrandr --current
    

    to get the right name of your VGA. This can be VGA, VGA-0, VGA1, VGA2 and others.

  • If the name of your VGA is, for example VGA2 (as you said), then run:

    xrandr --auto && xrandr --output VGA2 --off
    

    This should disable the output of VGA2.

See man xrandr for more info.

Then, if you get it to work, put the right command in a small script, make it executable and put it to run on start up.

Related Question