40

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.

7
  • 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, 2017 at 8:41
  • Ok. Next time it happens I will have a look using these commands.
    – user668074
    Jun 4, 2017 at 9:10
  • @dirkt, I ran xev and evtest. I modified he main question with the results.
    – user668074
    Jun 4, 2017 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, 2017 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, 2018 at 15:48

6 Answers 6

55

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.

7
  • where you able to find a permanent solution?
    – Waqleh
    Oct 21, 2018 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, 2018 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, 2018 at 23:06
  • 14
    This worked for me as well. I tested by clicking the upvote button Jul 3, 2019 at 17:02
  • Alas this solution did not work for me :( Aug 23, 2019 at 21:35
16

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

4
  • 4
    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
    Jun 2, 2018 at 17:58
  • 2
    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. Feb 17, 2019 at 18:33
  • 2
    the first command alone seams to resolve the issue
    – Waqleh
    Aug 2, 2019 at 8:09
  • 1
    To me it worked only after I executed both commands twice (Xfce, Ubuntu 19.10).
    – rsenna
    Apr 22, 2020 at 19:05
6

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
3
  • 1
    Mine was not a slow program, but vscode asking for confirmation before closing a document.
    – Alireza
    May 1, 2019 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 Nov 13, 2019 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, 2020 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.

2

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.

1
  • 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, 2019 at 12:41
1

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

sudo modprobe -r psmouse
1
  • what is "this" ? Can you be more specific? Mar 29 at 14:06

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