Plugging in a keyboard loses the second keyboard layout when using more than one layout

Bug #376592 reported by Larry Reid
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xserver-xorg-input-evdev (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have USA and Spanish (Spain) keyboard layouts defined on my laptop, with USA being the default. When I plug in my external keyboard I can no longer choose the Spanish layout either from the keyboard layout indicator in the panel or via the keyboard shortcut I've defined. If I bring up the keyboard preferences, the Spanish keyboard is still in the list. To work around the problem, I either delete it and re-add the Spanish layout, or restart Gnome (log out and log in).

Sometimes after unplugging and plugging in the keyboard, attempting to switch layouts will cause the keyboard indicator to display "??" instead of "USA" or "Esp". Sometimes it simply displays "USA". In either case, the keyboard responds with the USA layout, meaning not easy access to the Spanish characters.

I'm running on a Lenovo Thinkpad x300. The original Ubuntu install was 8.04 and I've upgraded (using the upgrade process via Synaptic, not by reinstalling) to 8.10 and now 9.04. I have an external PS/2 keyboard in Spanish/Spain physical layout that I plug in to the laptop through a PS/2 to USB cable. The laptop has a USA physical layout.

I first noticed this with 8.10, but I can't say for sure that it wasn't a problem in 8.04 as I didn't use the external keyboard very much with 8.04. On 8.10, the problem also happened when I suspended and resumed, but that seems to be fixed in 9.04. I can suspend and resume and the Spanish layout is still available. However, if I actually unplug the external keyboard and plug it back in, I lose the Spanish layout.

This may be the same problem as bug 373297, and might also be related to bug 274617.

Thanks for any help. I'd be more than happy to provide more information or test possible solutions. Just let me know.

Revision history for this message
Larry Reid (lcreid) wrote :

I'm guessing that it's package xorg.

affects: ubuntu → xorg (Ubuntu)
Bryce Harrington (bryce)
affects: xorg (Ubuntu) → xserver-xorg-input-evdev (Ubuntu)
Revision history for this message
Larry Reid (lcreid) wrote :

/usr/lib/hal/debian-setup-keyboard runs each time a keyboard is plugged in. debian-setup-keyboard sets the keyboard model, layout, variants and options from what's in /etc/default/console-setup, which doesn't reflect anything set up by the keyboard preferences.

I can modify debian-setup-keyboard to set the values from the values returned by xprop on the root window, or to use the values in /etc/default/console-setup if I can't get them from xprop. I'll try to make time to do that tonight or tomorrow morning, and I'll post the revised debian-setup-keyboard here then.

Revision history for this message
Larry Reid (lcreid) wrote :

Doh! I made two nifty scripts for setting the keyboard automatically, but neither works. When /usr/lib/hal/debian-setup-keyboard runs in response to a keyboard being plugged in, it doesn't know which user plugged in the keyboard or which display they're using. Therefore, it can't get the keyboard preferences. There's a reason why this doesn't work right. It's hard!

Perhaps there's a way to get hal to notify the gconf daemon to force it to reapply the user's preferences?

P.S. All this is way beyond me. If you experts want to chime in with a few hints about where to look, I'd sure appreciate it.

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

Other bug subscribers

Remote bug watches

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