Xserver keeps crashing on my general user account both in Unity 3D and 2D. It doesn't do it on the guest account.

That's why I want to reset / rollback everything xserver related, hoping this is going to fix it.

Most answers on this involve sudo dpkg-reconfigure xserver-xorg. However, this does nothing for me (generates no output) and I read in other forums, that it's deprecated.

So, what's the current way to reset all xserver / xorg options; what's the alternative to sudo dpkg-reconfigure xserver-xorg? X crashes during work, not before login or so. And the effect of a crash is, that I get thrown out of the session, not a freeze or machine crash.

  • @Jorge Castro The version of Ubuntu is important here, as things have changed. There is no more "gdm" and neither works the dpkg-reconfigure, I believe.
    – tha
    Commented Jul 4, 2012 at 21:08
  • have you tried resetting xorg.conf? (backup and remove)
    – psukys
    Commented Jul 24, 2013 at 11:10

4 Answers 4


If your guest account is not affected this could be a user-specific setting that is causing the problem. Try deleting ~/.config/monitors.xml

  • 1
    Thanks, but that didn't help. Actually I don't think it's the monitor settings, as the guest account doesn't crash, even when I configure both monitors ...
    – tha
    Commented Jul 4, 2012 at 20:03
  • OK, while that was not really it, the idea behind it solved my problem: one-by-one deleting files in ~/.config dir did work for me! :-) @Jorge Castro: if you modify your answer into this direction, I'll mark it "accepted"
    – tha
    Commented Jul 5, 2012 at 15:10
  • I have no idea what files you deleted, feel free to add all that information in the answer though, glad you got it sorted! Commented Jul 5, 2012 at 15:12
  • This helped me resolve some problems with fglrx (AMD CCCLE).
    – Nick
    Commented Feb 2, 2014 at 22:56
  • This helped on Manjaro for a listed but not supported display mode on Huawei Matebook 2020 AMD
    – Zalom
    Commented May 28, 2022 at 20:17

The alternative to sudo dpkg-reconfigure xserver-xorg is sudo X -configure


To reconfigure packages that are already installed, you can refer to:

Ubuntu Manpage: dpkg-reconfigure - reconfigure an already installed package

Using the terminal:

  1. If you've got to a blank screen while booting up, press CTRL + ALT + F1 to access the terminal.

    Then, depending on your desktop environment, terminate the X using:

    • For Gnome (Ubuntu): sudo /etc/init.d/gdm stop

    • For KDE (Kubuntu): sudo /etc/init.d/kdm stop

    • For Xfce (Xubuntu): sudo /etc/init.d/xdm stop

  2. For the reconfiguration process:

    sudo dpkg-reconfigure xserver-xorg

    Note: A backup is always recommended before running the configuration, so you can do it using:

    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
  3. Restart the GUI:

    Again, this depends on the desktop environment, so:

    • For Gnome (Ubuntu): sudo /etc/init.d/gdm start

    • For KDE (Kubuntu): sudo /etc/init.d/kdm start

    • For Xfce (Xubuntu): sudo /etc/init.d/xdm start

If fail to perform the above steps, one can always edit the /etc/X11/xorg.conf manually and replace the file contents.

Refer to:

  • 5
    For sudo /etc/init.d/gdm stop I get sudo /etc/init.d/gdm command not found and sudo dpkg-reconfigure xserver-xorg does not do anything for me, as I pointed out in the question. Thx for answering though ...
    – tha
    Commented Jul 4, 2012 at 19:21
  • @thomas Very strange, but just added the links were you can collect the default contents for the xorg.conf file. Perhaps manually setting the file contents can help you.
    – Zuul
    Commented Jul 4, 2012 at 20:52
  • 3
    In Ubuntu 12.04 the display manager is lightdm, not gdm. Why the dpkg-reconfigure doesn't work, I don't know! :-/
    – tha
    Commented Jul 4, 2012 at 21:04
  • @thomas Perhaps reinstalling the dpkg itself may allow you to use it!
    – Zuul
    Commented Jul 4, 2012 at 21:27
  • 1
    In my case, after the login screen, the screen was black. The steps outlined in this answer solved it. I had to login through SSH from another computer to enter the commands. Commented Jul 28, 2013 at 13:00

After trying all you guys mentioned here I solved the very same problem by setting ownership (and permissions) of .Xauthority and .ICEauthority (located inside: /home/username/ folder) back to my general user.

to check own/perm start tty1 (CTRL+ALT+1) and login, take superuser (sudo su) and:

cd /home/username/
ls -a -l 

in my case .Xauthority wasn't even readable by my general user, so first I had to chmod:

chmod 775 .Xauthority


chown username .Xauthority
chown username .ICEauthority

after this, reboot and try to login -- it worked for me.

Another note: I faced this problem after iterative experiments with xorg.conf and NVidia drivers - trying to setup 3 monitors with 2 cards. So, I spent huge amount of time trying to solve the problem playing around xserver and video settings -- while the reason of crash was totally unrelated.

  • 3
    chmod 775 on the authority files is the wrong thing to do™
    – guntbert
    Commented Sep 6, 2014 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .