In order to generate xorg.conf you need to switch to a virtual console using the key combination CTRL + ALT + F1
Now execute the following commands:
sudo service gdm stop
- This command will stop the X.
sudo Xorg -configure
- this will generate the xorg.conf file in your home folder (the the proper location)
sudo mv ~/xorg.conf.new /etc/X11/xorg.conf
- move and rename the newly created xorg file to the correct location
- to reboot the machine, and allow the changes to take effect.