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?


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.

  • could you please expand on which run on startup is best for this. Also, I sometimes face a problem after running xrandr --auto && xrandr --output VGA2 --off where my lockscreen background is blank. my version- 14.04 Ubuntu GNOME Apr 28 '15 at 12:17

Following the steps suggested works really well, but I got stuck trying to make the script automatically run on start-up so I don't have to go into Terminal and turn off my non-existant monitor everytime.

Here's how I managed to get the script to run automatically:

Once you've determined the code you need to run following the steps above, save just that piece of code in a plain text file. Rename the file to end in '.conf'.

For me this code is: xrandr --auto && xrandr --output VGA1-1 --off

Open Startup Applications. Click Add. Name and comment field are just for you, call it as you like. Click browse and find your '.conf' file. Then save.

This should now automatically run your code whenever your computer starts. Finally, at first this solution worked only most of the time for me. I realised that if I'd been using an external monitor with the laptop, then somtimes the computer switched and assigns the ghost monitor as VGA1-1 and sometimes as VGA1-2. So, in my case I ended up updating my conf file to have code turning off both VGA1-1 and VGA1-2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.