В начало → Gentoo и X.Org → Описание настройки МОДУЛЬНОГО X-сервера версий 7.X (Англ.) |
Ссылка на оригинал: http://gentoo-wiki.com/HOWTO_Modular_Xorg
С версии: 1.0
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.
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.
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
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
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
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
.
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
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
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:
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):
Add the dri USE
flag to /etc/make.conf
to enable Direct Rendering support, which most graphics drivers use.
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
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
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>
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!
Please see TIP Setting Mouse Speed Through Command Line for more information.
Please see the Modular XOrg section of HOWTO Advanced Mouse for more extensive information.
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.
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.
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
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.
В начало → Gentoo и X.Org → Описание настройки МОДУЛЬНОГО X-сервера версий 7.X (Англ.) |