Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running Ubuntu 11.04 x86 guest under VirtualBox 4.2.6 in a Win7 X64 host.

Bear with me... this is a strange one. Once booted into Ubuntu nothing inside the Ubuntu guest seems to recognize keyboard input: Login screen, Gnome Terminal, gedit, etc. I can't use Alt+Tab to switch between windows, can't switch between workspaces using the keyboard. Mouse works as expected. I can't enter virtual console (terminals) via Ctrl+Alt+F1 through to F7, etc. Nothing. The keyboard does work while inside GRUB, however.

Everything's been working fine for a long time (been using this guest under various versions of VirtualBox for well over a year, no problems - and upgraded to VB 4.2.6 at least a week ago.)

At some point today, VirtualBox crashed (yeah, this happens on occasion). I restarted the guest, and the keyboard input was no longer working. This is the first time this has happened.

The virtual keyboard on the logon screen does work, and once logged in, I can paste text from the VirtualBox host clipboard to enter commands in the Gnome Terminal bash shell.

So, running sudo showkey in Gnome Terminal (by pasting in the command and my password) shows scan codes making their way into the guest when I press various keys:

$ sudo showkey
[sudo] password for inactivist: 
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode  30 press
keycode  30 press
keycode  30 press
keycode  31 press

This is very strange. Nothing in the Ubuntu guest responds to keystrokes or input, yet the system sees scan codes when I press keys while showkey is running.

I've searched for hours on Ubuntu forums and other resources, nothing I've found so far helps.

Here's what I did during the initial troubleshooting phase:

  • Rebooted Windows 7, from a cold start. No change.
  • Verified Slow Keys (accessibility option) is disabled using documented methods. No change.
  • Tried different keyboards on the host system. No change.
  • Re-installed the VirtualBox Guest Additions (as root) several times No change.
  • Launched other guest Ubuntu OS instances in VirtualBox. Keyboard works fine in other guests. So I don't think this is a VirtualBox host plumbing problem.
  • EDIT: And (per ObsessiveSSOℲ suggestion) uninstalled Ubuntu Guest Additions by running /opt/VBoxGuestAdditions-4.2.6/ as root and rebooting. No change.

I'm lost here. What else should I check to diagnose a keyboard problem like this in Ubuntu? I'm thinking it's a driver or configuration problem.

Are there specific logs or utilities that might help pinpoint this problem?

Edit1 - F-Lock key not the problem

Update: A bit more searching revealse these resources:

  • Virtual terminal not working Is the lame F-Lock key causing the problem? No, that's the first thing I checked, and plugging in an older USB keyboard that doesn't have the F-Lock key -- no change. But it mentions using evt to monitor events, and additional resources...
  • A mail archive discussing the F-Lock key virtual terminal key breakage...

Using sudo chvt 1, I am able to access a virtual terminal and the keyboard input works in the virtual terminal. Perhaps this is an X keyboard mapping problem...

Edit2 - xev shows now keyboard events

xev shows no keyboard input events. Strange.

Edit3 - Upgrade to 12.04 fixes keyboard input, slow keys may be triggered silently

'Upgrading' the VirtualBox guest instance to 12.04 (Precise) 'fixed' the problem. But this doesn't tell me why the problem existed in the first place, though now I know it's not a VirtualBox problem.

In addition, I found this issue of recent vintage and this Redhat issue indicating that the slow keys feature may have been triggered somewhere silently with no log entry, and that changing the settings to disable slow keys may not actually disable it. The investigation continues...

Edit4 - verify low-level keyboard input

Running hd /dev/input/by-path/platform-i8042-serio-0-event-kbd as root shows incoming data when keys are pressed inside Gnome desktop. Source:

Edit 5 - /lib/udev/findkeyboards shows no keyboards

Following the Ubuntu wiki's Hotkeys troubleshooting advice through step 5 -- per Fixing broken keys in /usr/share/doc/udev/README.keymap.txt, running /lib/udev/findkeyboards (as normal user or root) shows no output (exits with no messages.)

Edit 6 - Giving up (for now)

I don't have time to figure this out, so I'm going to create a new VirtualBox guest with 12.04 and migrate to that version. I'll keep the old instance around to ease the transition.

If someone posts troubleshooting suggestions, I'll try them on my archived 11.04 Ubuntu install and I'll report the results here.

Thanks for the suggestions!

share|improve this question

closed as too localized by Luis Alvarado Mar 13 '13 at 19:32

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This is a thorough and interesting question. Please keep it up! – Mochan Dec 27 '12 at 9:48
Question is good, but any reason for using Ubuntu 11.04 still? It's EOL'd in October. – gertvdijk Dec 27 '12 at 10:37
@gertvdijk - Yes, there is a reason: this is my main development system and upgrading is not a no-cost and no-risk operation, despite Ubuntu's efforts on that front. I wanted to avoid downtime during a development cycle. I was going to attempt an upgrade during the next week, but with the current state of affairs, will the upgrade make matters worse? So: I have backups, but wanted to understand why this is happening. In any case, it's a VirtualBox image, so I will clone it try an upgrade to see if it fixes things. Still, I'd like to fix this before making changes. – Inactivist Dec 27 '12 at 17:35
Can you try disabling VirtualBox Guest additions? – hexafraction Dec 27 '12 at 18:24
@ObsessiveSSOℲ - Good question! I'll give that a try. I should mention that I've reinstalled the Guest Additions several times, thinking that might be part of the problem, no change. I'll update my question... – Inactivist Dec 27 '12 at 18:28