Can't install anything (Cannot Grab Keyboard)

Asked by Nolan Blew on 2010-06-15

I just installed a fresh copy of Ubuntu 10.04 (64-bit), and I've already had several problems. First off, I cannot install anything, because every time I do, my screen will flash for less than a second (as if it's trying to show the login password menu), and then it will come up with the message: "Could not grab your keyboard. A malicious client may be evesdropping on your session or you may have just clicked a menu or some application just decided to get focus. Try again.". This message comes up no matter what I do - running in Failsafe mode, closing all applications, restarting the computer - I just can't install anything. The only way I was able to update Ubuntu (hoping to solve the problem - which it didn't) was to go to Package Manager - as the Update Manager won't do anything but display that error.

Also, I the menus don't pop up every time I click them - maybe 1/4th of the time. And when they don't pop up, I have to click on a different menu in another application, then click back about 4-10 times before a menu will show up - drop down or selective menu.

The keyboard input doesn't always work right away as well - sometimes I have to click a textbox and wait about 10-20 seconds before I can type anything in it.

I HAVE set my keyboard to the correct location and the correct model, but this did nothing except make the "0" on my numpad not work. I do believe my computer can handle it though:

Specs:
Processor - Intel Quad Core
Memory - 4GB DDR2
Graphics: NVidia X8600
Motherboard: ESUS EN8600GT

And I can't check for updates manually because it always gives me that error - I have to wait for it to automatically check for them.

Any ideas? This really isn't the greatest first impression of Ubuntu for me.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Nolan Blew
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Before to go deeply please make sure your system is fully updated upgraded with not pending packages in this way:

press ctrl+alt+f2 to get pseudo terminal access... make login with your user and password, then type:

sudo apt-get update
sudo apt-get upgrade
sudo reboot

give your user password when requested you will not see any screen chars when you type it, then press enter.

Hth

Revision history for this message
Nolan Blew (nolanblew) said :
#2

Thanks, but it said that there were 0 packages installed/modified/removed - and same problem exists. Any more ideas?

Revision history for this message
Andrea Corbellini (andrea.corbellini) said :
#3

Hello,

In order to help you fixing your problem, we need further information. Please answer a few questions. Are you sure your hardware (keyboard and mouse) are working correctly? Did they work before installing Ubuntu? Have you tried with a different keyboard or mouse?

Thanks for your patience,
Andrea

Revision history for this message
Nolan Blew (nolanblew) said :
#4

I have tried using 3 different keyboards (2 PnP and 1 USB), and have tried 2 mice, but none work. The only problems I seem to get look like they are tied with the Ubuntu OS - because everything that goes wrong (such as the menus not coming down when I click them) are implemented in the OS, while other applications (excluding those that have Ubuntu-implemented controls such as menus and drop-down boxes) seem to work fine.

And yes, both my keyboard AND my mice have worked on this PC before I installed Ubuntu - I've been using my first keyboard and mice for about 5 years now through Windows XP, Vista, and now Windows 7 - AND MacOSX

Revision history for this message
Andrea Corbellini (andrea.corbellini) said :
#5

Press ALT+F2 and type

gnome-mouse-properties

You should try to go to the Accessibility tab and check that all the options are unchecked. If this doesn't work, could you please try to boot with a live CD and see if you encounter the same problems?

Revision history for this message
Nolan Blew (nolanblew) said :
#6

Mouse properties did nothing, even after I enabled the accessibility.

I started up the live CD - and it didn't even get to the boot menu to choose live CD, installation, repair, etc - it just came up with this error: "The installer encountered an unrecoverable error. A desktop session will now be run so that you may investigate the
 problem or try installing again." It had that error when I first installed it - all it does is go straight to Live Desktop, and from there I installed Ubuntu. However, in Live Desktop mode, everything works fine, including the menus. Although I don't think there is any sudo restrictions in LiveCD mode, but I could be wrong - and if I am, then it works fine.

Revision history for this message
Andrea Corbellini (andrea.corbellini) said :
#7

Running this command should help you:

gconftool -s /apps/gksu/disable-grab -t bool True

If you try to open the package manager, it should show the password prompt without displaying any error. It's a temporary workaround until you solve the problem, but it will work.

You said that with the live CD everything worked fine. This means that also the menus and the keyboard input were working as expected?

I would also like to ask you to send the content of some files. Here is how you can get them:

dmesg > ~/Desktop/first-log; ps ax > ~/Desktop/second-log

It would be better if you run the command as soon as you boot into the computer and log in, to make the files shorter and to be sure that the generated files don't contain any sensible information. After running the command, you should see on your desktop two files: first-log and second-log. You should paste them into http://paste.ubuntu.com/ and post here the links to the generated page.

Thanks and sorry for the problems you are experiencing.

Revision history for this message
Nolan Blew (nolanblew) said :
#8

Ok, thank you very much.

Here is the post to the logs:
first log: http://paste.ubuntu.com/450595/
second log: http://paste.ubuntu.com/450596/

Again, thank you for all of your help.

Revision history for this message
Andrea Corbellini (andrea.corbellini) said :
#9

Meanwhile, does the workaroud work?

Revision history for this message
Nolan Blew (nolanblew) said :
#10

Thanks for the help, but the package work-around doesn't work. I mean, it works as it's supposed to (it asks me for a password as I login), but right after that it freezes, and and after that (weather I close it or not), none of the menus work anymore, and none of the keyboard shortcuts work anymore (at least the 1 time I tried it - the second time just the menus didn't work, but the shortcuts did). Anyway, I have to restart my computer using the physical restart button on my computer, either that or hard-power-off the computer.

Revision history for this message
Nolan Blew (nolanblew) said :
#11

Well, to this point I still don't know what's wrong or what caused it. However, I completely wiped my partition that I'm using Ubuntu on and re-installed it - and everything is working fine now.

Thank you guys for all your help, even though it didn't work. It might of just been a bad install or something - but everything is working fine now.