// Ubuntu: Failed to parse existing X config file '/etc/X11/xorg.conf'

If you are using the proprietary NVIDIA graphic driver on Ubuntu 9.10 Karmic or 10.04 Lucid, you may get an error when trying to save your display configuration (especially on a freshly installed system):

Failed to parse existing X config file '/etc/X11/xorg.conf'

This happens because nvidia-settings1) tries to parse the existing configuration file before storing a new version of it. And it is not able to handle the xorg.conf shipped with Ubuntu by default. Open a terminal and use the following command to fix this:

sudo nvidia-xconfig

The command creates a basic /etc/X11/xorg.conf suitable for your graphic card. The NVIDIA X Server Settings tool should be able to store your display settings the now.

1) listed as “NVIDIA X Server Settings” in the GUI menu