$ inxi -G Graphics: Card: Matrox Systems G200eR2 X.org: 1.15.1 driver: vesa tty size: 205x58 Advanced Data: N/A out of X
For Ubuntu 14.04.1, this problem can be solved by following steps.
1, Switch to console mode
CTRL + ALT + F1
2, Stop lightdm service
sudo service lightdm stop
sudo X -configure
4, Move the Xorg configure file to system dir:
5, Open ‘/etc/X11/xorg.conf’ and substitute ‘mga’ to be ‘vesa’
6, Start lightdm again with new configure file
sudo start lightdm
For Ubuntu 16.04, this problem seems to be there and cannot solve by above way.