Reconfiguring the X server on Ubuntu

If, for some weird reason which could probably be any recent update, your screen resolution goes for a toss and if in KControl display settings the only possible resolution which you can move to is 640 x 800, then you need to reconfigure the X server.

Either you can open the /etc/X11/xorg.conf file manually and break your head or simply reconfigure X server by using the following command

$sudo dpkg-reconfigure xserver-xorg

This would start a configuration wizard. All you need to do is keep clicking "Yes" and then at the end select the correct resolution supported by your monitor like "1280 x 1024", save the configuration file and restart the X server.

Hopefully your shall be able to get back to the old resolution.