HOWTO Modular Xorg
From Gentoo Linux Wiki
| Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
|
|
|
Configuration
HIDevices Fonts Video Cards
OpenGL Compositing |
| edit |
[edit] Introduction
This is a guide to Modular Xorg, mainly dealing with special circumstances and troubleshooting.
This article is currently being maintained by AllenJB. If you have suggestions for additions or fixes, please post them to the discussion and bugs page.
Please see also the official Modular Xorg Upgrade Guide.
[edit] Preparation
Firstly it'll be useful to know what version of Xorg you're going to be emerging. If you don't know, run emerge -p xorg-x11 to find out.
[edit] Nvidia Drivers
The old nvidia-glx and nvidia-kernel packages have been replaced by a single nvidia-drivers package. If you're still using the old packages, you'll want to upgrade to the new package first, as the old ones will not work with modular Xorg, by running:
# emerge -Ca nvidia-glx nvidia-kernel # emerge nvidia-drivers # eselect opengl set nvidia
[edit] Backup
Because Xorg is such a key part of a desktop system, you'll want to backup your current install before continuing. To do this we're going to use the quickpkg command from the gentoolkit package: emerge -a gentoolkit; quickpkg xorg-x11
If you want to find out more about the quickpkg tool, run: man quickpkg
[edit] Restoring the backup
To restore your backed-up package run: emerge --usepkgonly -a =xorg-x11-6.8.2-r8
If you can't remember the exact version you can find it out by running: ls /usr/portage/packages/All/xorg-x11*
You then want to re-emerge all the packages listed in ~/usr-x11r6-packages.
[edit] Uninstall old X.org
- Once you clean out the current (old) X, until the new X is installed, you will not be able to start any X applications. The applications depending on X currently running are just running off the memory of X. Once closed, they cannot be re-opened until the new X is installed.
- Programs currently running in X may become unstable during the install. For example, Firefox may unexpectedly crash due to not being able to find fonts which are no longer there, or other similar reasons.
Uninstall your current xorg install by running: emerge -Ca xorg-x11 virtual/x11
[edit] /usr/X11R6 symlink
The /usr/X11R6 directory is now a symlink to /usr. Run ls -l /usr/X11* and check that it should looks like this:
lrwxrwxrwx 1 root root 6 Mar 27 2005 /usr/X11R6 -> ../usr
If it doesn't, create a list of packages that have files in the /usr/X11R6 directory and then remove the existing directory by running:
if [[ ! -L /usr/X11R6]] ; \ then equery belongs /usr/X11R6 > ~/usr-x11r6-packages \ && rm -rf /usr/X11R6; fi
[edit] Remove /usr/lib/X11/xkb
The following is a requirement of the xkeyboard-config package.
32-bit Users: Run ls -l /usr/lib/X11/xkb and if it exists, delete it with rm -r /usr/lib/X11/xkb
[edit] Emerge Modular X.org
[edit] Device Drivers
Modular Xorg introduces a new system for managing the driver packages for your devices. You need to set the appropriate VIDEO_CARDS and INPUT_DEVICES flags in /etc/make.conf. To see what flags are available, run emerge -upv xorg-x11. On a typical machine with an Nvidia video card, it might look like this:
| File: /etc/make.conf |
INPUT_DEVICES="keyboard mouse" VIDEO_CARDS="nv nvidia vesa" |
The nv driver is the open source unofficial driver that lacks 3D acceleration. The nvidia driver is the official nvidia-drivers package.
On an ATI System, the VIDEO_CARDS line should be like this (unless you don't wish to use proprietary drivers fglrx):
| File: /etc/make.conf |
VIDEO_CARDS="radeon fglrx vesa" |
Add the dri USE flag to /etc/make.conf to enable Direct Rendering support, which most graphics drivers use.
[edit] Installation
Now run emerge -Dvat xorg-x11 to install modular Xorg.
A few useful X11 tools that used to be included in the 6.8 build are now their own packages, you can emerge all of them now by running: emerge -DuNav xev xdpyinfo xvinfo xset xdriinfo xprop
If you would like some extra fonts, you can emerge them now also:
emerge -DuNav font-adobe-100dpi font-adobe-75dpi \ font-bh-lucidatypewriter-100dpi font-bh-lucidatypewriter-75dpi \ font-bitstream-100dpi font-bitstream-75dpi ttf-bitstream-vera \ corefonts sharefonts freefonts
[edit] Features Apparently Missing
[edit] Keyboard Mappings
There may be people who will search for the ca_enhanced keyboard mapping in Xorg 7.0. It has not disappeared, it just changed names to ca(fr), as with this keyboard configuration:
| File: /etc/X11/xorg.conf |
Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "ca(fr)"
EndSection
|
Notice that Option "XkbRules" "xfree86" won't work for modular xorg-x11. You have to change it to "xorg", or many keys will not produce the desired effect.
In case you defined a custom xkb model (e.g. if you added a diNovo keyboard), check if you modified /usr/share/X11/xkb and not /usr/lib/X11/xkb.
If your X server is restarting each time you pressed a non dead key, add the following link:
# ln -s /usr/share/X11/XKeysymDB /usr/lib/X11/XKeysymDB
[edit] Problems and Solutions
[edit] OpenMotif fails to emerge
If building of openmotif fails run: emerge -DuNav --oneshot printproto xbitmaps libXp
Then restart the emerge using: emerge --resume
[edit] GL Issues
Problems building xorg-server, glx, and other GL-related packages in modular X may be due to a multilib issue.
The first thing to try is to update eselect-opengl to at least 1.0.3.
Next check your opengl implementation with eselect opengl list. If xorg-x11 isn't the only option, you probably want the alternate option, so change it with: eselect opengl set <implementation>
[edit] xorg-server tries to build every single input driver
Solution: You need to specify which drivers you want by modifying /etc/make.conf to reflect your hardware. If nothing is specified, it will build them all!
Example:
| File: /etc/make.conf |
INPUT_DEVICES="keyboard mouse synaptics evdev" |
[edit] Mouse Acceleration Uncontrollable with evdev Driver
It is currently not possible to set speed with xorg without a patch which is in the xorg bugtracker, but you can set acceleration.
Please see TIP Setting Mouse Speed Through Command Line for more information.
[edit] Mouse Wheel No Longer Works
Please see the Modular XOrg section of HOWTO Advanced Mouse for more extensive information.
[edit] Xorg won't start due to fglrx or nvidia module missing
Re-emerge the appropriate drivers (ati-drivers or nvidia-drivers) to get X running again after the install. Make sure you recompile the the drivers with same compiler you used for the kernel, otherwise you'll get message about the module format being incompatible when you try to load the fglrx kernel module.
[edit] Matrox G550, Xinerama and mga driver
The install script of the binary drivers available from Matrox (v4.4 at the time of writing) copies the driver files to
/usr/lib/modules/drivers
instead of
/usr/lib/xorg/modules/drivers
Copy the correct files (mga_drv.so/mga_hal_drv.so) manually to get Xinerama working again.
Or use this script: http://www.tuxx-home.at/projects/mga/mga_xorg7_installer.run
p.s. The script will complain that it's outdated, but it still works with the latest xorg-x11 7.1.1
If you get this:
(EE) module ABI major version (0) doesn't match the server's version (1) (EE) MGA: Failed to load module "mga_hal" (module requirement mismatch, 0) (EE) MGA(0): HALLib not loaded! NOT using "Merged Framebuffer" mode.
A "-ignoreABI" parameter to X is needed so the HALlib would work, follow the link to insert it properly: TIP XOrg 7.1 With Older NVidia Drivers#Running X
[edit] Problems with the keyboard
The AltGr key and/or other national special keys may stop working after an update to modular X. To fix this, unmerge the new xkeyboard-config and re-emerge the xkbdata package which contains correct translations for that key.
If the above fix doesn't work, you can also try running: xmodmap -e "keycode 113 = Mode_switch"
Sometimes it can happen that GNOME / KDE keyboard layout switching doesn't work. To correct this, create xkb as a symbolic link in the /usr/lib64/X11 lib directory with:
cd /usr/lib64/X11 ln -s /usr/share/X11/xkb/ xkb
[edit] Missing fonts
There are X11 fonts that may be in use but not available. See the Xorg and fonts HOWTO and install the listed fonts.
[edit] Configuration file locations have changed
All of the configuration files and scripts in Xorg-6.8 were stored in /etc/X11, which was not standard. In modular Xorg, all of the configuration files are in the same place but configuration scripts and default files have moved to /usr/lib/X11/ and /usr/share/X11.
When upgrading, since /etc is config-protected, your old configuration files would not have been removed -- this means you'll have some extra files in there that look right but don't do anything.
Also, these new locations are NOT config-protected, so when making changes to say, app-defaults/XTerm-color, be sure to add CONFIG_PROTECT="/usr/share/X11/app-defaults" to /etc/make.conf. Or when updating the init for xdm, it would be a good idea to copy that file from /usr/lib/X11/xdm/Xsetup_0 to /etc/X11/xdm/ and update /etc/X11/xdm/xdm-config accordingly.
[edit] Other problems and solutions
Please see Gentoo's bug tracker and the official modular X howto.
If none of the above helps generating a new xorg.conf may solve your problems.
X -configure
[edit] Discussion
Concerns or Compliments? Please use the Discussion section.
[edit] Related Articles
[edit] Graphics
[edit] Input Devices
- HOWTO Mouse Scrollwheel
- HOWTO Advanced Mouse
- HARDWARE Logitech V200 Cordless Mouse
- Mx510
- HOWTO Use Multimedia Keys
- HOWTO_Wacom_Tablet
- HOWTO_Aiptek_Tablet
