Where is the X.org config file? How do I configure X there?
Matthew Harrington
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?
28 Answers
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 -configureThen:
cp /root/xorg.conf.new /etc/X11/xorg.confReboot and you can edit the new Xorg.conf.
16The configurations files are at /usr/share/X11/xorg.conf.d
They are:
10-evdev.conf
11-evdev-quirks.conf
50-vmmouse.conf
50-wacom.conf
51-synaptics-quirks.conf
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.
3cookiecaper's suggestion to use
sudo X :1 -configureworked 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.confin the terminal will provide a bunch of useful, and up to date, info (a bit terse, perhaps) on editing the xorg.conf file.
3This works fine for me with Nvidia Optimus (Bumblebee) without any special configuration, just the defaults:
#!/bin/bash
#
# Source:
#
r=`zenity --width 400 --height 250 --title "Display setup" --text "Choose display mode:" --list --column "Modes" "Internal" "External" "Clone" "Extended"`
case "$r" in
Internal) xrandr --output LVDS1 --auto \ --output VGA1 --off ;;
External) xrandr --output LVDS1 --off \ --output VGA1 --auto ;;
Clone) xrandr --output LVDS1 --auto \ --output VGA1 --auto --same-as LVDS1 ;;
Extended) xrandr --output LVDS1 --auto --primary \ --output VGA1 --auto --left-of LVDS1 ;;
esacThe monitors LVDS1 and VGA1 are defined in ~/.config/monitors.xml. For more information about monitors.xml take a look at .
Example:
<monitors version="1"> <configuration> <clone>no</clone> <output name="LVDS1"> <vendor>AUO</vendor> <product>0x213c</product> <serial>0x00000000</serial> <width>1366</width> <height>768</height> <rate>60</rate> <x>1280</x> <y>256</y> <rotation>normal</rotation> <reflect_x>no</reflect_x> <reflect_y>no</reflect_y> <primary>yes</primary> </output> <output name="VGA1"> <vendor>GSM</vendor> <product>0x43ff</product> <serial>0x00035928</serial> <width>1280</width> <height>1024</height> <rate>60</rate> <x>0</x> <y>0</y> <rotation>normal</rotation> <reflect_x>no</reflect_x> <reflect_y>no</reflect_y> <primary>no</primary> </output> <output name="HDMI1"> </output> <output name="DP1"> </output> </configuration>
</monitors> 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 1 For users running Ubuntu 19.10, I can confirm that adding a configuration file by booting into recovery, selecting root shell, then running:
X -configureThen entering:
cp /root/xorg.conf.new /etc/X11/xorg.confwill both allow you to edit the configuration file, and fixes the common dual-monitor mouse flickering issue.