Ubuntu – Mouse clicks suddenly stopped working in Ubuntu

mouseUbuntu

This is a weird one. For some reason, last night my mouse partially stopped working. Movement is fine, but the mouse buttons don't work. Mainly it's the left button, but occasionally the right click and scroll-wheel fail too.

Initially I thought it could be the mouse itself (the left button seemed to get a bit "soft" recently), but I tried another mouse and had the same issue. Both are USB wireless optical mice. The keyboard is working okay 95%, only problem is Alt+Tab doesn't seem to work. Both keys work fine independently.

At the time it happened I was using Chrome, I dragged to scrollbar to scroll and when I released the mouse it was still holding scrollbar.

I'm using Ubuntu 9.10, I upgraded weeks ago and everything was working fine so I don't think it's related to that. I also hadn't run any updates (I have now just in case something fixed it). But no luck.

Any ideas?

Best Answer

Got this one too. The odd thing is, it doesn't take clicks from my mouse, but it fully recognizes my touchpad.

Anyway, opening a terminal (e.g., with Ctrl+Alt+T) and typing:

metacity --replace &

will make it work if you're using compiz. If you want compiz back, type:

compiz --replace &

and the mouse will work again.

It's easier getting to the terminal if you have Gnome-Do or if you assign a hotkey to it (like the super/windows key or tilde (~).

WARNING: Don't stop metacity/compiz commands once started or you'll be in worse situation than you were before.

WARNING 2: The above command can force to log out, but still it's useful for issues like:

  • command key (super key) doesn't work
  • left click doesn't work