Keyboard indicator shows additional layout "null"

Bug #283128 reported by Alexander Hunziker
102
This bug affects 16 people
Affects Status Importance Assigned to Milestone
xkeyboard-config (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Karmic by Martin Olsson
Nominated for Lucid by Paulus

Bug Description

Since the upgrade to Intrepid, my keyboard indicator applet shows both my configured layouts, but also a third, which it labels "?", or ((null)) on mouseover tooltip. It doesn't always do that, but most of the time. It happens both when I configure my keyboard as "evdev managed keyboard" or as "Generic 105-key". The "?" layout is very strange - keystrokes result in things like: @łertz↓→oþüäöłĸjħŋđðßay»c“<”nµ,.

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

I have this bug, too. My to configured layouts are "germany dead grave acute" and "usa" and the keyboard type is set to "generic 105-key (intl) PC".

Revision history for this message
Pascal Hofstee (caelian) wrote :

I can confirm the same problem with a "Generic 105-key (Intl) PC" Keyboard model setting and "USA" and "Germany Eliminate dead keys" as the two configured keyboard layouts (using both shift keys as switching-trigger).

The interesting thing i observed is that after removing the German keyboard layout and re-adding it again. The keyboard switching behaviour is immediately returned to its original proper functionality and there is no sign of a 3rd ?/(null) layout entry ... After an unidentified period of general desktop usage the rogue 3rd layout crops up again.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

I have the same issue here after upgrade to Intrepid (8.10) using German and Japanese keyboard layout (Thinkpad T61).
After X restart I suddenly have extra layout showing by keyboard indicator with text "??".
I can open the keyboard indicator applet doing some dummy changes and the additional layout disappears (until next x-start etc.)

Didn't found anything but there are several other layout problems out currently:
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/251443

Revision history for this message
Jonas Steinmann (steinmann-jonas) wrote :

Same problem here, using German and Icelandic layout.

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

Question to others experiencing this bug: I get two behaviours on my system. Most of the time, it just shows the extra "??" layout. But sometimes, it just locks on one layout which I cannot change anymore. Do you experience that as well?

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

No, it never locked at my computer. But I have other problems with using multiple layouts.
See Bug https://bugs.launchpad.net/ubuntu/+bug/286158

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Alexander, I experience the locking to one layout only after plugging in an external USB keyboard... not sure if that fits your situation.
So,
1) USB keyboard plugged in, using multiple layouts no problem,
2) Unplug USB keyboard, still can use multiple layouts no problem
3) Plug USB keyboard back in, keyboard indicator (and keyboard) is locked to USA layout.

Let me know if your experience is similar, in which case it might be worth filing a separate bug.

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

Aha! I'm almost constantly working with an external keyboard.

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

I can confirm that if I unplug my USB keyboard (which I normally would not do, since it's the only one - I am working at a desktop pc), the layout indicator locks for me, too.

Interestingly enough, it already locked when I UNPLUGGED (contrary to Michaels description)...

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :
Download full text (13.4 KiB)

I don't have a locking problem. But here is the keybord relevant part of the Xorg.0.log file:

[...]
(II) Cannot locate a core pointer device.
(II) Cannot locate a core keyboard device.
(II) The server relies on HAL to provide the list of input devices.
 If no devices become available, reconfigure HAL or disable AllowEmptyInput.
[...]
(II) config/hal: Adding input device AT Translated Set 2 keyboard
(**) AT Translated Set 2 keyboard: always reports core events
(**) AT Translated Set 2 keyboard: Device: "/dev/input/event1"
(II) AT Translated Set 2 keyboard: Found keys
(II) AT Translated Set 2 keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) AT Translated Set 2 keyboard: xkb_rules: "evdev"
(**) Option "xkb_model" "pc105"
(**) AT Translated Set 2 keyboard: xkb_model: "pc105"
(**) Option "xkb_layout" "de"
(**) AT Translated Set 2 keyboard: xkb_layout: "de"
(**) Option "xkb_variant" "nodeadkeys"
(**) AT Translated Set 2 keyboard: xkb_variant: "nodeadkeys"
(**) Option "xkb_options" "lv3:ralt_switch"
(**) AT Translated Set 2 keyboard: xkb_options: "lv3:ralt_switch"
(II) config/hal: Adding input device Logitech USB Receiver
(**) Logitech USB Receiver: always reports core events
(**) Logitech USB Receiver: Device: "/dev/input/event3"
(II) Logitech USB Receiver: Found 1 mouse buttons
(II) Logitech USB Receiver: Found keys
(II) Logitech USB Receiver: Configuring as keyboard
(II) XINPUT: Adding extended input device "Logitech USB Receiver" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Logitech USB Receiver: xkb_rules: "evdev"
(**) Option "xkb_model" "pc105"
(**) Logitech USB Receiver: xkb_model: "pc105"
(**) Option "xkb_layout" "de"
(**) Logitech USB Receiver: xkb_layout: "de"
(**) Option "xkb_variant" "nodeadkeys"
(**) Logitech USB Receiver: xkb_variant: "nodeadkeys"
(**) Option "xkb_options" "lv3:ralt_switch"
(**) Logitech USB Receiver: xkb_options: "lv3:ralt_switch"
(**) Logitech USB Receiver: YAxisMapping: buttons 4 and 5
(**) Logitech USB Receiver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) config/hal: Adding input device Logitech USB Receiver
(**) Logitech USB Receiver: always reports core events
(**) Logitech USB Receiver: Device: "/dev/input/event2"
(II) Logitech USB Receiver: Found x and y relative axes
(II) Logitech USB Receiver: Found 16 mouse buttons
(II) Logitech USB Receiver: Configuring as mouse
(II) XINPUT: Adding extended input device "Logitech USB Receiver" (type: MOUSE)
(**) Logitech USB Receiver: YAxisMapping: buttons 4 and 5
(**) Logitech USB Receiver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) config/hal: Adding input device Video Bus
(**) Video Bus: always reports core events
(**) Video Bus: Device: "/dev/input/event8"
(II) Video Bus: Found keys
(II) Video Bus: Configuring as keyboard
(II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Video Bus: xkb_rules: "evdev"
(**) Option "xkb_model" "pc105"
(**) Video Bus: xkb_model: "pc105"
(**) Option "xkb_layout" "de"
(**) Video Bus: xkb_layout: "d...

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

Michael: I confirm that I get exactly the same behaviour as you describe. Interestingly enough, it doesn't lock right after plugging it in, but a few seconds afterwards.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

Here some observations and I'm wondering you guys have the same:

* Even I get these strange layouts with "??" I can still switch the keyboard via keyboard (in my case ALT-SHIFT)
* In the first seconds after start I have sometimes sometimes everything seems to be fine (no "??" and short time later I suddenly have "??" in the keyboard indicator.
* If I use the command:
    setxkbmap de,jp -variant nodeadkeys -option "grp:alt_shift_toggle"
(my setting is for German/Japanese keyboard)
I can restore the settings (means "??" layout disappears.
* If I add this comment in "System->Settings->Sessions" it does not help (after restart I get "??" layout. If I start terminal and issue this command manual it work.

My impression:
--> This event causing "??" layout happens a view seconds after gnome start. That's why the session setxkbmod is not effective.
If could be these new HAL hardware detection is responsible, but I'm not sure how to turn this off... using a keyboad section in xorg.conf file was not helpful.
But it looks like a kind of overwriting situation.

I checked a little the program source and it looks like:
* gnome-applets: package contains this keyboard indicator
* libgnomekbd: is called by "gnome-applets"
* libxklavier-3.7: is called by "libgnomekbd"
and in libxklavier are the direct calls to get keyboad information.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

More research:
I installed and compiled source package of libxklavier:
apt-src install libxklavier
apt-src build libxklavier

in the subfolder "libxklavier-3.7/tests" I now get test_config and test_monitor some tools to see a little whats going on.

If I run "test_config -g" the issue get's fixed, but I can see in the log there is a
3rd layout group (beside the desired 2 (German / Japanese).
I attached the output.

I run this again (now issue is fixed and log shows only 2 layout groups).

Additionaly I run this tool on "Failesafe" session (without gnome) and I get 3 (!!) layout groups.
This seems to indicate it's not gnome setup but something with the initial X-keyboad setup.
I don't know what's wrong configured here, but somehow this settings seem to overwrite.
My Xorg.conf currently doesn't contain keyboard config.
/etc/default/console-setup
[..]
XKBMODEL="pc105"
XKBLAYOUT="de,jp"
XKBVARIANT="nodeadkeys"

XKBOPTIONS="lv3:ralt_switch"
[..]
(setting this manual with setxkbmap seems to fix this as written above, so I guess it's fine).

This is a QWETY keyboard but with German layout I use as QWERTZ.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :
Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

Do you guys have this:
"(II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)"
in Xorg.0.log?

Here is a discussion about this:
http://bugs.gentoo.org/show_bug.cgi?id=238125

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

Thomas, I do have this line, twice actually.

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

No, I do not have it.

I have the following lines:

(II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)
...
(II) XINPUT: Adding extended input device "Logitech USB Multimedia Keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Logitech USB Multimedia Keyboard: xkb_rules: "evdev"
(**) Option "xkb_model" "pc105"
(**) Logitech USB Multimedia Keyboard: xkb_model: "pc105"
(**) Option "xkb_layout" "us"
(**) Logitech USB Multimedia Keyboard: xkb_layout: "us"
(**) Option "xkb_variant" "altgr-intl"
(**) Logitech USB Multimedia Keyboard: xkb_variant: "altgr-intl"

(**) Option "xkb_options" "lv3:ralt_switch"
(**) Logitech USB Multimedia Keyboard: xkb_options: "lv3:ralt_switch"
(**) Logitech USB Multimedia Keyboard: YAxisMapping: buttons 4 and 5
(**) Logitech USB Multimedia Keyboard: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

(this section comes twice)

(II) XINPUT: Adding extended input device "Dell Premium USB Optical Mouse" (type: MOUSE)

The hardware is correctly recognised as what I really have.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

I did a little bit more testing:
* this additional "??" layout group first to be not displayed after restart, if I click on the keyboard indicator I just get the expected layouts. However the moment I press first key the system seems to add this layout ?!
* For test purpose I added the "extra" keyboad/mouse section to the xorg.conf, but this time with:
  Option "AutoAddDevices" "no"
in the ServerLayout section. Beside the fast this seems to mix up the special character (like volume up/down etc.).
The issue doesn`t happen without hal detection.
* I enhanced the HAL fdi file mentioned in about bug:
...............
  <device>
    <match key="info.product" contains="Video Bus">
      <remove key="input.x11_driver"/>
      <remove key="info.subsystem"/>
      <remove key="input.device"/>
      <remove key="info.category"/>
    </match>
  </device>
............
This seems to avoid a video device is added as keyboard, but other than this there seems to be no improvement "??"-layout group still appears.

I wonder about the patches mentioned here from Peter Hutterer:
https://bugzilla.redhat.com/show_bug.cgi?id=447252#c11

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

Thomas, just to clarify: Do you have auto login enabled on your system? Your bug description is rather different from mine, and the discussion in bugzilla which you mentioned indicates that your problem could have to do with autologin.

For me, the indicator works well for some time. It definitely does NOT add the "??" layout immediately when pressing the first key, as you wrote. I did not yet find out the condition when it adds this false layout. And, I do NOT have autologin.

So, possible you have yet another bug then we have here.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

I do NOT use autologin. I put the link to these bugs just because they are similar.
What action are you doing to get it, can you trace this with test_monitor?
What is lshal / xorg.0.log saying?

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

I currently don't have access to my Linux box, but got interesting reply from Peter Hutterer:
----------------------------------------------------
On Sun, Nov 23, 2008 at 02:52:10PM +0900, Thomas Fritzsche wrote:
> after upgrading to xserver 1.5.2 using the new evdev + hal I'm observing
> that I receive an additional layout group.
> The gnome keyboard indicator is showing this as "??" and using the
> libxklavier test program I get:
>
> [1227322878,150,xklavier.c:xkl_engine_constructor/] Actual backend: XKB
> [1227322878,200,xklavier_xkb.c:xkl_xkb_load_all_info/] found 3 groups
> [1227322878,200,xklavier_xkb.c:xkl_xkb_load_all_info/] Group 2 has name
> [Germany]
> [1227322878,200,xklavier_xkb.c:xkl_xkb_load_all_info/] Group 1 has name
> [Japan]
> [1227322878,200,xklavier_xkb.c:xkl_xkb_load_all_info/] Group 0 has name [-]
>
> The German and Japanese Layout-Group is in my setup, but the system added an
> additional Group 0 with name "-"??
> I already read though your blog (http://who-t.blogspot.com/), but could not
> find anything explaining such a odd behaviour.
>
> I added a lot of description and logfiles to a bug report at this link:
> https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/283128
>
> I'm not using Autologin (that was causing trouble in other case). There are
> a lot of devices coming up with evdev/hal, but all have "de,jp" assigned
> (lshal).
> What could causing such a problem? What can I do to avoid this problem?

Sounds similar to 14373 (fixed with commit ae986d1c73d), and could have a
similar cause.

Especially comment 18 hints at that
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/283128/comments/18

Do you have the above commit in your tree?
Is there a difference between the output of "xkbcomp -xkb :0 -" before and
after it occurs?

Cheers,
 Peter
----------------------------------------
Peter is refering to the following bug:
http://bugs.freedesktop.org/show_bug.cgi?id=14373
There are 2 new patched on xorg mailing list.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

Finally at my linux box I could check this out a little, seems that it:
http://lists.freedesktop.org/archives/xorg/2008-November/040623.html

This looks pretty much I need to put these 2 patches in the xserver....
Not sure when I find the time to do this, so if you guys have a minute (or the Ubuntu package responsible could help here?)

Cheers,
Thomas

Revision history for this message
Ken Arnold (kenneth-arnold) wrote :

I've had a problem for a long time (months... back from pre-Intrepid alphas). Toshiba M200 tablet. Symptoms are very similar to Michael's. I normally use Dvorak. This happens very consistently with several different USB keyboards I've tried, different manufacturers:

boot with USB keyboard connected: no problem
boot without: no problem
boot connected, unplug: no problem
plug in keyboard: big red X on keyboard indicator panel applet, layout back to qwerty

I work around this by running "setxkbmap dvorak".

There may be bigger issues at play, because it fails to shut off after hibernation if I unplug the keyboard at the wrong time. (This also very consistent and been happening since about the same time.)

Here's from Xorg.0.log when I plug in a mouse and keyboard:

(EE) Logitech USB Optical Mouse: Read error: No such device
(II) config/hal: removing device Logitech USB Optical Mouse
(II) Logitech USB Optical Mouse: Close
(II) UnloadModule: "evdev"
(EE) DELL DELL USB Keyboard: Read error: No such device
(II) config/hal: removing device DELL DELL USB Keyboard
(II) DELL DELL USB Keyboard: Close
(II) UnloadModule: "evdev"
(II) config/hal: Adding input device DELL DELL USB Keyboard
(**) DELL DELL USB Keyboard: always reports core events
(**) DELL DELL USB Keyboard: Device: "/dev/input/event2"
(II) DELL DELL USB Keyboard: Found keys
(II) DELL DELL USB Keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "DELL DELL USB Keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) DELL DELL USB Keyboard: xkb_rules: "evdev"
(**) Option "xkb_model" "pc105"
(**) DELL DELL USB Keyboard: xkb_model: "pc105"
(**) Option "xkb_layout" "us"
(**) DELL DELL USB Keyboard: xkb_layout: "us"

Nothing out of the ordinary in dmesg, except the keyboard is registered before the mouse...

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Same problem. It occures on plugging in the USB transmitter for my external Logitech mouse/keyboard.

Revision history for this message
Bart Samwel (bart-samwel) wrote :

Hmmm, I never use an external keyboard but I do have the ?? layout. It replaced my "USA International (with dead keys)", and it still works, it just looks funny. Same problem or different problem?

Bryce Harrington (bryce)
Changed in xorg:
importance: Undecided → Medium
status: Confirmed → New
Revision history for this message
Bryce Harrington (bryce) wrote :

Fixed in Jaunty's xserver with commit ae986d1c73d.

commit ae986d1c73d2f720bd0309d8c33328d14e8eed25
Author: Peter Hutterer <email address hidden>
Date: Fri Sep 19 18:27:24 2008 +0930

    xkb: fix core keyboard map generation. #14373

    According to Section 12.4 of the XKB Protocol Spec, if a key only has a single
    group but the keyboard has multiple groups defined, the core description of
    the key is a duplication of the single group across all symbols. i.e.
    G1L1 G1L2 G1L1 G1L2 G1L3 G1L4 G1L3 G1L4

    The previous code generated G1L1 G1L2 G1L3 G1L4 G1L3 G1L4, leading to
    "invented" groups when the process is reversed.

    Note that this creates wrong key types on reconstruction from core to xkb,
    i.e. any single-group key with a key type that is not one of the canonical
    four (Sec 12.2.3), will get the assigned type on group 1, and a canonical type
    for the other gruops.

    X.Org Bug 14373 <http://bugs.freedesktop.org/show_bug.cgi?id=14373>

Changed in xkeyboard-config:
status: New → Fix Released
Revision history for this message
Michal Matyska (michal-matyska) wrote :

I see that the commit above is in the /usr/share/doc/xserver-xorg-core/changelog.gz (2:1.6.0-0ubuntu4), but this issue happens to me further on. My SECONDARY group is now replaced with the "??" text in the keyboard-indicator-applet and it's context menu "Groups" shows only the first group; fortunately the hot key switching is working, so I can use both layouts. Not sure whether there is any problem with the keycodes, because my secondary layout is standard US keyboard.

Revision history for this message
Michal Matyska (michal-matyska) wrote :

OK, it seems that I found when the keyboard indicator changes to the ?? text. It happens when I'm executing something with sudo in the terminal and the thinkfinger attaches its virtual keyboard to pass the fake Enter key after the finger is scanned.

Revision history for this message
Michal Matyska (michal-matyska) wrote :

Filled bug #348509 against thinkfinger....

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

I have to second Michal, this is not fixed for me in Jaunty. I have two layouts configure (1. Danish 2. Swiss German), after a while i get again a third one (Label on panel "??", in tooltip "Switzerland") with the funny layout aßðđj@łer↓→oþĸj...

I do not use thinkfinger though, so for me the cause must be something else.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

Bryce pointed to patch:
----
commit ae986d1c73d2f720bd0309d8c33328d14e8eed25
Author: Peter Hutterer <email address hidden>
Date: Fri Sep 19 18:27:24 2008 +0930
----
However as I found here:
http://<email address hidden>/msg02504.html
This patch causing the problem, it`s not solving it.

Put Status on "In Progress".

Changed in xkeyboard-config:
status: Fix Released → In Progress
Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

Hi Guys,

I just found that Peter Hutterer send me several patches also published on xorg mailing list.
You find this here:
http://<email address hidden>/msg02587.html

(Unfortunatly that ended up in my mailfilter :-( )

I assume these patches will fix the problem, BUT have not tried it and as I`m without access to my linux box the next 2 week, it would be great somebody here facing the problem could give it a try.

Cheers,
Thomas

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

Thomas, I'm willing to try, but I'll need a bit of guidance if you don't mind. But this is communication that doesn't belong here, if you're willing to help out I'll contact you directly.

Anyway, I tried to apply the patches to the xorg-server source package. I think the patches are outdated in that the line numbers are not correct anymore. However I don't know how to get updates *.diff files.

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

I had a little time and could finally try the patches:
Good news! It works!

Additionally:
* I compiled a single patch out of the 4 patches, that directy apply with current stable Ubuntu (intrepid) package 1.5.2
* created a pre-build debian package from latest Ubuntu source package (Intrepid)

Just check it out here:
http://linux.pengin.de/#keyboard

It would be really cool if this could be added to the standard package. Hope Bryce can pick it up.

Have fun!

Revision history for this message
Bryce Harrington (bryce) wrote :

"It would be really cool if this could be added to the standard package. Hope Bryce can pick it up."

Rats, you missed Final Freeze by like 2 days... It's too late for these patches to make it in for Jaunty. But we should get them in Karmic once we update to the newest xserver. Thanks for testing them!

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

--> Updated to jaunty today
Result:
a) Bug still exist in xorg server 1,6 (as expected)
b) Patch can be still applied and it's still solving the issue
c) Generated new pre-compiled package (incl. patch) for jaunty
For people having this issue please check: http://linux.pengin.de/#keyboard

Revision history for this message
farchumbre (farchumbre) wrote :

hi
I have a thinkpad x300 with thinkfinger installed.
I can't understand exactly how to resolve the multi keyboard problem.
Can anyone help me understand how to resolve ?
I checked the http//linux.penging.de/#keyboard site
but i still can't understand how to install the jaunty package.
Thanks

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

Hi,
1) download debian package (or comple yourself with patch)
2) sudo dpkg -i xserver-xorg-core_1.6.0-0ubuntu14_i3.deb
3) restart xserver
Hope this help.
Cheers,
Thomas

Revision history for this message
farchumbre (farchumbre) wrote :

Hi Thomas,
I am very new in ubuntu so there are many terms I still don't know.
I downloaded the zipped package to my desktop, if I click.
When write sudo dpkg -i xserver-xorg-core_1.6.0-0ubuntu14_i3.deb in the terminal it says that the file it is not found

dpkg: error processing xserver-xorg-core_1.6.0-0ubuntu14_i3.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 xserver-xorg-core_1.6.0-0ubuntu14_i3.deb

how do I restart the xserver?

Thanks

Revision history for this message
m4lte (malte-koester) wrote :

I can confirm the bug as it has previously been described. I'm using a laptop without external keyboard and I'm running 9.04 with all stable updates.
- I use two layouts US and German.
- After booting everything is fine for "some time".
- When I change something in the keyboard layout options (e.g. add and remove an additional layout) everything is fine for "some time".
- After "some time" I get an additional layout "??" which mimics one of the other layouts I'm using.

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

Thomas, I tried your patch (https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/283128/comments/37)
with my recent jaunty installation. Since I have a 64-Bit installation, I had to compile the package myself following your directions, but everything worked fine.

I can confirm that this bug now disappeared, but still there is this other issue (https://bugs.launchpad.net/ubuntu/+bug/286158), where opening windows switches the keyboard layout which is really annoying. This also happens very often when, for example, IntelliJ opens a subwindow, so the layout switches unexpectedly, thus causing erroneous inputs very often. Do you have an idea how this could be fixed?

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Thomas, I tried your patch as well and it seems to fix the problem for me too. I have already uploaded a patched source to my PPA (though it has yet to build).

Why don't you attach your patch to this bugreport so that it has more chances to be applied to the package in Ubuntu main, and thus to eliminate this bug once and forever?

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

There is some confusion here, because this bug tracks two issues.

* The "??" issue. It doesn't happen for me in Karmic. Can somebody confirm this?

* The locking issue when unplugging an external keyboard. This problem persists for me in Karmic. Can somebody please confirm, then we'll file a separate bug report for that.

Bryce Harrington (bryce)
tags: added: intrepid
Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

The "??" issue is still there for me in Karmic.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

And the patch that Thomas published can no longer be applied to xorg-server 1.6.3, so the problem becomes unfixable again.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

More investigation reveals the following behaviour in Karmic:
- if "Extra typographic characters" option is enabled in layout settings, the extra characters can be entered, but the "??" issue exists;
- if the said option is disabled, the extra characters can still be entered, but the "??" issue is not there.

So the "Extra typografic character does nothing but trigger the bug, at least in my configuration (105-keys, US and Russian layouts). Can anyone confirm this?

Revision history for this message
Paulus (paulmd-ya) wrote :

Well, it does not "trigger", the bug simply doesn't show up if there are no symbols on the third level.
I mean that [ letter otherletter ] == [ letter otherletter NoSymbol NoSymbol ] and the NoSymbol's being
added to the extra group are effectively wiped out by xkb.

The good news is there is a simple way to reproduce the bug (and maybe someone will find a simple
solution?):
1. Get a keyboard with multimedia keys (or any other keys with scancodes > 128)
2. Set up any layout with the third level (typo layout is good for making any layout being so)
3. Now press the multimedia key and you've got an extra group
4. Run setxkbmap and you don't have the extra group

Also, some xev output may be useful (the first two indicate that xkb sends new maps):
MappingNotify event, serial 43, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

MappingNotify event, serial 43, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 247

KeyPress event, serial 43, synthetic NO, window 0x3200001,
    root 0xbd, subw 0x0, time 3654219, (696,311), root:(698,424),
    state 0x2000, keycode 180 (keysym 0x1008ff18, XF86HomePage), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 45, synthetic NO, window 0x3200001,
    root 0xbd, subw 0x0, time 3654339, (696,311), root:(698,424),
    state 0x2000, keycode 180 (keysym 0x1008ff18, XF86HomePage), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Revision history for this message
Paulus (paulmd-ya) wrote :

Hmm, I've just installed Thomas' version of xserver and it is bug-free all right, but
the multimedia keys still generate MappingNotify. Either I am thinking the wrong way
or the patch fixes the symptom and not the problem by itself.

Revision history for this message
Paulus (paulmd-ya) wrote :

Okay, I've upgraded my laptop to Karmic and have manually applied the patch to the server. Looks like the symptoms have gone :)

Revision history for this message
Paulus (paulmd-ya) wrote :
Revision history for this message
Daniel (quite) wrote :

I have a system where a user has Lithuanian, Russian, and USA layouts. On a reboot, an additional Ltu2 (2 in subscript) appears. When I remove it, it comes back on the next reboot. I did not investigate much more than actually finding this bug, which kind of seems related.
No functional problems, except that it's annoying.

Using a freshly installed Jaunty system, which was immediately fully upgraded to Karmic. The problem began a few days after we began to use this new system.

Any clues... could it be the same bug somehow?

Revision history for this message
Paulus (paulmd-ya) wrote :

It looks like the same bug, and the patch will not work for you because it doesn't solve the problem: it simply gets rid of the symptoms for users with two three-level layouts (and you have three).

You may run "setxkbmap" on startup to get rid of the extra layout automatically (i.e. put it in gnome session startup) or even assign it to some key combination if the layout keeps appearing after pressing multimedia keys.

Revision history for this message
zasq (zasq) wrote :

Have this problem too (had it with intrepid and jaunty, now with karmic). My impression is that some regional keyboard layouts are not recognized as single ones. The applet then shows all keyboard-variants of a region/language. The questionmarks ("??" and "??2") disappear if you activate all variants (i. e. of the Latinamerican keyboard, which is the one I use next to the German, you have a normal variant, one without accents and one with tilde).
There must be an error which makes it difficult for the system to distinguish the variants and so it shows all of them... In my case, the bug would be in the "description" of the latinamerican layout, while the german is recognized correctly.

Revision history for this message
Religiosa (kornet-89) wrote :

I have the "??" bug on Karmic and Intrepid (2 different computers, both have russian and USA layout, additional typographic symbols enabled).
'setxkbmap' fixes it for some time, though not for long - it will appear again after some time, without any rebooting or something else. I don't have any functional keys as brightness.
The only option for now is to run setxkbmap manualy when this issue appears.

Revision history for this message
Paulus (paulmd-ya) wrote :

The https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/283128/comments/52 patch is working all right (although it is impossible to push it to the upstream). You may fetch the patched xserver package from http://repo.paulus.ru/karmic/ (you need the xserver-xorg-core package) or build one yourself.

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

There was a recent update to the xserver-core package, which made the problem reappear (because it overrides the patched version paulus provided). I recollected all info from the posts above on how to apply the patch to the latest src and build the package yourself. These are the steps you have to run:

First, 'cd' to a directory where you can safely download the source.
Then

mkdir xserver-xorg-core-src-karmic
cd xserver-xorg-core-src-karmic
apt-src install xserver-xorg-core
wget http://launchpadlibrarian.net/33566768/xserver-xorg-1.6.4.diff
cd xorg-server-1.6.4/xkb
patch -p1 <../../xserver-xorg-1.6.4.diff
cd ../..
sudo dpkg -i xserver-xorg-core_1.6.4-2ubuntu4.1_amd64.deb

Have fun!

Revision history for this message
Victor Nakoryakov (nail-xx) wrote :

Thanks a lot for instructions, Gerhard! I believe you forgot to mention build command before the last line. So it should be:

mkdir xserver-xorg-core-src-karmic
cd xserver-xorg-core-src-karmic
apt-src install xserver-xorg-core
wget http://launchpadlibrarian.net/33566768/xserver-xorg-1.6.4.diff
cd xorg-server-1.6.4/xkb
patch -p1 <../../xserver-xorg-1.6.4.diff
cd ../..
apt-src build xserver-xorg-core
sudo dpkg -i xserver-xorg-core_1.6.4-2ubuntu4.1_amd64.deb

Revision history for this message
Gerhard Radatz (gerhard-radatz) wrote :

Yes, you are right of course. Sorry ...

tags: added: karmic
Revision history for this message
Paulus (donmatteo) wrote :

The method described in Victor's comment works for me. (Thanks to all involved!)

Could this be incorporated into karmic-updates? After all, this must be a very common bug.

More importantly, can we make sure this is fixed in Lucid so that this long-standing bug finally dies? (I don't have time to install Lucid right now, but I will at a later point.)

Revision history for this message
Religiosa (kornet-89) wrote :

As for me bug dissapears adter upgrading to xserver-xorg-core 2:1.6.4-2ubuntu4.2 on amd64.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

As for me, the bug is still there with xserver-xorg-core 2:1.6.4-2ubuntu4.2 on i386, have yet to check on amd64 at home.

Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

And no, amd64 isn't fixed either, still suffers from this bug with xserver-xorg-core 2:1.6.4-2ubuntu4.2.

Gerhard's patch still works, but I'm really tired of updating my PPA every time new xserver-xorg is packaged. We have the bug confirmed, we have the patch that fixes it, what else is needed to get it into Ubuntu repositories? This bug is 3 releases old, and still not fixed. Would be amasing, if it wasn't so sad.

Paulus (donmatteo)
Changed in xkeyboard-config (Ubuntu):
status: In Progress → Confirmed
Chad Miller (cmiller)
tags: added: lucid
Revision history for this message
Paulus (paulmd-ya) wrote :

It is not a patch, it is a hack around the problem. To make it a good patch one has to find the problem, to understand the sources and to make the scalable solution (for example, this hack fails if you have four configurations instead of the three you have). Obviously the one doing this has to be a xkb developer :-) I don't think this hack will ever get to the mainline ubuntu let alone the xserver mainstream...

Revision history for this message
Paulus (donmatteo) wrote :

Perhaps related to #460328

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Just wondering, when you're experiencing the problem, what do you get if you give this?
gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd

Because I had similar symptoms, but they were caused by gdm..

Revision history for this message
Paulus (paulmd-ya) wrote :

The bug is not related to gnome, you may experience it in plain X without a window manager at all (although you will want to configure layout switching combination in xorg.conf then).

Revision history for this message
Religiosa (kornet-89) wrote :

My apologies, the bug's really still there. Probably, I forgot to restart xorg.

Bryce Harrington (bryce)
Changed in xkeyboard-config (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

Bryce, what is there to triage? The bug is confirmed since long ago, all the required information has been provided.

Revision history for this message
Bryce Harrington (bryce) wrote :

Evgeny, the 'Triaged' state means "all necessary information has been provided". ;-)

The one remaining question is, I see Chad tagged this bug 'lucid' but has anyone actually tested it on lucid? I'd love to see evidence in the form of log files taken from a lucid system.

Revision history for this message
Bryce Harrington (bryce) wrote :

I examined the patches mentioned above, and compared them against the xserver code in lucid. All the changes from the patches[1] are in the lucid xserver.

I've tried to reproduce the issue on karmic but didn't have success there, so I can't be sure I'm testing lucid correctly to verify it as fixed. You guys are going to need to do this, since you know what you're looking for. But I figure it's safe to assume if adding those patches fixed it before, then since they're in the xserver now the issue is resolved.

For future reference, if you attach patches to the bug report itself (as opposed to simply referencing them by link) then the bug will bubble up to the top of various bug listings I look at[2,3] and will be much more likely to gain attention.

Also, if you've gone to the trouble of applying a patch to the source package and building it locally, you've gone 80% of the way to fixing the package yourself. The last 20% is to create a debdiff[4] and request an SRU[5]. Not to say you *have* to do that (like I said, if you just post patches to the bug report, it brings them to my attention), but it's totally something you could do if you needed to.

Finally, I would *highly* recommend updating the description of bug reports like this one, where the original problem statement is a bit terse, and there's an explosion of comments to have to wade through to understand the current state of the problem.

1: From http://<email address hidden>/msg02587.html
2: http://www2.bryceharrington.org:8080/X/Reports/ubuntu-x-swat/patches.html
3: http://blog.launchpad.net/bug-tracking/getting-patches-upstream
4: https://wiki.ubuntu.com/PackagingGuide/Howtos/Debdiff
5: https://wiki.ubuntu.com/StableReleaseUpdates

Changed in xkeyboard-config (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Evgeny Kuznetsov (nekr0z) wrote :

I confirm, Bryce, the bug appears to be fixed in latest Lucid.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.