A listing of random software, tips, tweaks, hacks, and tutorials I made for Ubuntu

Quick and Easy way to fix X11 issues

A few weeks ago, I tried upgrading to Ubuntu 11.10. Since I didn’t clean install, I encountered many problems. One of them was that X11 would not load (not even the login manager).


I found a quick and easy technique to solve this problem:

  1. Press CTRL+ALT+F3
  2. Log in
  3. Type:
    sudo rm -f /etc/X11/xorg.conf
    sudo rm -f xorg.conf*
    sudo service lightdm stop
    sudo service gdm stop
    sudo service kdm stop
    sudo service lxdm stop
    sudo service xdm stop
    sudo service wdm stop
    sudo Xorg -configure
    [ -f xorg.conf* ] && sudo mv xorg.conf* /etc/X11/xorg.conf
    sudo dpkg-reconfigure $(dpkg -l | awk '{print $2}' | grep "^xserver" | tr '\n' ' ')
    sudo update-initramfs -u
  4. Reboot

This will reset the X configuration

If you had any problems, feel free to comment below.

36 responses to “Quick and Easy way to fix X11 issues

  1. Aoirthoir An Broc August 30, 2011 at 5:14 am

    You should add at the top “Read completely before doing”. There are some folks who have no idea what CTRL-ALT-F3 is. You should also explain it, and explain how to get back out of it if they get confused ( CTRL-ALT-F8 ).

  2. MarkC August 30, 2011 at 9:14 am

    To avoid any confusion between backticks and quotes, you might be better using the $(…) syntax:

    sudo dpkg-reconfigure $(dpkg -l | awk ‘{print $2}’ | grep “^xserver”)

  3. Robin Lyndsay Taylor August 30, 2011 at 10:12 am

    Nothing beats a clean, fresh installation, of course. Upgrading is frequently a big hassle, easily avoided by just burning a new LiveCD and installing fresh. Having a separate /home partition allows a fresh install without the loss of saved documents, music, pictures, even bookmarks and e-mail.

    Another thing to keep in mind is that upgrading is OPTIONAL. Regular releases of Ubuntu are supported for 18 months, not just 6! So there isn’t really any urgent need to upgrade as soon as a new one is released. Even if it’s what all the cool kids are doing, lol.

    • Anonymous Meerkat August 30, 2011 at 3:26 pm

      Yeah, I know. I finally clean installed, and now I love Ubuntu 11.10 Alpha 3.
      I’m not the sort of guy who likes stable releases :-P

  4. Judas December 3, 2011 at 6:10 pm

    You are an absolute life-saver. Despite following the exact instructions to purge fglrx and reconfigure xorg to use the open source Radeon driver, it refused to stop looking for fglrx. This worked beautifully; no more am I forced to put up with the poor compatibility between Gnome 3 and my Radeon.

  5. Diego December 15, 2011 at 7:24 pm

    Numer of created screens does not match number of detected devices.
    Configuration failed
    ddxSigGiveUp: closing log
    PLease help

  6. Jason March 6, 2012 at 9:48 am

    I know I am coming in very late, but this link was incredibly useful. It is almost time for 12.04 to come out and 11.04 still has graphics problems (I did a fresh install so I did not have any old graphics configurations). After performing the first round of updates the graphics problem kicked in. This whole mess is making me re-think using Ubuntu, despite how user-friendly the rest of the OS is.

  7. Magno March 6, 2012 at 10:45 pm

    yeah! it’s work

  8. Nicklas B March 14, 2012 at 8:04 am

    Worked great for me, I’ve actually had this problem since 10.X …. a bit annoyed that it works, almost. :-)
    A trick to make it easier could be to put everything in an .sh file and run the file(sh instead, since one doesn’t have any copy&paste in that terminal.

  9. da Letíxia (@forbidden_404) March 17, 2012 at 2:51 pm

    Well, I’m with problems with Xorg, actually, I always got a fallback graphics device fail, so I did this, and now the Ubuntu logo appears, loads and when appear a black screen where the commands are load, the screen starts to turn on and off ):

  10. Serg March 18, 2012 at 1:12 pm

    It doesn’t help me at all when i try to update my 11.10 ubuntu. Its crashes on line:
    “Starting TiMidity++ ALSA midi emulation…”
    So its seems that problem with sound, not with graphics. Can U help me to fix that?

    • Anonymous Meerkat March 18, 2012 at 10:58 pm

      Actually, that is not a problem with the sound. TiMidity is loaded just before X, so that’s why it stops on that line. Try pressing CTRL+ALT+F3, log in, and type: startx

      • Serg March 19, 2012 at 2:26 pm

        Ha! Its works, thank U.
        But the system works a little slow i think and its not so good animation etc.
        Maybe i need to start gnome also?
        And one little thing, I want to see my desktop from starting the system, without logging and starting X manually.

      • Anonymous Meerkat March 19, 2012 at 10:03 pm

        What graphics card do you have, and what display manager do you use?

  11. Serg March 19, 2012 at 10:23 pm

    Intel GMA 3150. Gnome

    • Anonymous Meerkat March 20, 2012 at 12:12 am

      ok, so you didn’t use any drivers for the soundcard? I meant display manager as in GDM, KDM, LXDM, LightDM, etc..

      • Serg March 20, 2012 at 8:24 am

        I’m not surely understand… U mean graphic card? Any way i didn’t install any drivers manually, when I install ubuntu its all works good. But when I update it last time it seems that drivers(or something else software) are erroneous. The best way to me is to find what drivers fails and undertow it.

      • Anonymous Meerkat March 20, 2012 at 4:57 pm

        yeah, sorry, I meant graphic card. I’m used to fixing sound problems lol.
        What version of Ubuntu do you have, and what release did you install (Ubuntu, Kubuntu, Lubuntu etc…)?

  12. Serg March 20, 2012 at 9:23 pm

    As I said i use Ubuntu 11.10.
    Can I just use same soft like few days before? I know that linux have some problems with drivers, but i don’t know that its dangerous to update the system if all works fine :)

  13. jorin71 August 15, 2012 at 1:10 pm

    I got a similar problem when upgrading from 12.04 to 12.10 (i386 desktop) and my problem was connected to my dual monitors – Ubuntu froze stone dead while booting. Your suggested solution helped me as well and a reconfiguration of X solved it. Now I am up and running again. Thank you!

  14. Thomas August 27, 2012 at 10:12 am

    worked for me!

  15. Chandan December 22, 2012 at 8:57 am

    My case is little different. I have a fresh install on of Lubuntu 12 LTS on Giada thin client (Atom based). The X did not work in live CD as well, still I installed and tried but no luck. However, if I try fedora 17 live CD it is able to get the GUI work. Any idea how to get it work?

  16. vladanma July 15, 2013 at 1:44 am

    Thank you

  17. Pingback: Diego Turcios: Something went wrong with my Ubuntu |

  18. krishna March 31, 2014 at 2:20 pm

    it worked. thank u

  19. Pingback: One monitor getting spilled over into other monitor: how to do a 100% reset of gnome graphics configuration | Some Ubuntu Questions and Answers

  20. Richard December 28, 2015 at 12:03 pm

    Thanks Dude !

    Just changed graphic card on linux mint rebecca, and Xorg was totally fucked up. Tried everything, and your fix worked !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: