В началоGentoo и  X.Org → Описание настройки МОДУЛЬНОГО X-сервера версий 7.X (Англ.)
Gentoo-doc HOME Пред.: Gentoo и  X.OrgВ началоУровень выше: Gentoo и  X.OrgСлед.: XkbOptions

2. Описание настройки МОДУЛЬНОГО X-сервера версий 7.X (Англ.)

Ссылка на оригинал: http://gentoo-wiki.com/HOWTO_Modular_Xorg

С версии: 1.0

2.1. 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.

2.2. 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.

2.2.1. 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

2.2.2. Masking Xorg 7.1 (optional)

If your system is going to install xorg-x11-7.1 and you wish to use xorg-x11-7.0 instead you'll need to add the following to /etc/portage/package.mask (create it if it doesn't exist):

# Mask xorg 7.1
>=x11-base/xorg-x11-7.1
>=x11-base/xorg-server-1.1.0
>=x11-drivers/xf86-input-evdev-1.1.2-r1
>=x11-drivers/xf86-video-vesa-1.2.0
>=x11-drivers/xf86-input-mouse-1.1.1
>=x11-drivers/xf86-input-keyboard-1.1.0
>=x11-drivers/xf86-video-tdfx-1.2.0

2.2.3. 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

Additionally, create a list of packages that have files in the Xorg specific directories by running:

if [[ ! -L /usr/X11R6 ]]; \
then equery belongs /usr/X11R6 > ~/usr-x11r6-packages \
&& rm -rf /usr/X11R6; fi

2.2.4. 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.

2.2.5. Uninstall old X.org

Внимание

If you are reading this from the same machine you will be upgrading X on, keep in mind two things:

After cleaning out the old X, and before the new X is installed, you will not be able to start any X applications as X is not technically installed. The applications depending on X currently running are just running off the memory of X. Closing them will not enable you to re-open them 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.

It is hence highly recommended that you print out a copy of this guide (or save a tree and open this guide on a console (not in X)) before you begin. Your programs should go back to behaving normally once the install is complete, however you may want to restart X as soon as possible afterwards.

Uninstall your current xorg install by running: emerge -Ca xorg-x11

2.2.5.1. /usr/X11R6 symlink

Run ls -l /usr/X11* and check that /usr/X11R6 is a symlink to /usr. It should look something like this:

lrwxrwxrwx 1 root root 6 Mar 27  2005 /usr/X11R6 -> ../usr

If it doesn't, delete it and recreate it by running: cd /usr && ln -s ../usr X11R6

2.2.5.2. 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

2.3. Emerge Modular X.org

2.3.1. 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:

Листинг 16. 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):

Листинг 17. 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.

2.4. 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-adobe-utopia-100dpi \
font-adobe-utopia-75dpi font-bh-100dpi font-bh-75dpi font-bh-type1 \
font-bh-lucidatypewriter-100dpi font-bh-lucidatypewriter-75dpi \
font-bitstream-100dpi font-bitstream-75dpi ttf-bitstream-vera \
corefonts sharefonts freefonts font-ibm-type1

2.4.1. 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:

Листинг 18. 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

2.4.2. OpenMotif fails to emerge

If building of openmotif fails run: emerge -DuNav --oneshot printproto xbitmaps libXp

Then restart the emerge using: emerge --resume

2.5. GL Issues

2.5.1. 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>

2.5.2. 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!

Листинг 19. File: /etc/make.conf

INPUT_DEVICES="keyboard mouse synaptics evdev"


2.5.3. Mouse Speed Uncontrollable with evdev Driver

Please see TIP Setting Mouse Speed Through Command Line for more information.

2.5.4. Mouse Wheel No Longer Works

Please see the Modular XOrg section of HOWTO Advanced Mouse for more extensive information.

2.5.5. 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.

2.5.6. 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.

2.5.7. 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

2.5.8. 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.

2.6. 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.

2.7. 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
Пред.: Gentoo и  X.OrgВ началоУровень выше: Gentoo и  X.OrgСлед.: XkbOptions
В началоGentoo и  X.Org → Описание настройки МОДУЛЬНОГО X-сервера версий 7.X (Англ.)