Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264225 - [x11-overlay] x11-base/xorg-server-1.6.0 ignores multiple keyboard layouts configured in hal
Summary: [x11-overlay] x11-base/xorg-server-1.6.0 ignores multiple keyboard layouts co...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-29 22:48 UTC by Alexey Charkov
Modified: 2009-04-09 22:18 UTC (History)
0 users

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


Attachments
The fdi file used (10-x11-input.fdi,491 bytes, text/plain)
2009-03-29 22:51 UTC, Alexey Charkov
Details
The X server log (Xorg.0.log,14.24 KB, text/plain)
2009-03-29 22:53 UTC, Alexey Charkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Charkov 2009-03-29 22:48:36 UTC
This is not a duplicate of bug 237742, as the symptoms are different.

My previously-working hal fdi file with keyboard layout switching stopped working after an upgrade to xorg-server-1.6.0. The needed options are actually passed from hal, as the log shows, but setxkbmap -print lacks the second layout.

Reproducible: Always

Steps to Reproduce:
1. emerge =x11-base/xorg-server-1.6.0
2. Try to use a multi-layout hal fdi configuration
3. Check with setxkbmap -print

Actual Results:  
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)+group(alt_shift_toggle)"     };
        xkb_geometry  { include "pc(pc104)"     };
};

Expected Results:  
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+ru(winkeys):2+inet(evdev)+group(alt_shift_toggle)"       };
        xkb_geometry  { include "pc(pc104)"     };
};

Portage 2.2_rc27 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29-gentoo-alchark-u3s x86_64)
=================================================================                                                         
System uname: Linux-2.6.29-gentoo-alchark-u3s-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-glibc2.2.5           
Timestamp of tree: Sat, 28 Mar 2009 23:00:17 +0000                                                                        
distcc 3.1 x86_64-pc-linux-gnu [disabled]                                                                                 
ccache version 2.4 [disabled]                                                                                             
app-shells/bash:     4.0_p10-r1                                                                                           
dev-java/java-config: 1.3.7-r1, 2.1.7                                                                                     
dev-lang/python:     2.5.4-r2                                                                                             
dev-util/ccache:     2.4-r8                                                                                               
dev-util/cmake:      2.6.3                                                                                                
sys-apps/baselayout: 2.0.0                                                                                                
sys-apps/openrc:     0.4.3-r1                                                                                             
sys-apps/sandbox:    1.6                                                                                                  
sys-devel/autoconf:  2.13, 2.63                                                                                           
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                                     
sys-devel/binutils:  2.19.1-r1                                                                                            
sys-devel/gcc-config: 1.4.1                                                                                               
sys-devel/libtool:   2.2.6a                                                                                               
virtual/os-headers:  2.6.28-r1                                                                                            
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/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/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://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="-j6 -l6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/layman/x11"
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 consolekit cracklib crypt cups curl dbus dhcp djvu dri dts dvd dvdr dvdread emboss encode evo exif fam fbcon ffmpeg flac foomaticdbftp gdbm gif gimp gnutls gpm gs gstreamer hal iconv id3tag ieee1394 imagemagick imlib ipv6 ipw3945 isdnlog java javascript jingle jpeg kipi kqemu ladspa lame laptop latex lcms ldap libnotify lm_sensors lzo mad matroska midi mikmod mmx mmxext mng mp3 mp4 mpeg mudflap multilib musepack ncurses nls nptl nptlonly nsplugin ntp ogg opengl openmp oscar pam pcre pdf perl plasma png ppds ppp pppd python qt-copy qt3 qt3support qt4 quicktime rar readline reflection ru-dv samba sasl scanner sdl session smp spell spl sse sse2 ssl ssse3 startup-notification stream svg symlink sysfs taglib tcpd tetex theora threads tiff truetype unicode usb v4l v4l2 vdpau vnc vorbis wifi wmf x264 xcompositexine xml xorg xulrunner xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoopempty 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="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" USERLAND="GNU" VIDEO_CARDS="intel nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alexey Charkov 2009-03-29 22:51:09 UTC
Created attachment 186685 [details]
The fdi file used

The fdi file specifies 'us,ru' as a keyboard layout. I have also tried the other syntax (input.x11_options.XkbLayout) with no success.
Comment 2 Alexey Charkov 2009-03-29 22:53:26 UTC
Created attachment 186689 [details]
The X server log

All of the options specified seem to be merged, except for input.xkb.rules, which remains 'evdev' no matter what I specify in the fdi file. The layout switching does not work, though.
Comment 3 Rafał Mużyło 2009-03-30 01:13:09 UTC
Other than the fact, you're using old option style,
which is a minor thing, that wouldn't affect anything, there's 
a major flaw of that file.
For it to be a valid fdi file, tag opened within <deviceinfo>
should be <device>. Only inside that that you put options.

So I suspect this is invalid.
Comment 4 Alexey Charkov 2009-03-30 14:10:41 UTC
(In reply to comment #3)
> Other than the fact, you're using old option style,
> which is a minor thing, that wouldn't affect anything, there's 
> a major flaw of that file.
> For it to be a valid fdi file, tag opened within <deviceinfo>
> should be <device>. Only inside that that you put options.
> 
> So I suspect this is invalid.
> 
That's true, I have never even noticed that it's somewhat incomplete. However, adding the <device> tag does not change anything, unfortunately.

As for the new-style option syntax, I tried it as well (as I mentioned in comment #1), but then I get even funnier results, with the old-style (from Gentoo-shipped fdi's) and new-style (from my custom one) options being added side by side rather than merged.

My current lshal output is like this:
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/event2'  (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)
  input.xkb.rules = 'xorg'  (string)
  input.xkb.variant = ',winkeys'  (string)
  linux.device_file = '/dev/input/event2'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input2/event2'  (string)

With the new-style options I get this:
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/event2'  (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.x11_options.XkbLayout = 'us,ru'  (string)
  input.x11_options.XkbOptions = 'grp:alt_shift_toggle'  (string)
  input.x11_options.XkbRules = 'xorg'  (string)
  input.x11_options.XkbVariant = ',winkeys'  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)
  linux.device_file = '/dev/input/event2'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input2/event2'  (string)

Isn't that lovely? :-D

I am using sys-apps/hal-0.5.12_rc1 and app-misc/hal-info-20090309.
Comment 5 Rafał Mużyło 2009-03-30 15:57:06 UTC
Try with rules = 'evdev'.
Comment 6 Rafał Mużyło 2009-03-30 15:58:03 UTC
And new style overrides the old.
Comment 7 Alexey Charkov 2009-03-30 16:10:07 UTC
Well, yes, it did actually override the old-style entries at X startup despite of lshal showing both.

As for setting rules to evdev, nothing changes (just checked to be sure). As I've mentioned in comment #2, it remains at 'evdev' in X logs no matter what my settings are.

Another extremely funny issue is that after I use `setxkbmap -layout us,ru` from a terminal, I get the Xfce4 'Run command' window appearing at Alt+F2 instead of KRunner (I am in a KDE4 session with no Xfce4 programs running).
Comment 8 Rafał Mużyło 2009-03-30 20:18:28 UTC
With KDE, there's also that "evdev managed" keyboard stuff,
mentioned on the forums in the sticky.
Comment 9 Alexey Charkov 2009-03-30 20:29:40 UTC
(In reply to comment #8)
> With KDE, there's also that "evdev managed" keyboard stuff,
> mentioned on the forums in the sticky.
> 
Thanks, but it's been a long time since I've switched to Xorg/HAL xkb configuration rather that DE-specific tricks. Otherwise I would not have had this problem, as `setxkbmap` actually DOES set the correct layout (and that is what the KDE applet uses internally). And, as you might have noticed, my XkbModel is set to 'evdev'.
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-31 19:52:30 UTC
Is this xorg-server from x11-overlay?
Comment 11 Rafał Mużyło 2009-04-01 01:12:16 UTC
By now, I probably forgot you're talking about
1.6.0 (even if I noticed it in the first place).
But my point still stands - I've been using
xorg-server 1.6.0 from x11 overlay for about a month
and it works for me.
Comment 12 Alexey Charkov 2009-04-01 08:53:25 UTC
(In reply to comment #10)
> Is this xorg-server from x11-overlay?
> 
Yes, it is.

@Rafał: Are you using multiple layouts? If so, could you please post your fdi here?
Comment 13 Rafał Mużyło 2009-04-01 18:17:27 UTC
Well, no, I'm not using multiple layouts, I tested that manually.

As root, I used 'hal-set-property' to set those hal keys to
given values (multi layout and switch), then without leaving
my current session, I switched to a different vt,
ran 'startx -- :1', opened a terminal and simply tried pressing
a few keys - layout switching did work.
My fdi file (that's posted many times on the forums) looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keys">
          <merge key="input.x11_options.XkbRules" type="string">evdev</merge>
          <merge key="input.x11_options.XkbModel" type="string">evdev</merge>
          <merge key="input.x11_options.XkbLayout" type="string">pl</merge>
          <merge key="input.x11_options.XkbOptions" type="string">altwin:menu</merge>
    </match>
  </device>
</deviceinfo>

During the test, first I changed just XkbLayout and XkbOptions,
then I added XkbVariant, both times it worked.
Comment 14 Rafał Mużyło 2009-04-01 18:20:02 UTC
and input.keyboard is probably even better than input.keys,
but that's irrelevant as it seems it's applied anyway.
Comment 15 Alexey Charkov 2009-04-01 18:21:21 UTC
But my problem is exactly in "multiple layouts", as the bug description reads. The first layout ('us' in my case) works well, and so do the options and variant fields.
Comment 16 Rafał Mużyło 2009-04-01 21:10:19 UTC
(In reply to comment #15)
> But my problem is exactly in "multiple layouts", as the bug description reads.
> The first layout ('us' in my case) works well, and so do the options and
> variant fields.
> 
...your point ?
Once the settings hit hald, it should not matter.
During the test, new settings affected only the new session,
but I have ps2 keyboard/mouse, with usb keyboard it's probably enough
to disconnect and reconnect it after changing hal settings.
I was setting XkbLayout to 'pl,ru' and XkbOptions to 'altwin:menu,grp:alt_shift_toggle' and it did work.

For a start, try doing a similar test, though your hal
settings suggest it should already work.
What's your xkeyboard-config' version ?
Comment 17 Alexey Charkov 2009-04-02 06:29:28 UTC
It should not, but unfortunately it does. As you can see, in my case it not only hits hald, but even goes into xorg (as the log says, at least). But at some point up there it gets discarded, so when I check it with setxkbmap it's not in.
Comment 18 Alexey Charkov 2009-04-02 06:31:45 UTC
(In reply to comment #16)
> What's your xkeyboard-config' version ?
> 
x11-misc/xkeyboard-config-1.5
Comment 19 Rafał Mużyło 2009-04-02 08:37:54 UTC
Now, that I've read your log, I've got a silly idea:
try adding a rule that removes evdev driver for
"Asus Laptop extra buttons"; alternatively,
try using keys instead of keyboard - perhaps
that extra device is somehow interfering with
your keyboard.
Comment 20 Alexey Charkov 2009-04-02 16:37:10 UTC
I'm using input.keyboard for exactly this reason: otherwise other stuff besides the actual keyboard matches as well, which I do not want.

BTW, the same thing occurs with xorg-server-9999. I'll probably try to go through git bisect, but that's for a later moment.
Comment 21 Alexey Charkov 2009-04-02 20:05:02 UTC
It starts to get even more exciting, as now I experience the same problem with xorg-server-1.5.3-r5! Did the input subsystem change in any way with kernel 2.6.29? This is what I use now (from gentoo-sources). Unfortunately, checking with 2.6.28 is a bit problematic, as I have btrfs at /home.
Comment 22 Rafał Mużyło 2009-04-02 21:22:09 UTC
Perhaps you should try something less trivial:
a rule, that first removes all xkb keys (both old and new)
from devices matching input.keys and then adds new style keys
to the device matching input.keyboard.
Comment 23 Alexey Charkov 2009-04-09 19:52:32 UTC
Resolved by nuking the KDE4 config in ~/.kde4 and having it recreated from scratch (i.e. nothing to do with either of xorg, hal or kernel). Must have been some glitch upon ext4->btrfs conversion of /home.
Comment 24 Rémi Cardona (RETIRED) gentoo-dev 2009-04-09 22:18:03 UTC
Thanks for the follow up, that was indeed tricky to find.

Cheers