Bug 574301

Summary: Keyboard languages inverted, custom keyboard HAL options ignored with a new xkeyboard-config-1.7 update
Product: [Fedora] Fedora Reporter: Artem S. Tashkinov <aros>
Component: xkeyboard-configAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 12CC: peter.hutterer, xgl-maint
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-24 00:54:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Artem S. Tashkinov 2010-03-17 05:17:52 UTC
Description of problem: with xorg-x11-server-Xorg-1.7.5.901-4.fc12.i686 the languages defined in HAL are inverted on X.org startup:

From X.org log:

(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "pc105"
(**) Option "xkb_layout" "ru,us"
(**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll,grp:shifts_toggle,grp_led:scroll"

Whereas my /etc/hal/fdi/policy/10-keymap.fdi states:

<?xml version="1.0" encoding="ISO-8859-1"?>

<deviceinfo version="0.2">
        <device>
                <match key="info.capabilities" contains="input.keymap">
                        <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
                </match>
                <match key="info.capabilities" contains="input.keyboard">
                        <!-- from http://cgit.freedesktop.org/xorg/xserver/tree/config/hal.c -->
                        <merge key="input.xkb.rules"   type="string">base</merge>
                        <merge key="input.xkb.model"   type="string">pc105</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="string">grp:alt_shift_toggle,grp_led:scroll</merge>
                </match>
        </device>
</deviceinfo>


Version-Release number of selected component (if applicable): 1.7.5.901-4.fc12.i686

How reproducible: Always


Steps to Reproduce:
1. Run X server
2. 
3.
  
Actual results: The second language is selected by default


Expected results: The first language to be selected by default


Additional info:

Comment 1 Artem S. Tashkinov 2010-03-17 05:39:22 UTC
I have to run

$ setxkbmap -model pc105 "us,ru" ",winkeys" "grp:alt_shift_toggle,grp_led:scroll"

after logging on to revert the sane, normal, right keyboard behaviour.

Comment 2 Artem S. Tashkinov 2010-03-23 23:31:36 UTC
Peter, happened to xkeyboard-config since v1.7?

First of all, why Russian is selected as default? (yes, my /etc/sysconfig/keyboard has KEYTABLE="ru", but it's never caused any troubles).

Secondly, why my custom /etc/hal/fdi/policy/10-keymap.fdi is being ignored?

I have erased hal fdi file and /etc/sysconfig/keyboard file and now I set language options manually upon logon, because keyboard is f*cked up. I'm upset in a major way.

Can you, please, at least announce changes in a keyboard handling so that users don't feel like idiots?

Comment 3 Artem S. Tashkinov 2010-03-24 00:54:04 UTC
I have deleted the custom keyboard configuration for HAL and updated /etc/sysconfig/keyboard from this

KEYBOARDTYPE="pc"
KEYTABLE="ru"

to this

KEYTABLE="ru"
MODEL="pc105"
LAYOUT="us,ru"
KEYBOARDTYPE="pc"
OPTIONS="grp:alt_shift_toggle,grp_led:scroll,ctrl:nocaps"
VARIANT=""

Now everything works as expected.

/etc/sysconfig/keyboard X11 specific options are NOT documented anywhere in Fedora documentation which is absolutely frustrating.

Comment 4 Peter Hutterer 2010-03-24 01:27:23 UTC
I don't see anything in xk-c between 1.6 and 1.7 that should have affected russian layouts much (also, Sergey the upstream maintainer is russian so I thought he'd keep an eye on that anyway).

Test the following please:
- remove the callout from your custom fdi file, then restart HAL and check if the order is now correct (check with lshal).
- change the keys from input.xkb.foo to input.x11_options.XkbFoo, the latter override the former so you shouldn't get any conflicts with system-setup-keyboard.


other than that, do you have any desktop configuration that might interfere?
can you please attach your xorg.log and the output of lshal?

Comment 5 Artem S. Tashkinov 2010-03-24 08:24:08 UTC
OK, I've reverted the changes to their wrong state:

1) /etc/hal/fdi/policy/10-keymap.fdi file (listed above)

2) cat /etc/sysconfig/keyboard

KEYBOARDTYPE="pc"
KEYTABLE="ru"

3) what we've got,  $ hal-device

8: udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input'   linux.hotplug_type = 2  (0x2)  (int)   linux.subsystem = 'input'  (string)   input.xkb.options = 'grp:alt_shift_toggle,grp_led:scroll,grp:shifts_toggle,grp_led:scroll'  (string)   info.callouts.add = { 'system-setup-keyboard' } (string list)   input.device = '/dev/input/event0'  (string)   input.product = 'AT Translated Set 2 keyboard'  (string)   info.addons.singleton = { 'hald-addon-input' } (string list)   input.xkb.rules = 'base'  (string)   input.xkb.model = 'pc105'  (string)   input.originating_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port'  (string)   info.subsystem = 'input'  (string)   info.product = 'AT Translated Set 2 keyboard'  (string)   linux.sysfs_path = '/sys/devices/platform/i8042/serio0/input/input0/event0'  (string)   info.parent = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port'  (string)   input.x11_driver = 'evdev'  (string)   info.udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input'  (string)   input.xkb.variant = ''  (string)   info.category = 'input'  (string)   info.capabilities = { 'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button' } (string list)   linux.device_file = '/dev/input/event0'  (string)   input.xkb.layout = 'ru,us'  (string)

I don't know what caused these changes, but a month ago with the same configuration everything worked as expected.

Now, that I reworked /etc/sysconfig/keyboard and removed keyboard fdi file everything is back to normal.

Comment 6 Fedora Update System 2010-03-24 22:30:42 UTC
system-setup-keyboard-0.8.4-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/system-setup-keyboard-0.8.4-1.fc13

Comment 7 Fedora Update System 2010-03-24 23:01:52 UTC
system-setup-keyboard-0.7-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/system-setup-keyboard-0.7-3.fc12

Comment 8 Peter Hutterer 2010-03-24 23:20:07 UTC
I just tested your fdi file and I can confirm it doesn't work (just in case you didn't know yourself already ;)

I think the cause of the issue is the callout to system-setup-keyboard that overwrites your fdi-set options because the lshal output suggests that the variant and options are merged, only the others are being overwritten by the defaults. So for now I suggest either what you already did anyway or to change the fdi file to merge the input.x11_options.XkbLayout etc. keys.

Given that HAL is already deprecated and removed in F-13, I probably won't find the time to investigate what's going on here, sorry.

The two updates are for the man page addition to detail the layout to XKB conversion tables.

Comment 9 Artem S. Tashkinov 2010-03-25 08:38:33 UTC
Peter,

Now that I've solved this bug by myself, I only wish that /etc/sysconfig/keyboard options were documented. :)

Comment 10 Fedora Update System 2010-04-25 14:02:08 UTC
system-setup-keyboard-0.8.4-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-05-20 18:47:23 UTC
system-setup-keyboard-0.7-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.