Mouse left click stops working

53,930

Solution 1

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.

Solution 2

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

Solution 3

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

Solution 4

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.

Solution 5

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.

Share:
53,930

Related videos on Youtube

user668074
Author by

user668074

Updated on September 18, 2022

Comments

  • user668074
    user668074 almost 2 years

    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.

    • dirkt
      dirkt about 7 years
      Use evtest as root and xev to find out at which level the mouse clicks disappear. Also, look into dmesg for possible errors.
    • user668074
      user668074 about 7 years
      Ok. Next time it happens I will have a look using these commands.
    • user668074
      user668074 about 7 years
      @dirkt, I ran xev and evtest. I modified he main question with the results.
    • dirkt
      dirkt about 7 years
      (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?
    • user668074
      user668074 about 7 years
      @dirkt, I'm not sure what output from xev or evtest since it just tells me that buttons have been pushed. Next time it happens I'll check the log files. I typically run Firefox, a password manager, Emacs, and a terminal window.
    • Kevin
      Kevin over 6 years
      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.
    • user668074
      user668074 over 6 years
      @Kevin, Thanks for more feedback on the problem. It's 6 months later and I still have no long term fix for the problem. If you have a similar setup to me, a quick fix I found is to open a terminal (learn the keyboard shortcut!) and type xinput. From the list of devices provided, identify which is probably the mouse, for me it is something like "generic mouse". Then type xinput disable 123 where 123 is the ID of the mouse device. This seems to fix the issue until I shutdown again.
  • peterh
    peterh about 6 years
    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.
  • HD189733b
    HD189733b over 5 years
    @Waqleh Unfortunately, no. This workaround is not very annoying. I'm lazy to spend more time to find a better solution.
  • 300
    300 over 5 years
    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.
  • Klaatu von Schlacker
    Klaatu von Schlacker over 5 years
    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.
  • Alireza
    Alireza about 5 years
    Mine was not a slow program, but vscode asking for confirmation before closing a document.
  • Ben Kushigian
    Ben Kushigian almost 5 years
    This worked for me as well. I tested by clicking the upvote button
  • BakaKuna
    BakaKuna almost 5 years
    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.
  • Waqleh
    Waqleh almost 5 years
    the first command alone seams to resolve the issue
  • ComputerScientist
    ComputerScientist almost 5 years
    Alas this solution did not work for me :(
  • Guillaume Berche
    Guillaume Berche over 4 years
    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
  • Abhi
    Abhi over 4 years
    Superb! Works great
  • antgel
    antgel over 4 years
    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!
  • rsenna
    rsenna about 4 years
    To me it worked only after I executed both commands twice (Xfce, Ubuntu 19.10).
  • user7813906
    user7813906 over 2 years
    Switching to another virtual console and back again worked for me on 20.04 LTS. I'm on Pop!_OS on an Oryx Pro 6 - same exact issue - system stops responding to the left mouse button after suspend. (I thought the value of this comment would be to showcase that the problem still exists on 20.04, and the workaround here still works).
  • lacostenycoder
    lacostenycoder over 2 years
    what is "this" ? Can you be more specific?