Often after hibernation, after login but also frequently randomly while using the OS the touchpad seems to stall while keyboard is still working.

There has been a bug report a long while ago so this issue seems to have been occurring on multiple hardware and Ubuntu versions, and so it does in my case:

$ lsb_release -rd
Description:	Ubuntu 20.04.1 LTS
Release:	20.04

$ uname -r
5.4.0-42-generic

There are a few proposed solutions:

  • Upgrade kernel to 5.6. As other users pointed out that this did not solve the issue, I did not bother to try out this.
  • Disable/enable the touchpad
  • Remove psmouse module and add it again
  • Restart the desktop environment

The one that works for me (at least momentarily) is restarting the desktop environment

Restarting the Desktop Environment

There are several methods. Following methods consider that only the keyboard is working:

  • Via “Run a Command” dialog
    1. To open the “Run a Command” dialog, press alt + f2(fn) (the fn is the function key that might be necessary on some laptops)
    2. Press r and enter
    3. Wait a little
  • Via terminal:
    1. Open a terminal: Press ctrl + alt + t
    2. Execute: gnome-shell --replace & disown
      Other commands to try: sudo systemctl restart gdm or sudo systemctl restart systemd-logind which will restart the desktop environment as a consequence

Disable/Enable the Touchpad

First find out the input device id of your touchpad:

xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ DLL096D:01 06CB:CDE6 Mouse              	id=11	[slave  pointer  (2)]
⎜   ↳ DLL096D:01 06CB:CDE6 Touchpad           	id=12	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Video Bus                               	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ Sleep Button                            	id=8	[slave  keyboard (3)]
    ↳ Integrated_Webcam_HD: Integrate         	id=9	[slave  keyboard (3)]
    ↳ Integrated_Webcam_HD: Integrate         	id=10	[slave  keyboard (3)]
    ↳ Intel HID 5 button array                	id=13	[slave  keyboard (3)]
    ↳ Intel HID events                        	id=14	[slave  keyboard (3)]
    ↳ Dell WMI hotkeys                        	id=15	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=16	[slave  keyboard (3)]

In this case it is 12

Then disable and enable:

  • xinput --disable 12
  • xinput --enable 12

Remove and Reattach psmouse Module

This suggestion sounded a bit strange to me. Is the psmouse module responsible for the touchpad? Well, in any case this was suggested:

  • sudo rmmod psmouse or sudo modprobe -r psmouse
  • sudo modprobe psmouse