keyboard layout broken if restart without usb keyboard

Bug #214984 reported by Dieter P
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xkeyboard-config (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi, I'm using a macbook pro santa rosa 15", azerty keyboard but with dvorak layout.

 * At work i have an external monitor (vga, attached to the nvidia card) and external mac azerty keyboard attached through usb (alhough i always want to type in dvorak no matter the keyboard)
 * At home i use the laptop without extra screen or keyboard.

At work all is fine, my keyboard works great (and in dvorak).
But at home - without the usb keyboard - the login screen is in dvorak, but after logging in the keyboard layout is really weird (and not just azerty or querty) : most of the buttons don't even do anything, and buttons like h and t (in dvorak, j and k in azerty) produce characters like 2 and 1 .

This is like this for a few days : broken at home , at work no problem at all. Yesterday i tried selecting 'gnome session' and 'failsafe gnome' instead of the default session but got exactly the same behavior. At some point I even got an error message asking me to report some things but I could'nt type anything so....

So today, at work again I boot again with usb keyboard and I get "Error activating XKB configuration.", asking me to post the output of 2 commands (see below)

Info :
ubuntu hardy (apart from maybe 30 hours, containg all latest updates (with default options, no backports, hardy-proposed etc)
dieter@dieter-mbp:~$ lsb_release -rd
Description: Ubuntu hardy (development branch)
Release: 8.04
Xorg 10400090
dieter@dieter-mbp:~$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "xorg", "pc105", "us", "dvorak", "lv3:ralt_switch"
_XKB_RULES_NAMES(STRING) = "xorg", "pc105", "us", "dvorak", "lv3:ralt_switch"
dieter@dieter-mbp:~$ gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd
 layouts = [us dvorak,be iso-alternate]
 model = macbook79
 options = [lv3 lv3:ralt_switch,grp grp:alts_toggle]
 overrideSettings = true
[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub [8086:2a00] (rev 03)
     Subsystem: Apple Computer Inc. Device [106b:00a0]
01:00.0 VGA compatible controller [0300]: nVidia Corporation GeForce 8600M GT [10de:0407] (rev a1) (prog-if 00 [VGA controller])
     Subsystem: Apple Computer Inc. Device [106b:00a0]

Revision history for this message
Dieter P (dieter-plaetinck) wrote :

To clarify, the error message i got first at home was the same one i got the next day at work.
Also, trying different sessions (gnome, gnome failsafe) instead of the default one seemed to start triggering the xkb error on every boot, even though the problem existed already for a week or so.

I update every day and the problem is still there btw.

Now, at home, I attached a compaq usb keyboard and the keyboard works fine ( for some reason I didn't even get an xkb error message, even though i get them at work with the mac usb keyboard)

Revision history for this message
Dieter P (dieter-plaetinck) wrote :

I just did a full reinstall. I installed hardy from the alternate CD (amd64) on LVM volumes on an encrypted partition.

I still have the same problem : the keyboard of the macbook works fine when entering the password for the encrypted volume and when logging in, but shows the same weird characters while in X.
When i switch to a virtual console with ctrl+alt+Fx it works fine again
So it's apparently only in X, although I don't see anything wrong with the xorg.conf:

---------xorg.conf snippet----------
Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    Option "XkbVariant" "dvorak"
    Option "XkbOptions" "lv3:ralt_switch"
EndSection
---------end xorg.conf snippet----------

dieter@dieter-mbp:~$ lsb_release -rd
Description: Ubuntu 8.04
Release: 8.04
dieter@dieter-mbp:~$ xprop -root | grep XKB
dieter@dieter-mbp:~$ gconftool-2 -R /desktop/gnome/peripherals/keyboard/kbd
 layouts = []
 model =
 overrideSettings = true
 options = []

Revision history for this message
Dieter P (dieter-plaetinck) wrote :

I tried changing sessions, all give problems including 'failsafe gnome', except failsafe xterm. in this session the onboard keyboard works perfectly

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

Hi dieter-plaetinck,

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with the latest development release of Ubuntu? (ISOs are available from cdimage.ubuntu.com)

If it remains an issue, could you also attach a new /var/log/Xorg.0.log?
Thanks in advance.

The output of lspci -vvnn would also be worth having.

Changed in xorg:
status: New → Incomplete
Revision history for this message
Dieter P (dieter-plaetinck) wrote :

Yes I still have this issue, after all this time.
However I switched to another distribution (Arch Linux 64bit). I re-used my xorg.conf and I'm having the same issues. The keyboard is broken in the same way (only in xorg), although I don't get the popup errors (but that's probably an ubuntu feature. I switched to Xfcee too btw)

So it looks like an xorg (configuration) issue, independent of the distribution.
My xorg-server is now (on Arch) 1.4.2, xorg-xkb-utils & xorg-utils 7.3.

Right now I'm playing with the kbd xorg keyboard driver and trying out (our leaving out) various options (XkbModel, XkbLayout, XkbOptions etc). What I notice is that sometimes when I started X and Xfce is loaded, the keyoard on the laptop works just fine, but a while later the layout is f*** again (maybe because I've typed on the usb keyboard in the meanwhile?).
This happens with these settings:
<code>
Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "XkbRules" "xorg"
    Option "XkbModel" "macbook79"
# Option "XkbModel" "pc105"
    Option "XkbLayout" "be"
    Option "XkbVariant" "dvorak"
# Option "XkbOptions" "lv3:ralt_switch"
EndSection
</code>

Revision history for this message
Dieter P (dieter-plaetinck) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

It would be great if you could test against xserver 1.5 (testing against the Intrepid live cd would be ideal.)

Revision history for this message
Dieter P (dieter-plaetinck) wrote :

Okay, I'll try that.
For the record, here is some interesting xev output:

# Just started X here. the onboard keyboard works. I type on the 'j' key of the azerty keyboard (which means 'h' in dvorak)
KeyPress event, serial 32, synthetic NO, window 0x2000001,
    root 0x13b, subw 0x0, time 5443549, (723,-6), root:(836,101),
    state 0x0, keycode 44 (keysym 0x68, h), same_screen YES,
    XLookupString gives 1 bytes: (68) "h"
    XmbLookupString gives 1 bytes: (68) "h"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x2000001,
    root 0x13b, subw 0x0, time 5443625, (723,-6), root:(836,101),
    state 0x0, keycode 44 (keysym 0x68, h), same_screen YES,
    XLookupString gives 1 bytes: (68) "h"
    XFilterEvent returns: False
# A few minutes have passed. I've used an external keyboard. the onboard keyboard doesn't work anymore. pressing the same key as before gives this:
KeyPress event, serial 29, synthetic NO, window 0x1c00001,
    root 0x13b, subw 0x0, time 9398642, (1311,60), root:(2765,124),
    state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1c00001,
    root 0x13b, subw 0x0, time 9398718, (1311,60), root:(2765,124),
    state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

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

Sounds similar to 295990 but symptoms aren't exactly the same so not sure whether this is a dupe.

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

With Intrepid and Jaunty, we've moved from the -kbd driver to -evdev, so this bug may have just gone away.

Can you please test it against Jaunty to verify whether it is still an issue? If it is, then this bug probably actually belongs to xorg-server. ISOs of Jaunty are available at http://cdimage.ubuntu.com/releases/jaunty/ - thanks ahead of time.

Changed in xkeyboard-config:
status: Incomplete → Confirmed
status: Confirmed → Incomplete
Revision history for this message
Dieter P (dieter-plaetinck) wrote :

Hi, I don't have the macbook anymore. I'm on a totally different platform now. (a dell d620, which works much better for me)
Thanks for your ideas and help, but now I can't test anymore on the macbook...

Dieter

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

Since the hardware is no longer available for doing troubleshooting with, we'll have to close the bug for now. However please feel free to reopen if you or anyone else has the same HW and can reproduce this issue using the latest development version of Ubuntu and is willing to do some troubleshooting with it.

Changed in xkeyboard-config:
status: Incomplete → Invalid
Revision history for this message
Johan Ehnberg (johan-ehnberg) wrote :

The bug is closed, but for future reference:

It sound like the external keyboard turned and left Num Lock on, which on a laptop keyboard results in the right side of the keyboard to give numbers etc. Not all laptop keyboards have these marked, which may cause difficulties in noticing this. I checked and J -> 1 is one of these mappings.

To fix this simply turn off Num Lock.

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.