Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237742 - x11-base/xorg-server-1.5.0 ignores layout switching set in hal fdi file
Summary: x11-base/xorg-server-1.5.0 ignores layout switching set in hal fdi file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 15:35 UTC by Alexey Charkov
Modified: 2008-09-24 08:51 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
X server log (Xorg.0.log,11.37 KB, text/plain)
2008-09-17 16:16 UTC, Alexey Charkov
Details
Xorg log file (Xorg.0.log,17.34 KB, text/plain)
2008-09-19 03:36 UTC, Sergey Tyurin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Charkov 2008-09-15 15:35:20 UTC
After upgrading to =x11-base/xorg-server-1.5.0, switching keyboard layouts do not work any longer on my system until I issue `setxkbmap -option grp:alt_shift_toggle` in a terminal, although the necessary option is merged from a HAL fdi file (and shows up in `lshal`). This exact configuration used to work fine with =x11-base/xorg-server-1.4*.

Reproducible: Always

Steps to Reproduce:
1. emerge =x11-base/xorg-server-1.5.0
2. Set up xkb options in a HAL fdi file
3. Try switching layouts by Shift+Alt (as per -option grp:alt_shift_toggle)

Actual Results:  
Nothing happens until xkb options are adjusted manually by `setxkbmap -option grp:alt_shift_toggle`

Expected Results:  
Shift+Alt should switch layouts without additional steps whenever necessary options are present in an fdi file

Relevant lshal output:
udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.capabilities = {'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port'  (string)
  info.product = 'AT Translated Set 2 keyboard'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input'  (string)
  input.device = '/dev/input/event3'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port'  (string)
  input.product = 'AT Translated Set 2 keyboard'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us,ru'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.options = {'grp:alt_shift_toggle'} (string list)
  input.xkb.rules = 'xorg'  (string)
  input.xkb.variant = ',winkeys'  (string)
  linux.device_file = '/dev/input/event3'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input3/event3'  (string)

/etc/hal/fdi/policy/10-x11-input.fdi contents:
<?xml version="1.0" encoding="utf-8"?>
<deviceinfo version="0.2">
   <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.xkb.rules" type="string">xorg</merge>
      <!-- Option "XkbModel" "pc105" -->
      <merge key="input.xkb.model" type="string">evdev</merge>
      <merge key="input.xkb.layout" type="string">us,ru</merge>
      <merge key="input.xkb.options" type="strlist">grp:alt_shift_toggle</merge>
      <merge key="input.xkb.variant" type="string">,winkeys</merge>
   </match>
</deviceinfo>

emerge --info:
Portage 2.2_rc8 (default/linux/amd64/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo-r1-alchark-u3s x86_64)
=================================================================                                                           
System uname: Linux-2.6.26-gentoo-r1-alchark-u3s-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-glibc2.2.5          
Timestamp of tree: Mon, 15 Sep 2008 14:34:01 +0000                                                                          
ccache version 2.4 [enabled]                                                                                                
app-shells/bash:     3.2_p39                                                                                                
dev-java/java-config: 1.3.7, 2.1.6-r1                                                                                       
dev-lang/python:     2.5.2-r7                                                                                               
dev-util/ccache:     2.4-r7                                                                                                 
sys-apps/baselayout: 2.0.0                                                                                                  
sys-apps/openrc:     0.2.5                                                                                                  
sys-apps/sandbox:    1.2.18.1-r3                                                                                            
sys-devel/autoconf:  2.13, 2.62-r1                                                                                          
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1                                                    
sys-devel/binutils:  2.18-r3                                                                                                
sys-devel/gcc-config: 1.4.0-r4                                                                                              
sys-devel/libtool:   2.2.4                                                                                                  
virtual/os-headers:  2.6.26                                                                                                 
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                                              
CBUILD="x86_64-pc-linux-gnu"                                                                                                
CFLAGS="-O2 -march=core2 -pipe"                                                                                             
CHOST="x86_64-pc-linux-gnu"                                                                                                 
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/svn/env /usr/kde/svn/share/config /usr/kde/svn/shutdown /usr/share/config /var/lib/hsqldb"                                                                                               
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"                                                                       
CXXFLAGS="-O2 -march=core2 -pipe"                                                                                                           
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.yandex.ru/gentoo-distfiles http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LC_ALL="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="ru en"
MAKEOPTS="-j5 -l3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/kde-split-portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr amrnb amrwb archive avahi bash-completion berkdb bluetooth branding bzip2 cairo cdparanoia cdr chm cli cracklib crypt cups curl dbus dhcp djvu dri dts dvd dvdr dvdread emboss encode evo exif fam fbcon ffmpeg flac foomaticdb fortran ftp gdbmgif gimp gnutls gpm gs gstreamer gtk hal iconv id3tag ieee1394 imagemagick imlib ipw3945 isdnlog jack javascript jingle jpeg kde kerberos kipi ladspa lame laptop latex lcms ldap libnotify lm_sensors lzo mad matroska midi mikmod mmx mng mp3 mp4 mpeg mudflap multilib musepack ncurses networkmanager nls nptl nptlonly ogg opengl openmp oscar pam pcre pdf perl png ppds ppp pppd python qt-copy qt3 qt3support qt4 quicktimerar readline reflection ru-dv samba sasl scanner sdl session smp spell spl sse sse2 ssl ssse3 startup-notification svg symlink sysfs taglibtcpd tetex theora tiff truetype unicode usb v4l v4l2 vnc vorbis wifi wmf x264 xcomposite xine xml xorg xulrunner xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" USERLAND="GNU" VIDEO_CARDS="nvidia i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rémi Cardona (RETIRED) gentoo-dev 2008-09-16 08:57:55 UTC
Could you attach /var/log/Xorg.0.log ?

Thanks
Comment 2 Alexey Charkov 2008-09-17 16:16:08 UTC
Created attachment 165648 [details]
X server log

Xkb settings are taken into account, except for the "options" part.
Comment 3 Sergey Tyurin 2008-09-19 03:35:25 UTC
I have the same problem.

$ setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)+ru(winkeys):2"       };
        xkb_geometry  { include "pc(pc104)"     };
};


$ cat /etc/hal/fdi/policy/10-x11-input.fdi 
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
    <device>
        <match key="info.capabilities" contains="input.keyboard">
            <merge key="input.xkb.rules" type="string">xorg</merge>
            <merge key="input.x11_driver" type="string">evdev</merge>
            <merge key="input.xkb.model" type="string">evdev</merge>
            <merge key="input.xkb.repeat" type="string">500 30</merge>
            <merge key="input.xkb.layout" type="string">us,ru</merge>
            <merge key="input.xkb.variant" type="string">,winkeys</merge>
            <merge key="input.xkb.options" type="strlist">grp:crtl_shift_toggle</merge>
        </match>
    </device>
</deviceinfo>

lshal:

udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input'
  info.addons.singleton = {'hald-addon-input'} (string list)
  info.capabilities = {'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port'  (string)
  info.product = 'AT Translated Set 2 keyboard'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input'  (string)
  input.device = '/dev/input/event3'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port'  (string)
  input.product = 'AT Translated Set 2 keyboard'  (string)
  input.x11_driver = 'evdev'  (string)
  input.xkb.layout = 'us,ru'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.option = {'grp:crtl_shift_toggle'} (string list)
  input.xkb.repeat = '500 30'  (string)
  input.xkb.rules = 'xorg'  (string)
  input.xkb.variant = ',winkeys'  (string)
  linux.device_file = '/dev/input/event3'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input3/event3'  (string)

Comment 4 Sergey Tyurin 2008-09-19 03:36:22 UTC
Created attachment 165807 [details]
Xorg log file
Comment 5 4nykey 2008-09-20 18:27:00 UTC
Just a wild guess (is it covered in docs anywhere at all, btw?), changed type of xkb.options from strlist to string in 10-x11-input.fdi. Had

    <append key="input.xkb.options" type="strlist">grp_led:scroll</append>
    <append key="input.xkb.options" type="strlist">grp:alt_shift_toggle</append>

and changed it ro read

    <append key="input.xkb.options" type="string">,grp_led:scroll</append>
    <append key="input.xkb.options" type="string">,grp:alt_shift_toggle</append>

Now at least Alt+Shift switching works. Here's the diff of `setxkbmap -print' output after the change
@@ -1,7 +1,7 @@
 xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
-       xkb_compat    { include "complete"      };
-       xkb_symbols   { include "pc+us+inet(evdev)+ee:2+ru:3"  };
+       xkb_compat    { include "complete+ledscroll(group_lock)"        };
+       xkb_symbols   { include "pc+us+inet(evdev)+ee:2+ru:3+group(alt_shift_toggle)"  };
        xkb_geometry  { include "pc(pc104)"     };
 };

Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2008-09-21 17:04:28 UTC
This might help you update your FDI file to the latest "standard" : http://cgit.freedesktop.org/xorg/xserver/tree/config/x11-input.fdi

Thanks
Comment 7 Alexey Charkov 2008-09-21 17:31:31 UTC
Everything works fine after updating the fdi file as Remi's comment suggests. Thank you!

Here is what I've got:
<?xml version="1.0" encoding="utf-8"?>
<deviceinfo version="0.2">
   <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbRules" type="string">xorg</merge>
      <merge key="input.x11_driver" type="string">evdev</merge>
      <merge key="input.x11_options.XkbLayout" type="string">us,ru</merge>
      <merge key="input.x11_options.XkbOptions" type="string">grp:alt_shift_toggle</merge>
      <merge key="input.x11_options.XkbVariant" type="string">,winkeys</merge>
   </match>
</deviceinfo>
Comment 8 Martin Mokrejš 2008-09-24 08:51:35 UTC
Alexey, probably you should also switch away from the deprecated syntax, so replace "input.x11_options.*" with those mentioned in http://cgit.freedesktop.org/xorg/xserver/tree/config/x11-input.fdi