This is a very frustrating problem that I too am struggling with after upgrading to Ubuntu 18.04.
A temporary solution that I have found is:
- Open the terminal
- Copy your equivalent of the following into the terminal (but don't run it yet!)
xrandr --output VGA-1 --off && xrandr --output LVDS-1 --auto --output VGA-1 --auto --same-as LVDS-1
- Plug in the external monitor. After being plugged in, both screens will go black, but the cursor will still be seen on the primary monitor.
- Press 'Enter' to run the line above.
- Wait a while. Both screens should start working after a short time. Sometimes I've had to blindly push 'Up' and 'Enter' to run the command a second time before it works.
Unfortunately, the above is only useful in a single session. I haven't yet worked out what options need to be changed where to make it persistent. However, hopefully it gets both your screens running in the short term at least.
When looking at /var/log/syslog at the times when my monitor gets plugged in, there are some entries which I suspect are indicative of the root problem:
gnome-shell: Failed to use linear monitor configuration: No available CRTC for monitor 'VSC VA2226w' not found
gsd-xsettings: Failed to get current display configuration state: Timeout was reached
and then when the monitors are properly displaying:
/usr/lib/gdm3/gdm-x-session[1498]: (II) modeset(0): Modeline "1280x800"x0.0 68.94 1280 1296 1344 1408 800 801 804 816 -hsync -vsync (49.0 kHz eP)
I haven't yet learned how to interpret these, but hopefully they'll help lead us both to a more permanent solution!