20

On Xubuntu, for a long time I've had an issue where my Left mouse button stops working for some reason. It happens pretty much everyday. Everything else seems to work.

The only way I can get my mouse to work again is to logout and login, which requires me to shutdown all my programs.

Obviously this is very annoying, I've had this issue for almost a year and I've assumed that an update would fix it but it still happens.

Is anyone else aware of this issue and possible fixes?

I'm using Xubuntu as my Desktop Environment. I'm currently on Ubuntu 16.04 LTS.

Edit:

It happened again and I used xev and evtest to see what events are recognised. xev did not respond to Left button clicks but evtest did respond to Left button clicks.

Edit (2018/01/22): Just an update. I still have the problem, but I have a short term fix. When the left mouse button stops working, I use Ctrl+Alt+T to bring up the terminal. I enter xinput in the terminal, which brings up a list of devices. I search for which device is probably the mouse (it has name like generic mouse) and I find the associated ID number. I then enter the command: xinput disable ID where ID is the ID number of the mouse. This fixes the problem until I shutdown the computer.

Also, for more information about the problem, the same mouse works for my Windows 10 installation, so I think the mouse is fine. The same problem also occurs in Kali Linux, except that Kali linux doesn't have xinput installed so I can't use my quick fix.

  • 1
    Use evtest as root and xev to find out at which level the mouse clicks disappear. Also, look into dmesg for possible errors. – dirkt Jun 4 '17 at 8:41
  • Ok. Next time it happens I will have a look using these commands. – user668074 Jun 4 '17 at 9:10
  • @dirkt, I ran xev and evtest. I modified he main question with the results. – user668074 Jun 4 '17 at 12:57
  • 1
    (It would have been nice to provide the actual output, just in case something weird happened. We can only debug based on information you give, so the more information you give, the better). That means something in X goes wrong. Look into /var/log/Xorg.log to see if there are any messages when the mouse stops working. Also run xinput -list and then xinput -test 123, where 123 is the id of your mouse. You focused the xev window? You can see keypresses in xev? Do you run any programs that could swallow up left button clicks? – dirkt Jun 4 '17 at 13:43
  • 1
    I have had this problem too. It just happened, and I discovered that disabling my touchpad in the mouse preferences made the left button start working again. Also, interestingly, changing to a left-handed mouse swapped which button worked and which did not. I am not sure, but I think I might have also had this problem on this laptop when booting into Windows. – Kevin Jan 18 '18 at 15:48
32

I have a Dell Inspiron 15 7559. The left click stops working once in a while when I was using Ubuntu 16.04. After I installed Ubuntu 18.04, the left click stops working almost every time after I resume from suspend.

The best solution I found is switching to another virtual console (TTY) by Alt + Ctrl + F1. The mouse works normally after switching back with Alt + Ctrl + F7.

| improve this answer | |
  • where you able to find a permanent solution? – Waqleh Oct 21 '18 at 9:57
  • @Waqleh Unfortunately, no. This workaround is not very annoying. I'm lazy to spend more time to find a better solution. – HD189733b Nov 3 '18 at 20:55
  • 2
    This worked for me as well. I just switched to another visual console using "Ctrl + Alt + F2" and then without doing anything switched back to first console using "Ctrl + Alt + F1". Both right and left mouse clicks were not working properly and after doing this, both work fine. Thanks a ton HD189733b. – 300 Dec 11 '18 at 23:06
  • 4
    This worked for me as well. I tested by clicking the upvote button – Ben Kushigian Jul 3 '19 at 17:02
  • Alas this solution did not work for me :( – ComputerScientist Aug 23 '19 at 21:35
7

Try this: sudo modprobe -r psmouse sudo modprobe psmouse proto=imps

| improve this answer | |
  • 2
    He, welcome on the Unix SE! I suggest to give more details in your answers, giving only some commands to copy-paste is not very good. – peterh - Reinstate Monica Jun 2 '18 at 17:58
  • 1
    This is the correct answer on how to recover from the problem (you probably need to look through Xorg.0.log to diagnose why it is happening). The first command, which can also be written as 'sudo modprobe --remove psmouse' removes the mouse driver from the kernel, and then the second command reinstates it. It's the equivalent of turning it off and then back on again. – Klaatu von Schlacker Feb 17 '19 at 18:33
  • 1
    the first command alone seams to resolve the issue – Waqleh Aug 2 '19 at 8:09
  • To me it worked only after I executed both commands twice (Xfce, Ubuntu 19.10). – rsenna Apr 22 at 19:05
5

I just had this (mouse can move but clicks do nothing) happen.

I realized that in the background a program window had been too slow to close and Gnome had shown a popup asking "Force close" or "Wait".

In my case, the procedure below liberated my mouse:

  1. Go to that popup using ALT-TAB
  2. Select an option using TAB
  3. Press Enter
| improve this answer | |
  • 1
    Mine was not a slow program, but vscode asking for confirmation before closing a document. – Alireza May 1 '19 at 10:37
  • Mine was not a slow program, but intellij supposidely displaying a hidden dialog box. Pressing escape to close the hidden modal dialog box solved the issue. Within OS settings -> devices -> mouse & touchpad, the mouse was clicking fine in the test tool – Guillaume Berche Nov 13 '19 at 12:42
  • 1
    Nicely done, thank you. In my case, the SweetHome3D program was causing the problem. I Alt-Tabbed to it and closed with Alt+F4, and voila! – antgel Mar 4 at 7:50
2

I had the same issue in Ubuntu 17.10. I could move the cursor but none of the mouse buttons worked. I tried various solutions like auto update drivers, the metacity and compiz, but it didn't work. One solution which was mentioned was to remove nvidia drivers (My PC has 550Ti). After uninstalling that, my mouse is working fine.

| improve this answer | |
1

I just had this happen and none of the above solutions were related. It turned out to be related to a VM in VirtualBox that grabbed part of my mouse. Shutting down the VM fixed the issue.

I've had VirtualBox grab my mouse many times before, but somehow this was different and grabbed the whole mouse including movement. This time I could move my mouse around outside the VM, use Super+arrows to change desktops in the house, but the mouse buttons or wheel didn't work. Unplugging/replugging it didn't work, removing the psmouse driver didn't work and xinput disable/enable didn't work. What I found really weird is that xev didn't even register any mouse click events. Also clicking inside the problem VM didn't work either.

| improve this answer | |
  • I had the same problem with QEMU. Got stuck halfway through an update and never released the left mouse button for some reason. sudo systemctl libvirt-guests solved my problem. – BakaKuna Jul 16 '19 at 12:41
1

This worked for me. Chrisp info -> My touchpad might have been malfunctioning. Disabling it solved the problem.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.