As Ubuntu 10.10 seems to neither detect my graphics card (Intel 82852/855GM) automatically nor use the corresponding Intel driver even after manually installing it, I am looking into manually configuring X (shouldn't I?). Where can I find the configuration files I need to edit?

  • 6
    Even if you come up with a solution, don't forget to file a bug on Launchpad so that this hardware configuration can be made to work out of the box in future Ubuntu releases.
    – ændrük
    Commented Sep 24, 2010 at 2:14
  • 1
    We deliberately don't load the intel driver on your hardware because it is too unstable. See this answer: askubuntu.com/questions/4658/…
    – RAOF
    Commented Apr 29, 2011 at 8:02

8 Answers 8


The xorg.conf does not exist by default any more. You CAN create one though.

Boot into recovery mode and select Root Shell. Then run:

X -configure


cp /root/xorg.conf.new /etc/X11/xorg.conf

Reboot and you can edit the new Xorg.conf.

  • 7
    This is the correct way. It is just that X now auto-detects the settings, and a xorg.conf is not mandatory. If you know what you want to edit, by all means create one. Commented Sep 24, 2010 at 2:10
  • 12
    There is absolutely no reason to reboot even once. Just open terminal, write sudo X -configure; sudo cp ... and sudo /etc/init.d/gdm restart (assuming Ubuntu, not KUbuntu).
    – Olli
    Commented Mar 19, 2011 at 13:31
  • 6
    @Olli; it doesn't work, you need the X server to be inactive for X -configure to run
    – JRG
    Commented Jun 5, 2011 at 0:46
  • 18
    Josh G: If you are already running X, just say X :1 -configure. You have to open the X server on its own display port; if you already have an X server running, the default port of :0 will fail, so you have to specify display :x (where x is the first available display; in most cases 1). Commented Mar 21, 2012 at 18:45
  • 8
    When running X :1 -configure I have the error : Number of created screens does not match number of detected devices. Configuration failed. ddxSigGiveUp: Closing log Server terminated with error (2). Closing log file.
    – chmike
    Commented Feb 4, 2013 at 14:37

The configurations files are at /usr/share/X11/xorg.conf.d

They are:






Check the current manual.

If you create a xorg.conf file the configurations of this file will prevail.
Also check this answer.


Usually, you don't need the xorg.conf any more.

If you need to configure some devices anyway, you can do so by placing a file in the /usr/lib/X11/xorg.conf.d/ (Ubuntu 10.04) or /usr/share/X11/xorg.conf.d/ (since Ubuntu 10.10). There are some files in this directory already.

You can find more information on xorg.conf.d (in german, but the configuration files are in english of course). What is important is that the filenames should start with a two-digit number greater than 10.

Another guide - in english - is on x org archive. It's still using /usr/lib but it's good.

  • 1
    Good point and the rigth way to go. The Arch Wiki also has more on this too (wiki.archlinux.org/index.php/Xorg#Display_Size_and_DPI) though their X server is configured to use /etc/X11/xorg.conf.d/ which makes more sense to me. Commented Dec 16, 2011 at 20:35
  • 1
    In Ubuntu, user-added Xorg options should also go into /etc/X11/xorg.conf.d/ files. You'll have to create that directory first, but it works, and is actually mentioned in Ubuntu's /usr/share/X11/xorg.conf.d/* files.
    – tanius
    Commented Feb 25, 2015 at 3:45
  • 1
    So many upvotes, but while this answer will work, it is still incorrect, IMHO. The distribution places its X configuration files in /usr/lib/X11/xorg.conf.d, but per the Filesystem Hierarchy Standard, "/usr is [for] shareable, read-only data.... Any information that is host-specific or varies with time is stored elsewhere." To override the system config, the host configuration should be in /etc/X11/xorg.conf or /etc/X11/xorg.conf.d as in the accepted answer and @tanius comment above. Commented Jun 9, 2022 at 21:50

cookiecaper's suggestion to use

sudo X :1 -configure

worked for me - right from the desktop! It did finally error-out, but not before providing a nice new xorg.conf.new in my Home directory. Thanks cc! All the other suggestions I had tried failed to produce a file.

Oh, by the way,

man xorg.conf

in the terminal will provide a bunch of useful, and up to date, info (a bit terse, perhaps) on editing the xorg.conf file.

  • X -config /root/xorg.conf.new
    – noobninja
    Commented Aug 20, 2015 at 22:35
  • 1
    It removed my second monitor from my PC. No easy fix for that one, so I guess I have to reinstall ubuntu. Nice one.
    – Simon
    Commented Aug 16, 2016 at 10:12
  • 2
    @Simon seriously? Did you try to just undo what you did? (ie, remove the /etc/X11/xorg.conf file?) Read desgua's answer, it explains how the newly created xorg.conf will override all other settings for XOrg. Commented Oct 23, 2016 at 5:18

This works fine for me with Nvidia Optimus (Bumblebee) without any special configuration, just the defaults:

# Source: https://bbs.archlinux.org/viewtopic.php?id=140315

r=`zenity --width 400 --height 250 --title "Display setup" --text "Choose display mode:" --list --column "Modes" "Internal" "External" "Clone" "Extended"`

case "$r" in
    xrandr --output LVDS1  --auto \
           --output VGA1 --off ;;
    xrandr --output LVDS1  --off \
           --output VGA1 --auto ;;
    xrandr --output LVDS1  --auto \
           --output VGA1 --auto --same-as LVDS1 ;;
    xrandr --output LVDS1  --auto --primary \
           --output VGA1 --auto --left-of LVDS1 ;;

The monitors LVDS1 and VGA1 are defined in ~/.config/monitors.xml. For more information about monitors.xml take a look at http://www.sudo-juice.com/dual-monitor-settings-in-ubuntu/.


<monitors version="1">
  <output name="LVDS1">
  <output name="VGA1">
  <output name="HDMI1">
  <output name="DP1">

Yeah for most free graphics drivers, recent releases of Ubuntu haven't required a xorg.conf file. You can generate one pretty easily though:

sudo Xorg -configure

For lost amd users: Please note that amd drivers provide a tool to generate xorg.conf

aticonfig --initial
  • aticonfig is proprietary; it does not install with xserver-xorg-video-ati. AMD/ATI users can use xrandr to configure displays.
    – noobninja
    Commented Aug 20, 2015 at 22:45

For users running Ubuntu 19.10, I can confirm that adding a configuration file by booting into recovery, selecting root shell, then running:

X -configure

Then entering:

cp /root/xorg.conf.new /etc/X11/xorg.conf

will both allow you to edit the configuration file, and fixes the common dual-monitor mouse flickering issue.

You must log in to answer this question.

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