Difference between revisions of "Xorg7"
(Begun to merge Xorg into Xorg7)
|Line 72:||Line 72:|
Depending on your hardware, Xorg may fail to detect your monitor capabilities correctly or you may simply wish to use a lower resolution than your monitor is capable of. The following settings are specified in the Monitor section:
Depending on your hardware, Xorg may fail to detect your monitor capabilities correctly or you may simply wish to use a lower resolution than your monitor is capable of.
The following settings are specified in the Monitor section:
|Line 91:||Line 92:|
Modes "1280x1024" "1024x768" "800x600"
Modes "1280x1024" "1024x768" "800x600"
=== Keyboard Settings ===
=== Keyboard Settings ===
Revision as of 20:58, 15 November 2006
- 1 Introduction
- 2 Installing Xorg
- 3 Configuring xorg
- 4 Editing xorg.conf
- 5 Running Xorg
- 6 X startup (/usr/X11R6/bin/startx) tweaking
- 7 Changes with modular Xorg
- 8 Troubleshooting
- 8.1 Keyboard Problems
- 8.2 A Quick Fix for the Bitstream-Vera Conflict
- 8.3 A Quick Fix for file conflicts in /usr/include
- 8.4 libgl-dri conflicts
- 8.5 Mouse wheel not working
- 8.6 Keyboard problems
- 8.7 KDM/GDM doesn't work
- 8.8 Missing libraries
- 8.9 Some packages fail to build and complain about missing X11 includes
- 8.10 Unable to load font '(null)'
- 8.11 KDE Taskbar/Desktop Icons Broken
- 8.12 Updating from testing version to current (missing files)
- 8.13 Problem with MIME types in various desktop environments
- 8.14 DRI stops working with Matrox cards
- 9 Links
Before beginning, make sure you do the following:
- Make sure that pacman is configured and refreshed.
- If you are running another x-server you can close it now.
- Make a note about third party drivers (e.g., nVidia or ATI drivers).
Now let us install Xorg:
# pacman -S xorg
If xorg installed ok, it's time to make
Before you can run xorg, you need to configure it so that it knows about your graphics card, monitor, mouse and keyboard. There are several routes.
To start up xorgconfig:
This will generate a new xorg.conf.
Answer the questions and the program makes the file for you. NB watch out for the question about your mouse device. The default device according to
/dev/mouse. However, you should change this to
/dev/input/mice. Otherwise, you may encounter the common problem of X freezing on when executed.
This program is not really good but it's a start and you can fill in special stuff manually afterwards.
hwd is a tool written by users in the Arch Linux community. It's basically a hardware detection tool that has multiple uses, one of which is setting up an X server. Fortunately, hwd is much more streamlined than
xorgconf and doesn't require any input at all.
First, you need to install it:
pacman -S hwd
Then you need to run it (as root) with the -x argument that tells it to generate an
This will not overwrite any existing xorg configuration file and instead creates a new file /etc/X11/xorg.conf.hwd (Alternatively, you could have used -xa flag which would have overwritten straight to xorg.conf). To use this, you must manually rename it:
mv xorg.conf.hwd xorg.conf
NB If you have an existing xorg.conf, you may wish to back up prior to running this command.
You can also use
Xorg -configure or X -configure
nVidia users can also use
when they have official nvidia drivers installed.
You may wish to edit the config after it's been generated. To open in your favourite text-editor, such as Vim (you need root privileges):
If you want to set up mouse wheel support, see How to set up mouse scroll wheel.
Depending on your hardware, Xorg may fail to detect your monitor capabilities correctly or you may simply wish to use a lower resolution than your monitor is capable of. You might want to lookup the following values in your monitor's manual before setting them. The following settings are specified in the Monitor section:
The following are specified in the Screen section:
Modes "1280x1024" "1024x768" "800x600"
Xorg may fail to detect your keyboard correctly. This might give problems with your keyboard layout or keyboard model not being set correctly.
To see a full list of keyboard models, layouts, variants and options, open.
To change the keyboard layout, use the XkbLayout option in the keyboard InputDevice section. For example if you have a keyboard with english layout:
Option "XkbLayout" "gb"
To change the keyboard model, use the XkbModel option in the keyboard InputDevice section. For exsample if you have a Microsoft Wireless Multimedia Keyboard:
Option "XkbModel" "microsoftmult"
You should set your monitor's actual display size. This is important for X to select the correct DPI according to your display resolution correctly. In the section
"Monitor" put in your display size in mm:
Section "Monitor" Identifier "Monitor0" ... DisplaySize 336 252 # 96 DPI @ 1280x960 ... EndSection
The formula for calculating the DisplaySize values is (screen width)*25.4/dpi and (screen height)*25.4/dpi. As an example, if you're running X with a resolution of 1024x768 and want a dpi of 96, use 1024*25.4/96 and 768*25.4/96.
# calc: (x|y)pixels * 25.4 / dpi # DisplaySize 168 126 # 96 DPI @ 640x480 # DisplaySize 210 157 # 96 DPI @ 800x600 # DisplaySize 269 201 # 96 DPI @ 1024x768 # DisplaySize 302 227 # 96 DPI @ 1152x864 # DisplaySize 336 252 # 96 DPI @ 1280x960 # DisplaySize 336 269 # 96 DPI @ 1280x1024 (non 4:3 aspect) # DisplaySize 420 315 # 96 DPI @ 1600x1200
Results can be checked by issuing following command which should return 96x96 dots per inch
xdpyinfo | grep resolution
If you wish to use 3rd party graphics drivers, do check first that the X server runs ok first. Xorg should run smoothly without official drivers, they are typically only needed for advanced features such as 3D accelerated rendering for games, dual-screen setups, and TV-out. See How to install NVIDIA driver for help with the nVidia drivers or ATI Radeon & Kernel 2.6 for ATI drivers.
There some tips for setting up fonts in XOrg Font Configuration.
Sample Xorg.conf Files
Anyone who has an Xorg.conf file written up that works, go ahead and post a link to it here for others to look at! Please don't inline the entire conf file, upload it somewhere else and link. Thanks!
- Shadowhand (nv and nvidia drivers): http://people.os-zen.net/shadowhand/configs/xorg.conf
- Cerebral (fglrx and radeon drivers): http://www.student.cs.uwaterloo.ca/~tjwillar/configs/xorg.conf
- raskolnikov (via unichrome and synaptics drivers): http://athanatos.free.fr/Arch/xorg.conf
This is done simply by typing:
The default X environment is rather bare, and you will typically seek to install window managers or desktop environments to supplement X.
If a problem occurs, then view the log at /var/log/Xorg.0.log. Be on the lookout for any lines beginning with (EE) which represent errors, and also (WW) which are warnings that could indicate other issues.
*Please Note* Using startx requires a ~/.xinitrc file, so that X knows what to run when it starts. Your best option is to copy /etc/skel/.xinitrc to your home directory and edit it. Comment out the 'exec' lines you don't want, and add or uncomment one for the WM you want to use.
In addition, you can also install twm and xterm (via pacman) which will be used as a fallback if ~/.xinitrc does not exist.
X startup (/usr/X11R6/bin/startx) tweaking
for X's option reference see
The following options have to be appended to the variable "defaultserverargs" in the /usr/X11R6/bin/startx file.
prevent X from listening on tcp:
getting rid of the gray weave pattern while X is starting and let X set a black root window:
enable deferred glyph loading for 16 bit fonts:
Note : If you start X with kdm, the startx script seems not executed. These options must be appended to the variable "ServerCmd" in the /opt/kde/share/config/kdm/kdmrc file.
Changes with modular Xorg
Most Common Packages
Note: A meta-package 'xorg' exists to pull in the most common packages needed - when you issue pacman -Syu to update from Xorg 6.8 it should update to this package.
Make sure you install drivers for mouse, keyboard and videocard. For mouse and keyboard, xf86-input-keyboard and xf86-input-mouse should get installed. Other xf86-input-* packages are available for different input devices.
For the videodriver, find out which driver is required and install the right xf86-video-* package. ATI and Nvidia users should install the non-free drivers for their hardware instead (How to install NVIDIA driver, ATI Radeon & Kernel 2.6).
To install all drivers in one run, the xorg-input-drivers and xorg-video-drivers are available.
OpenGL 3D Acceleration
X.Org 7.0 on archlinux uses a modular design for mesa, the OpenGL rendering system. Several implementations are available:
- libgl-dri: Opensource DRI OpenGL implementation. Falls back to software rendering when no DRI driver is installed
- some other driver providing libgl (ati, nvidia)
When pacman installs an application that needs mesa, it will install one of these packages. To be sure about the right library for your setup, install the library you want prior to installing Xorg. Installing the right package afterwards is also possible, though this gives some dependency errors sometimes, which can be ignored with the -d switch.
Glxgears and Glxinfo
These apps have moved into the mesa-apps package, and need to be installed after the upgrade if you want them back.
Changed paths (and configuration)
See this entry for additional upgrade info: http://www.archlinux.org/blog/2006/01/02/how-to-upgrade-xorg/
Modular X.Org 7 installs everything in
/usr, where the older versions installed in
/usr/X11R6. Several configuration files need updates:
- Fontpaths live in /usr/share/fonts now
- RGB database is in /usr/share/X11/rgb
- module path is /usr/lib/xorg/modules
Also note that some X configuration tools might stop working. The easiest way to configure X.org is installing the correct driver packages and run Xorg -configure, which results in a
/root/xorg.conf.new which only needs modification in the resolutions, mouse configuration and keyboard layouts.
Some packages have hardcoded references to
/usr/X11R6. These packages need fixing. In the meanwhile, look what packages install files in
/usr/X11R6, uninstall those, make a symlink from
/usr/X11R6 and reinstall the affected packages. Another option is to move the contents of
/usr and make the symlink.
Or you can just add a second module path via, <code/>ModulePath "/usr/X11R6/lib/modules"</code> This works e.g. for Nvidia 76.76
Autogenerated xorg.conf files may cause you problems. If you cannot get to tty1 by holding CTRL ALT and pressing F1 or cannot get the £ sign for gb people, check to see if the following entries are in your /etc/X11/xorg.conf:
Option "XkbLayout" "uk" #"uk" is not a real layout, look in /usr/share/X11/xkb/symbols/ for a list of real ones. Option "XkbRules" "xfree86" #this should be "xorg" Option "XkbVariant" "nodeadkeys" #This line is also known to cause the problems described, try commenting it out.
To switch between layouts with Alt+Shift:
Option "XkbOptions" "grp:Alt_shift_toggle,grp_led:scroll"
A Quick Fix for the Bitstream-Vera Conflict
If you see a message that ttf-bitstream-vera conflicts with xorg:
- Exit the pacman session by answering no.
pacman -Rd xorg
pacman -S xorg
- Update your paths in /etc/X11/xorg.conf
A Quick Fix for file conflicts in /usr/include
If you see messages about file conflicts in /usr/include/X11 and /usr/include/GL:
The symlinked directories removed by this operation are replaced by real directories in the new xorg package, causing these file conflicts to appear.
If you get a message similar to:
:: libgl-dri conflicts with nvidia-legacy. Remove nvidia-legacy? [Y/n]
this is due to the multiple OpenGL implementations explained in the OpenGL section above - pacman is attempting to install libgl-dri to satisfy this dependency, but also trying to upgrade your existing video driver, and they conflict. To solve, try:
- Updating your video driver before a full system update:
pacman -S nvidia-legacy pacman -Syu
Or, if that doesn't work,
- Remove your existing video driver, do the update, then reinstall your driver:
$ pacman -Rd nvidia-legacy $ pacman -Syu $ pacman -S nvidia-legacy :: nvidia-legacy conflicts with libgl-dri. Remove libgl-dri? [Y/n] Y
Mouse wheel not working
The "Auto" protocol doesn't seem to work properly in Xorg 7 anymore. In the InputDevice section for your mouse, change:
Option "Protocol" "auto"
Option "Protocol" "IMPS/2"
Option "Protocol" "ExplorerPS/2"
Intellimouse (ExplorerPS/2) users might find their scroll and side buttons aren't behaving as they used to. Previously xorg.conf needed:
Option "Buttons" "7" Option "ZAxisMapping" "6 7"
and users also had to run xmodmap to get the side buttons working with a command like:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
Now xmodmap is no longer required. Instead, make xorg.conf look like this:
Option "Buttons" "5" Option "ZAxisMapping" "4 5" Option "ButtonMapping" "1 2 3 6 7"
and the side buttons on a 7-button Intellimouse will work like they used to, without needing to run xmodmap (see http://www.nabble.com/Re:-ms-intellimouse-not-working-right-p2718900.html)
Some keyboard layouts have changed. I wondered why:
- I wasn't able to Ctrl+Alt+Fx to switch to console
- I wasn't able to use layouts
The problem was that sk_qwerty layout doesn't exist anymore. I had to replace
Option "XkbLayout" "us,sk_qwerty"
Option "XkbLayout" "us,sk" Option "XkbVariant" ",qwerty"
Another thing to look for if your keyboard isn't properly functioning is the XkbRules option:
You'll need to change
Option "XkbRules" "xfree86"
Option "XkbRules" "xorg"
AltGR (Compose Key) not working properly
If, after the update, you can't use the altGr key as expected anymore, try adding this to your keyboard section:
Option "XkbOptions" "compose:ralt"
This is not the correct way to activate the AltGr Key on a german keyboard (for example to use the '|' and '@' keys on german keyboards). Just choose a valid keyboard variant for it to work again, for example (the example is for a german keyboard):
Option "XkbLayout" "de" Option "XkbVariant" "nodeadkeys"
The solutions above don't work on an italian keyboard. To activate the AltGr key on an italian keyboard make sure you have the following lines set up properly:
Driver "kbd" Option "XkbRules" "xorg" Option "XkbVariant" ""
Can't set qwerty layouts using the setxkbmap command
After the update, there aren't qwerty layouts as for example sk_qwerty. If you want to switch your present keyboard layout to any qwerty keyboard layout use this command:
setxkbmap NAME_OF_THE_LAYOUT qwerty
e.g.: for sk_qwerty use:
setxkbmap sk qwerty
After the update, trying the above command I had this message "Error loading new keyboard description". I find out that the xserver doesn't have the rights to write, execute, read in the directory /var/tmp So give the permissions to that directory. Restart the xserver and you will have your deadkeys back! Don't believe? Try out the code e.g.: it layout
setxkbmap -layout it
Setup French Canadian (old ca_enhanced) layout
With Xorg7, "ca_enhanced" is no more. You have to do a little trick to get the same layout that you are use to: Switch the old:
Option "XkbLayout" "ca_enhanced"
Option "XkbLayout" "ca" Option "XkbVariant" "fr"
It will be similar with other layout I presume. You can refer to Gentoo HowTo there: http://www.gentoo.org/proj/en/desktop/x/x11/modular-x-howto.xml
KDM/GDM doesn't work
Note: you might instead wish to switch to SLIM; which I find easier to "get how you want it"(just set up a custom session by putting progs in .xinitrc for example) is much smaller & faster and which fixes a lot of crash-bugs iv'e had with both KDM/GDM and ati(fglrx).
KDM/GDM is failing to start because it searches for X in the wrong place.
- Config File Fixes: Edit the appropriate config files for KDM/GDM. (probably better solution)
For GDM edit the gdm.conf file and replace all occurances of /usr/X11R6/bin/X to /usr/bin/X
Replace command for vi
I'm not quite sure where/what config files to change for KDM. YMMV
- Symlink Method: you might have to run following commands to fix it:
mkdir -p /usr/X11R6/bin/ ln -s /usr/bin/X /usr/X11R6/bin/X
now, try it again, it should work.
If the above does not work, this might:
ln -s /usr/bin/ /usr/X11R6/bin
If it still fails to start, sometimes a reboot is required.
- Help! I get an error message running my favourite app saying "libXsomething" doesn't exist!
In most cases, all you need to do is take the name of the library (eg libXau.so.1), convert it all to lowercase, remove the extention, and pacman for it:
pacman -S libxau
This will install the library you're missing, and all is well again!
Some packages fail to build and complain about missing X11 includes
Just reinstall the packages xproto and libx11, even if they are already installed.
Unable to load font '(null)'
- Some programs don't work and say unable to load font `(null)'.
These packages would like some extra fonts. Some programs only work with bitmap fonts. Two major packages with bitmap fonts are available, xorg-fonts-75dpi and xorg-fonts-100dpi. You don't need both, one should be enough. To find out which one would be the best in your case, try this:
xdpyinfo | grep resolution
and grab what is closer to you (75 or 100 instead of XX)
pacman -S xorg-fonts-XXdpi
KDE Taskbar/Desktop Icons Broken
- KDE taskbar doesn't work and the desktop icons disappear
Install the packages libxcomposite and libxss.It will be fine.
pacman -S libxcomposite libxss
Updating from testing version to current (missing files)
If you've updated from Xorg 7 in testing to Xorg 7 in current and are finding that many files seem to be missing (including startx, /usr/share/X11/rgb.txt, and others) you may have lost many files due to the xorg-clients package splitting from a single package into many smaller sub-packages.
You need to reinstall all the packages that are dependencies of xorg-clients:
pacman -S xorg-apps xorg-font-utils xorg-res-utils xorg-server-utils \ xorg-twm xorg-utils xorg-xauth xorg-xdm xorg-xfs xorg-xfwp \ xorg-xinit xorg-xkb-utils xorg-xsm
This should fix the problem.
Problem with MIME types in various desktop environments
If you noticed icons missing and can't click-open files in desktop environments, add the following lines to /etc/profile or your preferred init script and reboot.
XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share export XDG_DATA_DIRS
DRI stops working with Matrox cards
If you use a Matrox card and DRI stops working after upgrading to xorg7, try adding the line
Option "OldDmaInit" "On"
to the Device section that references the video card in xorg.conf.
- Enabling a DM
- Start X at boot
- XOrg Font Configuration
- Proprietary Video Drivers
- Desktop Environment
- Gavins quickguide for dummies like me