I installed Ubuntu 6.06 from a live CD. After I configured internet, lots of packages got updated. Not sure which one corrupted the settings, but my screen resolution changed to 640×480. I tried System->Preferences->Screen Resolution. But no higher resolution was listed there. I remember using xconfig or something similar in past. But no such commands were available. Google gave me the answer. We need to manually edit the /etc/X11/xorg.conf file.
Earlier the Screen section had
Modes “1024×768″ “800×600″ “640×480″
I changed it to:
ViewPort 0 0
Having only one resolution mode and only one Depth, makes it the default one.
Additionaly I’ve to add the ViewPort (not sure why it was needed). Now the screen is back to normal resolution
[Update 8-Nov-06] The ViewPort is not needed. Resolution is fine without it. But after upgrading to Edgy, the resolution went back to 640×480. Either simply adding an empty line at the end of the xorg.conf file or executing a “sudo touch /etc/X11/xorg.conf” and then restarting X (Ctrl+Alt+Backspace), will bring the resolution back to normal. Quirky Linux