Q: How can I reconfigure Xorg windows system in Ubuntu? I played with its configuration and broke it!
A: First recommendation is to always save a copy of /etc/X11/xorg.conf before editing it. Once you decide you would like system to create new xorg.conf type one of these commands and follow instructions at the screen:
dpkg-reconfigure xserver-xorg
or
sudo dpkg-reconfigure xserver-xorg
In most cases it helps.
Update: for automatic configuration (autodetect) you should use the following:
sudo dpkg-reconfigure -phigh xserver-xorg