HowTo:ConfigGraficos:Xorg15
De Luispa
Actualización a Xorg 1.5
((aquí encontrarás una copia de varios de mis ficheros de configuración ))
La última actualización automática de portage (emerge --sync) me ha traido (5/4/09) una novedad interesante. Al hacer un emerge -DuvNp world veo que el número de actualizaciones que "p"retendería realizar es inusualmente alto. La noticia viene por la liberación como "estable" de la nueva versión de Xorg-Server, la 1.5, en concreto x11-base/xorg-server-1.5.3-r5. Hasta ahora yo tenía instalada la versión x11-base/xorg-server-1.3.0.0-r6
De hecho me sorprende ver algo nuevo que nunca había visto. Al final me encuentro esta línea:
* IMPORTANT: 1 news items need reading for repository 'gentoo'.
Con el comando siguiente puedo leer:
# eselect news list Unread news items: 2009-04-06-x_server-1_5 Migration to X.org Server 1.5 # eselect news read 2009-04-06-x_server-1_5 2009-04-06-x_server-1_5 Title Migration to X.org Server 1.5 Author Remi Cardona <remi@gentoo.org> Author Christian Faulhammer <fauli@gentoo.org> Posted 2009-04-06 Revision 1 A lot of changes regarding device recognition and use by the X server have been introduced in the 1.5 update. As that version is going stable on all architectures, users should read the upgrade guide [0] before actually updating the package. [0] http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.5-upgrade-guide.xml
Actualización
He leido y seguido lo indicado en la guía anterior. En pocas palabras, se ha cambiado por completo la forma en la que se configura el hardware para el Servidor Xorg. Hasta ahora todo se indicaba en el fichero xorg.conf. Con la nueva versión se pasa a utilizar HAL (Hardware Abstraction Layer). HAL va a "detectar" las mismas propiedades que se definían en el xorg.conf, ahora bien, con mucha más flexibilidad. El driver que se encarga de esta nueva forma de trabajo es xf86-input-evdev.
No todo podían ser buenas noticias. Hay que leer mucho en internet ya que el cambio es importante. De hecho se pueden eliminar muchísimas líneas del xorg.conf o incluso eliminarlo entero. En mi caso, al tener una tarjeta NVidia, he dejado un xorg.conf con lo suficiente para la parte de la tarjeta gráfica.
Otro tema importante es que se puede pedir a Xorg que NO use HAL, sino que siga como hasta ahora. En mi caso he optado por el futuro y he decidido apostar por HAL y la nueva forma de trabajar. Eso sí, hay que estudiar cómo hacer ficheros de HAL. De hecho te recomiendo que te apuntes este enlace a un fichero de configuración de HAL, que documenta bastante bien cómo hacerlos.
Preparación
Después de leer detenidamente la guía de Gentoo para Xorg 1.5 detallo a continuación cada uno de los pasos que he ido realizando.
- Me salvo mi xorg.conf por si acaso.
# cp /etc/X11/Xorg.conf /etc/X11/xorg.conf.previo-1.5
- Creo el nuevo xorg.conf para Xorg 1.5
# nano /etc/X11/xorg.conf
- Verifico que ya tenía el soporte de Event interface en el kernel
| Configuración del kernel de Linux: System V IPC |
Device Drivers ---> Input device support ---> [*] Event interface |
- Creo el fichero para el teclado en Español, para HAL, para Xorg. La fuente está aquí.
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<!-- The way this works:
Match against some input device (see the HAL specification for more
information), and then merge in keys, which you can use to specify
the configuration similar to the way you would in xorg.conf. You will
need to restart HAL after making changes. If you are having issues,
starting X with the -logverbose 7 flag may yield useful information.
Keys Supported:
Key "input.x11_driver" (string)
This specifies the driver to use. You MUST specify this option,
or a driver will not be loaded and the rest will be ignored by
Xorg
Key "input.x11_options.<option name>" (string)
This allows you to specify arbitrary options to pass to the driver.
Anything you would normally specify in xorg.conf goes here. So, for
option "Mode" in xorg.conf, you would specify the key name of
"input.x11_options.Mode".
Do not specify "input.x11_options.Device" since "input.device"
will be used automatically.
You MUST specify all options as strings, otherwise the server will
ignore them.
Legacy Keys
"input.xkb.rules"
"input.xkb.model"
"input.xkb.layout"
"input.xkb.variant"
"input.xkb.options"
These keys are deprecated. Use these instead:
"input.x11_options.XkbRules"
"input.x11_options.XkbModel"
"input.x11_options.XkbLayout"
"input.x11_options.XkbVariant"
"input.x11_options.XkbOptions"
See the evdev documentation for more information.
You will probably want to add the following option to the ServerFlags of
your xorg.conf:
Option "AllowEmptyInput" "True"
FIXME: Support tablets too.
TODO: I think its fixed, can't test
-->
<!-- Rata
-->
<match key="info.capabilities" contains="input.mouse">
<merge key="input.x11_driver" type="string">mouse</merge>
<!-- Si es Linux usar evdev
-->
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="Linux">
<merge key="input.x11_driver" type="string">evdev</merge>
</match>
<!-- Si es SunOS usar usb
-->
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="SunOS">
<match key="input.device" contains="usb">
<merge key="input.x11_options.StreamsModule" type="string">usbms</merge>
<merge key="input.x11_options.Protocol" type="string">VUID</merge>
</match>
</match>
</match>
<!-- Teclado
-->
<match key="info.capabilities" contains="input.keys">
<merge key="input.x11_driver" type="string">kbd</merge>
<merge key="input.x11_options.XkbRules" type="string">base</merge>
<merge key="input.x11_options.XkbLayout" type="string">es</merge>
<merge key="input.x11_options.XkbModel" type="string">pc105</merge>
<merge key="input.x11_options.XkbOptions" type="string">terminate:ctrl_alt_bksp</merge>
<merge key="input.x11_options.XkbVariant" type="string" />
<!-- Si es Linux usar evdev
-->
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="Linux">
<merge key="input.x11_driver" type="string">evdev</merge>
<merge key="input.x11_options.XkbModel" type="string">evdev</merge>
</match>
<!-- Si es SunOS usar kbd
-->
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="SunOS">
<match key="input.device" contains="usb">
<merge key="input.x11_options.StreamsModule" type="string">usbkbm</merge>
<merge key="input.x11_options.Protocol" type="string">VUID</merge>
</match>
</match>
</match>
</device>
</deviceinfo>
- Creo el fichero para mi tableta Wacom, para HAL, para Xorg. Lo he obtenido de la última versión de desarrollo de linuxwacom. Todavía estoy en pruebas ya que no me funcionan todas las teclas ni las opciones.
# cd /tmp # wget http://prdownloads.sourceforge.net/linuxwacom/linuxwacom-0.8.3-2.tar.bz2 # cd linuxwacom-0.8.3-2/src/util/ # cp 10-linuxwacom.fdi /etc/hal/fdi/policy/ # cd /etc/hal/fdi/policy # nano 10-linuxwacom.fdi
Esta es la versión que tengo ahora mismo funcionando:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- this is probably a bit imprecise -->
<deviceinfo version="0.2">
<device>
<match key="info.category" contains="input">
<match key="info.product" contains_outof="Wacom">
<merge key="input.x11_driver" type="string">wacom</merge>
<merge key="input.x11_options.Type" type="string">stylus</merge>
<append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
<append key="wacom.types" type="strlist">eraser</append>
<append key="wacom.types" type="strlist">cursor</append>
<append key="wacom.types" type="strlist">pad</append>
</match>
</match>
</device>
</deviceinfo>
- Rearranco HAL para que relea las nuevas políticas
# /etc/init.d/hald restart
- Verifico que HAL reconoce bien mis dispositivos de entrada (input)
# lshal| grep -i input | grep -i capabilities
info.capabilities = {'input', 'button'} (string list)
info.capabilities = {'input', 'button'} (string list)
info.capabilities = {'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button'} (string list)
info.capabilities = {'input', 'button'} (string list)
info.capabilities = {'input', 'input.mouse'} (string list)
info.capabilities = {'input', 'input.touchpad'} (string list)
NOTA: Si crees que te falta algo, usar "lshal" a secas, redirigelo a un fichero y editalo para buscarlo.
- También pruebo con el siguiente comando para ver el teclado
# hal-find-by-capability --capability input.keyboard |xargs hal-device | more
udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input'
input.product = 'AT Translated Set 2 keyboard' (string)
input.xkb.model = 'evdev' (string)
input.xkb.layout = 'us' (string)
linux.sysfs_path = '/sys/devices/platform/i8042/serio0/input/input2/event2' (string)
info.subsystem = 'input' (string)
input.xkb.variant = '' (string)
info.parent = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port' (string)
info.product = 'AT Translated Set 2 keyboard' (string)
info.addons.singleton = { 'hald-addon-input' } (string list)
input.x11_options.XkbRules = 'base' (string)
input.originating_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port' (string)
info.udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input' (string)
input.x11_options.XkbModel = 'evdev' (string)
linux.hotplug_type = 2 (0x2) (int)
input.x11_driver = 'evdev' (string)
input.x11_options.XkbLayout = 'es' (string)
linux.subsystem = 'input' (string)
input.x11_options.XkbVariant = '' (string)
info.category = 'input' (string)
linux.device_file = '/dev/input/event2' (string)
info.capabilities = { 'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button' } (string list)
input.device = '/dev/input/event2' (string)
input.xkb.rules = 'base' (string)
Compilación
- Modifico el /etc/make.conf
# Para Xorg 1.5 INPUT_DEVICES="evdev" <=== Notar que quito "keyboard, mouse, wacom" VIDEO_CARDS="nvidia"
- Modifico el /etc/portage/package.use, sobre todo para añadir las opciones de hal
# Xorg 1.5 x11-apps/xinit pam hal x11-base/xorg-server ipv6 nptl xorg hal x11-drivers/xf86-input-evdev hal
- Miro que "pretendería hacer"
# emerge -DuvNp world
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild U ] dev-db/sqlite-3.6.11 [3.6.6.2] USE="threadsafe -debug -doc -soundex -tcl" 2,739 kB
[ebuild U ] x11-libs/qt-core-4.4.2-r2 [4.4.2] USE="glib* iconv%* qt3support ssl -custom-cxxflags -debug -doc -pch" 0 kB
[ebuild U ] x11-libs/qt-sql-4.4.2-r1 [4.4.2] USE="iconv%* mysql qt3support sqlite -custom-cxxflags -debug (-firebird) -odbc -pch -postgres" 0 kB
[ebuild U ] x11-misc/util-macros-1.2.1 [1.1.5] 48 kB
[ebuild U ] x11-proto/xproto-7.0.14 [7.0.10] 149 kB
[ebuild U ] x11-proto/inputproto-1.5.0 [1.4.2.1] 57 kB
[ebuild U ] x11-libs/xtrans-1.2.3 [1.0.4] USE="-debug" 102 kB
[ebuild U ] x11-proto/randrproto-1.2.2 [1.2.1] 62 kB
[ebuild U ] x11-proto/renderproto-0.9.3 [0.9.2] 53 kB
[ebuild U ] x11-libs/libdrm-2.4.5 [2.3.0] USE="-debug" 551 kB
[ebuild U ] x11-proto/xf86driproto-2.0.4 [2.0.3] 43 kB
[ebuild U ] x11-libs/pixman-0.14.0-r1 [0.12.0] USE="mmx sse2 (-altivec) -debug (-sse%*)" 345 kB
[ebuild U ] x11-proto/printproto-1.0.4 [1.0.3] 49 kB
[ebuild N ] x11-proto/dri2proto-1.99.3 42 kB
[ebuild U ] x11-libs/libXau-1.0.4 [1.0.3] USE="-debug" 223 kB
[ebuild U ] x11-proto/xextproto-7.0.4 [7.0.2] 78 kB
[ebuild U ] x11-apps/rgb-1.0.3 [1.0.1] USE="-debug" 102 kB
[ebuild U ] x11-apps/sessreg-1.0.4 [1.0.3] USE="-debug" 94 kB
[ebuild U ] x11-libs/libX11-1.1.5 [1.1.4] USE="ipv6 xcb -debug" 1,548 kB
[ebuild U ] x11-libs/libXext-1.0.4 [1.0.3] USE="-debug" 259 kB
[ebuild U ] x11-libs/libXrender-0.9.4 [0.9.2] USE="-debug" 222 kB
[ebuild U ] x11-libs/libxkbfile-1.0.5 [1.0.4] USE="-debug" 254 kB
[ebuild U ] x11-apps/luit-1.0.3 [1.0.2] USE="-debug" 103 kB
[ebuild U ] x11-libs/libXrandr-1.2.3 [1.2.2] USE="-debug" 246 kB
[ebuild U ] x11-libs/libXi-1.2.1 [1.1.3] USE="-debug" 274 kB
[ebuild U ] x11-libs/libXxf86vm-1.0.2 [1.0.1] USE="-debug" 235 kB
[ebuild U ] x11-libs/libXv-1.0.4 [1.0.3] USE="-debug" 224 kB
[ebuild U ] x11-apps/xkbcomp-1.0.5 [1.0.3] USE="-debug" 197 kB
[ebuild U ] x11-libs/libXinerama-1.0.3 [1.0.2] USE="-debug" 231 kB
[ebuild U ] x11-libs/libXScrnSaver-1.1.3 [1.1.2] USE="-debug" 215 kB
[ebuild U ] x11-apps/xrandr-1.2.3 [1.2.2] USE="-debug" 109 kB
[ebuild U ] x11-libs/libXfont-1.3.4 [1.3.1-r1] USE="ipv6 -debug" 558 kB
[ebuild U ] x11-apps/mkfontscale-1.0.5 [1.0.3] USE="-debug" 99 kB
[ebuild U ] x11-apps/xdpyinfo-1.0.3 [1.0.2] USE="-debug -dga -dmx -xinerama" 101 kB
[ebuild U ] x11-apps/mkfontdir-1.0.4 [1.0.3] USE="-debug" 69 kB
[ebuild U ] x11-libs/libXft-2.1.13 [2.1.12] USE="-debug" 262 kB
[ebuild U ] x11-misc/xkeyboard-config-1.5 [1.1] 559 kB
[ebuild U ] net-libs/gnutls-2.6.4 [2.4.1-r2] USE="cxx%* nls zlib -bindist -doc -guile -lzo" 4,996 kB
[ebuild U ] x11-libs/libSM-1.1.0 [1.0.3] USE="ipv6 -debug" 247 kB
[ebuild U ] x11-libs/libXmu-1.0.4 [1.0.3] USE="ipv6 -debug" 299 kB
[ebuild U ] media-libs/mesa-7.3-r1 [6.5.2-r1] USE="nptl xcb -debug -doc -motif -pic" VIDEO_CARDS="-intel -mach64 -mga -none -r128 -radeon -s3virge -savage -sis (-sunffb) -tdfx -trident -via" 3,323 kB
[ebuild U ] x11-apps/xauth-1.0.3 [1.0.2] USE="ipv6 -debug" 110 kB
[ebuild U ] x11-apps/xprop-1.0.4 [1.0.3] USE="-debug" 107 kB
[ebuild U ] x11-apps/xset-1.0.4 [1.0.3] USE="-debug" 102 kB
[ebuild U ] x11-apps/xrdb-1.0.5 [1.0.4] USE="-debug" 100 kB
[ebuild U ] x11-wm/twm-1.0.4 [1.0.3] USE="-debug" 237 kB
[ebuild U ] x11-libs/libXaw-1.0.5 [1.0.4] USE="-debug (-xprint%)" 502 kB
[ebuild U ] x11-apps/xmessage-1.0.2-r1 [1.0.2] USE="-debug (-xprint%)" 0 kB
[ebuild U ] x11-apps/xclock-1.0.3-r1 [1.0.3] USE="-debug (-xprint%)" 0 kB
[ebuild U ] x11-terms/xterm-242 [239] USE="truetype unicode -Xaw3d -toolbar" 850 kB
[ebuild U ] x11-apps/mesa-progs-7.3 [6.5.2] 1,348 kB
[ebuild U ] sys-fs/fuse-2.7.4 [2.7.0] 495 kB
[ebuild U ] x11-apps/xsm-1.0.1-r1 [1.0.1] USE="-debug (-xprint%)" 0 kB
[ebuild U ] app-cdr/cdrdao-1.2.2-r3 [1.2.2-r2] USE="-debug -encode -gcdmaster -pccts" 0 kB
[ebuild U ] x11-apps/xinit-1.0.8-r4 [1.0.5-r1] USE="hal* pam -debug -minimal" 115 kB
[ebuild U ] x11-libs/qt-gui-4.4.2-r3 [4.4.2-r1] USE="accessibility cups dbus glib* qt3support tiff -custom-cxxflags -debug -mng -nas -nis -pch -xinerama" INPUT_DEVICES="wacom*" 0 kB
[ebuild U ] x11-drivers/xf86-input-mouse-1.4.0 [1.2.3] USE="-debug" 286 kB
[ebuild N ] x11-libs/libpciaccess-0.10.5 USE="-debug -minimal" 255 kB
[uninstall ] x11-base/xorg-server-1.3.0.0-r6 USE="dri ipv6 nptl xorg (-3dfx) -debug -dmx -kdrive -minimal -sdl -xprint" INPUT_DEVICES="keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -evdev -fpit -hyperpen -jamstudio -joystick -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse -void -wacom" VIDEO_CARDS="nvidia -apm -ark -chips -cirrus -cyrix -dummy -epson -fbdev -fglrx -glint -i128 (-i740) (-impact) (-imstt) -intel -mach64 -mga -neomagic (-newport) (-nsc) -nv -r128 -radeon -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vesa -vga -via -vmware -voodoo"
[blocks b ] <x11-base/xorg-server-1.5 ("<x11-base/xorg-server-1.5" is blocking x11-libs/libpciaccess-0.10.5)
[ebuild U ] x11-base/xorg-server-1.5.3-r5 [1.3.0.0-r6] USE="hal%* ipv6 nptl xorg (-3dfx) -debug -dmx -kdrive -minimal -sdl -tslib% (-dri%*) (-xprint%)" INPUT_DEVICES="evdev* keyboard mouse wacom* -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -fpit -hyperpen -jamstudio -joystick -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -tslib% -ur98 -virtualbox% -vmmouse -void" VIDEO_CARDS="nvidia -apm -ark -ast% -chips -cirrus -dummy -epson -fbdev -fglrx (-geode) -glint -i128 (-i740) (-impact) (-imstt) -intel -mach64 -mga -neomagic (-newport) -nv -r128 -radeon -radeonhd% -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l (-vermilion) -vesa -via -virtualbox% -vmware -voodoo (-xgi) (-cyrix%) (-nsc%) (-vga%)" 5,546 kB
[ebuild U ] x11-drivers/xf86-input-keyboard-1.3.2 [1.1.1-r1] USE="-debug" 264 kB
[ebuild N ] x11-drivers/xf86-input-evdev-2.1.3 USE="hal -debug" 272 kB
- Ejecuto el upgrade
# emerge -DuvN world
- Ejecuto etc-update
# etc-update
- Mantengo mi Display Manager a "gdm"
DISPLAYMANAGER="gdm"
Arranque de Xorg
- Antes de continuar reinstalo "linuxwacom"
# emerge -v linuxwacom
- Preparo XSession por si algún día paso a usar startx
# echo XSESSION="Gnome" > /etc/env.d/91xsession
- Rearranco X.
Salgo a la pantalla de login CTRL-ALT-RETROCESO
- Informe del arranque de Xorg: /var/log/Xorg.0.log con Xorg 1.5
Resolución de problemas
Actualmente funciona todo con las siguientes "notas".
- En el log de X veo algunos warnings, relacionados con fuentes, que tendré que mirar, pero no me causan problemas.
- Se acentuó un problema con Compiz Fusion que resolví (está aquí documentado)
- Si se tiene problemas con el teclado en vmware, por ejemplo que van mal las teclas de flechas y el Delete, y posiblemente alguna más, aquí dan una solución: http://bbs.archlinux.org/viewtopic.php?id=60449
xkeymap.keycode.108 = 0x138 # Alt_R xkeymap.keycode.106 = 0x135 # KP_Divide xkeymap.keycode.104 = 0x11c # KP_Enter xkeymap.keycode.111 = 0x148 # Up xkeymap.keycode.116 = 0x150 # Down xkeymap.keycode.113 = 0x14b # Left xkeymap.keycode.114 = 0x14d # Right xkeymap.keycode.105 = 0x11d # Control_R xkeymap.keycode.118 = 0x152 # Insert xkeymap.keycode.119 = 0x153 # Delete xkeymap.keycode.110 = 0x147 # Home xkeymap.keycode.115 = 0x14f # End xkeymap.keycode.112 = 0x149 # Prior xkeymap.keycode.117 = 0x151 # Next xkeymap.keycode.78 = 0x46 # Scroll_Lock xkeymap.keycode.127 = 0x100 # Pause xkeymap.keycode.133 = 0x15b # Meta_L xkeymap.keycode.134 = 0x15c # Meta_R xkeymap.keycode.135 = 0x15d # Menu
Upgrade a 1.6
Nota que el 10 de Oct de 2009 hice una actualización a Xorg 1.6, Gnome 2.26 y KDE 4.3 .
Enlaces y Créditos
| [1] | http://wiki.luispa.com/ | Página principal de LuisPa. |
| [2] | http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.5-upgrade-guide.xml | Guía de actualización a Xorg 1.5 de Gentoo |
Volver a la página de Role como Estación de trabajo
--Luis 08:32 7 abr 2009 (CEST)

