Resurrecting your xserver by restoring your previous xorg.confA few days ago I installed Cedega on my portable with Ubuntu Linux installed on it. After installation I customized the application options / preferences and ran the test utility. The test revealed that my 3D Acceleration wasn’t working. I found that a crucial part to have working so I started fixing it.After a while I made a mistake and my (already highly customized) xorg.conf got re-written by all kinds of default settings. Since the xserver uses the file in order to start-up correctly you can imagine that my xserver crashed.In Ubuntu Linux the xorg.conf file makes a backup of it’s current state before it accepts getting edited or rewritten. This does not apply when you edit xorg.conf yourself though (editing with Vi or Gedit). So I got an backup waiting to be restored, with all my setting related to resolution, drivers, AIXGL/Compiz and so on. I’ll use my own example in order to explain how you can restore the previous xorg.conf file.After I rebooted Ubuntu Linux started up correctly until it came across xserver section. There the xserver crashed and I was presented with a terminal screen which kindly asked for my username.I logged in with my normal account and entered:
djons@tosh-empire:/$ cd /
This command brings you to the root of your system. If you enter:
djons@tosh-empire:/$ dir
You will see you are at the beginning point of the system.We need to proceed towards the xorg.conf location. Hit the following path in order to get there:
djons@tosh-empire:/$ cd /etc/X11
Note that X11 is with a capital X. All Linux distributions, UNIX variations and thus also Mac OS X feature this.When you are in the X11 directory you will see a file structure similar to this:
djons@tosh-empire:/etc/X11$ dirapp-defaults gdm xorg.conf Xsession.dapplnk rgb.txt xorg.conf~ Xsession.optionsconfig susewm xorg.conf.20060807011320 Xwrapper.configcursors X Xresourcesdefault-display-manager xinit xserverfonts xkb Xsession
You should pinpoint two files, they are the files with which we are going work:
xorg.confxorg.conf.?????????????
The question marks represents year, month, day and some more info. But the date is the most important since you can easily pick the most current back-upped version of xorg.conf before things went sour. So now it’s time to replace our corrupt xorg.conf with a previous working version.First of all we have to delete the current corrupted xorg file. To make this happen do the following terminal work:
djons@tosh-empire:/etc/X11$ sudo rm xorg.conf
Now we have to rename the back-upped version in order to get our installation working with icons and mouse. Do the following terminal work:
djons@tosh-empire:/etc/X11$ sudo mv xorg.conf.????????????? xorg.conf
We’re done. The only thing you have to do is restart your machine and wait till it’s done booting up the installation. In order to get your machine rebooting hit the on/off switch once or use the following command:
djons@tosh-empire:/etc/X11$ sudo shutdown -r now
September 21, 2006 at 1:51 am |
I just effed up my xorg.conf a few days ago. The fact that you posted this not too long ago, and the chance I stumbled across your site is incredible. Thanks so much!!
November 29, 2006 at 12:04 am |
I effed up my xorg several times in an attempt to correct an error and then again and again i effed it up, with the help of friends and family we all had a go at effing it up, but this little solution resolved it and now I have become the guru of linux in my family!
I had just reached the stage where I lost hope and was contaplating returning to MS but this solution restored my love and pasion for linux.
Long live opensource!
December 6, 2006 at 1:45 am |
This was the best resolution ever posted – thanks for saving a noob reinstall
December 16, 2006 at 4:06 pm |
Not sure if there’s a reason not to use it, but sudo cp /etc/X11/xorg.conf.?????.. /etc/X11/xorg.conf works as well.
February 21, 2007 at 12:09 pm |
Thanks a lot !
you just saved my system.
regards
Yann Studer
February 23, 2007 at 3:14 am |
Thanks for saving my cheese!!! (I had been typing x11 instead of X11…)
March 12, 2007 at 10:45 pm |
djons Man you are a real life saver. You are a very kind and good person. Your advice and easy to follow instructions have just saved and restored my beloved ubuntu (in just 1 minute) after I totally messed trying to install the latest ATI driver using envy (beware everyone if it tells you that your card is not supported).
I can’t possibly thank you enough.
Thanks a million man
March 25, 2007 at 12:18 am |
so simple yet so helpful, thanks very much!
March 30, 2007 at 3:15 pm |
Great fix! Kubuntu would work great for a few days and then for no reason boot into a command line mode. I searched the internet for a while, but I couldn’t find anything that restored my GUI, until now. Thanks.
April 21, 2007 at 7:20 am |
You just saved my butt. Like everybody else, I screwed up my xorg.conf and was left with just a terminal window. Luckily the most recent backup I had was just a week ago, so I swapped it out and everything is working again. Thanks!
May 6, 2007 at 8:56 pm |
Thank a lot! A real life Savior !!!
I am a newb to linux, been using it for a week, and i’ve been trying to make my dual monitor display to work with the second monitor as an extension of the first one, by default it is working but as a mirror of the first screen…. so i messed up with my xorg.conf file and it wouldn’t boot anymore until i got your precious help!
Thanks again,
A Humble Nux Newbie
June 7, 2007 at 3:52 am |
saved my butt too, thanks!!!!!
June 27, 2007 at 4:16 pm |
Have you been able to fix the cedega – intel 855GM issue. I have a system that is comparable to yours and I can’t seem to get the 3D Accelleration working.
Would you be so kind to post your xorg.conf file, or mail it to me?
Thanks a lot!
August 6, 2007 at 5:00 pm |
Uncut naked Paris Hilton sex tape videos
Paris Hilton Sex Tape Criminal
August 28, 2007 at 5:41 pm |
As of Aug 2007 the backup is just called xorg.conf.1
so :-
cp xorg.conf.1 xorg.conf
will work.
J
September 7, 2007 at 10:22 am |
Thanks,
September 16, 2007 at 12:12 am |
Thank you soooo much. I was near a nervous breakdown.
September 20, 2007 at 12:36 am |
Wooow this was a real life saver!!!!
I have added hope in Ubuntu because it is so easy to restore just by following your tutorial!!!
thankyou so much
September 27, 2007 at 12:49 am |
I just totally screwed up Xubuntu I’d just installed on an old laptop. After installing Xubuntu decided to use a totally non standard H/V rate (the laptop’s TFT showed a quarter of the desktop in the bottom right hand corner of the screen with bits of the rest of the desktop in the wrong places, and when plugging in an external monitor that just come up with the message “Attention! Incorrect Horiz / Vert Frequency”. I then booted up Knoppix which worked fine (which I would use if Knoppix included the drivers for the AccessRunner USB ADSL modem, but unfortunatly it doesnt!), and copied /etc/X11/xorg.conf into /mnt/hda1/etc/X11/xorg.conf replacing the existing file. I thought this should work – oops nope I was wrong – all I got when rebooting with Xubuntu is it keep whinging that it’s missing the default font “fixed”, tried # out all the references to fonts – nothing, tried deleting Xorg.conf – same problem, tried to use dbpkg-reconfigure to reconfigure it still the same problem. In the end have given up and resorted to re-installing the entire linux distro again (grr…), this method does seem a really good way, but by using the CP command in another linux unfortunatly it over-wrote the xorg.conf file without bothering to create a backup (oh well I’ve learned from my mistake – keep xorg.conf safe!
October 5, 2007 at 11:27 am |
Thankyouthankyouthankyou….
I am having an absolute nightmare trying to install and get a sensible screen resolution for my Nvidia GTX 7800 ~ and messing with my xorg.conf file with only half the requisite knowledge seems to have been a mistake!
October 12, 2007 at 1:34 am |
OMG I almost remove Ubuntu for that problem and I can’t believe how easy this works…. THANK YOU!!!
November 6, 2007 at 10:19 pm |
Hi, I wish I had found this page before I tried to reinstall all of xorg (and failed) …
December 27, 2007 at 2:06 am |
My wife and her laptop thank you, but more importantly, I thank you!
February 3, 2008 at 5:26 pm |
THANK YOU I LOVE YOU SO MUCH.
April 2, 2008 at 7:35 pm |
Thank you.
Next, maybe a tutorial on how to properly write resolutions?
I used the “cp” instead of “mv” so I still have a good backup of my .failsafe file
Thanks again!
May 21, 2008 at 10:52 am |
[...] Det første vi må gjøre er å skrive inn noen endringer i xorg.conf. Det kan være en idé å ta en kopi først, for feil i xorg.conf kan i verste fall gjøre at du ikke kommer inn igjen etter en omstart. sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.sikkerhetskopi Se mer om hvordan du kan legge tilbake sikkerhetskopien på Absolute Beginner Talk. [...]
June 28, 2009 at 1:58 am |
thank you so much. I thought I was going to have to reinstall ubuntu. I lost the setting after extending the desktop onto a second monitor. thank you, thank you, thank you.