1

Ubuntu 14.04 LTS console running in VirtualBox in Win7 locks up when pressing Caps Lock: no further keyboard input is accepted, not even Alt+CursorRight or Ctrl+Alt+Del (issued from VirtualBox).
Edit: happens only after swapping Y and Z by issuing
echo -e keymaps 0-2,4-5,8,12 \\n keycode 21=z \\n keycode 44=y | loadkeys

I am able to unlock the console and continue working with no problems after issuing a reset 2>/dev/tty1 from a ssh session.
I'm even able to issue the reset from inside the locked console itself using gpm (pressing middle mouse button) when the reset command is in the gpm buffer.

Reproducible everytime and on any /dev/tty<n>.

Same effect in VirtualBox versions 4 and 5.
Seems the lock does not occur on the side of VirtualBox because it can be cured on linux's side.

There are no differences in the output of stty -a < /dev/tty1 before and after that reset.

Other vcs continue to work (chvt issued from ssh), but after Alt+F1 the locked console is still locked: Seems the issue must be located inside the virtual console code.

There are no messages appearing in /var/log/syslog or dmesg when that issue happens (when CapsLock pressed). There was one non-reproducible issue that is possibly caused by saving/restoring the VM and might be unrelated:

atkbd serio0: Spurious NAK on isa0060/serio0. Some program might be trying to access hardware directly

in dmesg.

How can I debug this?
In particular: How can I find the console status difference before and after the reset ?

3
  • The atkbd serio0 seems to be related: atkbd is the driver for a PC keyboard, and isa0060 seems to be I/O port 0x60, which is actually the one used by the AT or PS/2 keyboard controller. You might try to switch the virtual machine to a virtual USB keyboard to see if it changes anything. Not sure if there is a GUI option, I did it (in my VM named "Ubuntu") with this command: "c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm Ubuntu --keyboard usb. You might need to adapt it for your VM. If you want to switch back to PS/2 keyboard, replace usb with ps2.
    – Ale
    Nov 11, 2015 at 22:30
  • Tried that: Does not change anything. Rebooting does not reproduce the atkbd message anymore: That seems to have been caused by saving/restoring the VM. But I found that the lockup occurs only after echo -e keymaps 0-2,4-5,8,12 \\n keycode 21=z \\n keycode 44=y | loadkeys that I do routinely for my personal keyboard layout.
    – Juergen
    Nov 11, 2015 at 22:51
  • Tomorrow I will test whether that reproduces on a real Ubuntu PC without VirtualBox.
    – Juergen
    Nov 11, 2015 at 23:00

1 Answer 1

0

Try to change the command to:

echo -e keymaps 0-127 \\n keycode 21=z \\n keycode 44=y | loadkeys

I could reproduce the issue on a physical PC running Ubuntu 14.04 LTS (although the command does not have any other effects because the Swiss French keymap I use already has Y and Z in that position), and changing the 0-2,4-5,8,12 to 0-127 in the command seems to solve it. I don't completely understand why it hangs with the other command, but my intuition is that the specified keymap ranges undefine the existing ones in the keymap, thus undefining the state of all keys when Caps Lock is turned on (issuing this command also creates the problem: echo -e keymaps 0-2,4-5,8,12 | loadkeys). Not sure if it is a bug or an intended feature.

2
  • Yeah, that works. Thanks and sorry for the delay.
    – Juergen
    Dec 18, 2015 at 18:50
  • But my question is still not fully answered: How can I debug this? In particular: How can I find the console status difference before and after the reset ?
    – Juergen
    Dec 18, 2015 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .