Touchpad has decided to stop working

Hello, new member, first post. And even though I've explored Linux for 2 years, it's not my daily driver so I still consider myself a newbie.

I've had Zorin 16 Core installed on my Lenovo Flex 3 since about the time it was released and everything worked fine until recently, when I noticed that even though the wireless mouse still worked, the touchpad no longer did. This device also has MX Linux and the original Windows 10 installed on it...and the touchpad continues to work fine with them.

So I decided to go into Settings to check the status of Mouse & Touchpad (oh, okay, trackpad, touchpad, whatever). It was enabled and all settings as desired.

Searching online for info, I found this page:

How to Fix a Touchpad Not Working in Linux - Make Tech Easier

And from those instructions I ran:

xserver-xorg-input-libinput

xserver-xorg-input-evdev

xserver-xorg-input-mouse

…and even the additional one suggested with “synaptics” as the last word in the command.

Each command produced “command not found.”

At the end of the article it said:

"There is one final thing you can try if your touchpad isn’t working and you’re using an older distribution. Try a newer Linux distro. It takes time and effort, yes, but newer distros have newer kernels which means better hardware support."

Having just updated this morning to 16.2 and with even 16 not being that old, this shouldn’t be necessary...should it?

What does

sudo apt install -y xserver-xorg-input-all

yield?

Reading package lists... Done
Building dependency tree
Reading state information... Done
xserver-xorg-input-all is already the newest version (1:7.7+19ubuntu14).
xserver-xorg-input-all set to manually installed.
The following packages were automatically installed and are no longer required:
fonts-comic-neue gir1.2-animation-glib-0 gir1.2-ges-1.0 javascript-common
libanimation-glib0 libanimation0 libboost-date-time1.71.0 libcmis-0.5-5v5
libfwupdplugin1 libges-1.0-0 libgpgmepp6 libjs-jquery libjs-jquery-ui
libllvm11 libminiupnpc17 libpipewire-0.2-1 pitivi python-matplotlib-data
python3-cycler python3-kiwisolver python3-matplotlib python3-numpy
python3-pyparsing qt5-gtk2-platformtheme shim vino zorin-os-feedback
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

In that case... let's get rid of it, now. :wink:

sudo apt remove --purge xserver-xorg-input-all

You should be fine with libinput. The xserver-xorg-input may be interferring, so removing it may solve the issue.
If not - or if you have no screen at all, enter recovery mode:
https://forum.zorin.com/t/how-to-enter-recovery-grub-menu-advanced-options-for-zorin/8001/2

Enable networking
Then arrow key down to Drop to Prompt
and reinstall:

sudo apt install xserver-xorg-input-all

@Aravisian, so here's what happened (before I did anything you suggested): I had to leave the house to run some errands so I left Zorin 16.2 Core running (in the state it had been in since the re-boot after the upgrade) and knew it would go to sleep after I left. When I got back 2 hours later, I tapped a random key to wake up the screen and the system...and once that happened, I had an operating cursor via the touchpad (mouse had been turned off). I decided to re-boot to see what might happen...and what happened was, once again, the touchpad would not work (I neglected to say through all of this that from the very start of this problem, when the touchpad is frozen I can't see any sign of a cursor. It might be there...just way off to the edge of the screen, underneath the edge of the frame, I dunno).

Does the fact that this condition is erratic enough to come and go within the same session (when it only went to sleep for a time) change anything? Or should I go ahead with the step you suggest?

No, since it appears the driver is working, if it is jiggled.
Can you try:

modprobe -r psmouse

modprobe psmouse

And see if that makes it work prior to Sleep or Suspend...

1 Like

The first command produced:

modprobe: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove 'psmouse': Operation not permitted

The second command produced no response at all, just another prompt.

I performed another restart, got a cursor. Then I performed a shut down/cold start, no cursor. Another warm restart, no cursor.

For whatever it might be worth, on these last two, I noticed that on the very first screen of a restart/startup (lock screen?) the cursor is visible away from the LR corner of the screen (though it cannot be moved). But once I tap the spacebar to get to the login screen and login (taking me to the home page), that cursor is gone. Moving my fingertip over the touchpad does nothing. But if I turn on the mouse, voila, it's there!

sudo modprobe -r psmouse

sudo modprobe psmouse

1 Like

Apologies. See? I told you I was still a functional newbie! :wink:

Both of those commands produced no response and simply brought another prompt. Was something performed by either/both that might've changed anything?

Yes, if they do nothing and say nothing - it means it did what it was supposed to do.
But the remaining question is... did it affect your touchpad?

It's on me... actually.
I sometimes, when doing enough commands in root, start out with

sudo -i

and stay in root until finished. But... this means I sometimes forget to include sudo in commands when suggesting them on the forum.

1 Like

Yes, it did!

I did another power down/cold start and the cursor is there and working via the touchpad!

But MY remaining question is...whatever those commands did, is this fix permanent? Any ideas how it got "un-set" in the first place?

Thanks so much for your help with this!

Most likely it happened during a kernel upgrade, since the modules need to get disabled, then re-enabled. It was supposed to but...

It may be, but if it is not, we can make a script to make it permanent.

If necessary, you can try creating a new file for touchpad in /lib:
sudo -H xed /lib/systemd/system-sleep/touchpad (Oops... I don't like gedit so I uninstall it and install Xed. I forgot.)

sudo -H gedit /lib/systemd/system-sleep/touchpad

Paste the following content into that file:

#!/bin/bash

if [[ $1 == post ]]; then
    modprobe -r psmouse
    modprobe psmouse
fi

Save the file and exit.
In terminal again; Give it exec permissions:

chmod a+x /lib/systemd/system-sleep/touchpad

You must reboot before you see any change.

1 Like

You'll understand, I'm sure, if I hold off on the creation of the file until I live with it a bit to see how "sticky" the fix is.

Actually, I've edited a handful of existing files (when spoon-fed the instructions, as you've done here) during my 2 year Linux journey so I'm not a total stranger to the process and not reluctant....just don't want to do it if I don't have to.

Completely and I agree with you.
You might also check first if you have PS/2 emulation enabled in your BIOS settings and if so, try disabling it and testing before trying the script.

PS/2? That came along after the launch of PCs (running DOS and Windows), didn’t it? It’s like…a totally different hardware/software thing, right? I've never owned anything that ran it. So...it seems I wouldn't have something like that enabled unless I specifically and consciously wanted it enabled, (again) right? Or what am I missing? Is it, too, something that can be enabled without knowing it? Or a capability that a PC might have that a Windows-focused user might not know about.

If the manufacturer set it as enabled as default...
BIOS settings are set by the computer manufacturer.

It's usage extends even up until today though today most regular users are on USB peripherals. PS/2 is the round plug that goes on the round port with the pins... has a notch on the top or bottom...
Old mouse.
But not DOS old.
Either way, it being enabled for the Emulation of the PS/2 mouse may interfere with the modules performance.

Ps/2 refers to the serial connector for mice and keyboards from win 95 Era. Legacy support has required compatibility to such devices.

Have you tried disconnecting the external mouse when TouchPad stops working? One feature gnome/xfce hasn't gotten quite right yet is the disabling the TouchPad when an external mouse is connected. It may be the reason for the mishap...acpi is semi doing what it's supposed to.

1 Like

I was waiting for the "But I am not using the PlayStation 2 mouse..."

1 Like

It's a wireless mouse, so, I would simply be turning it off (which, yeah, is disconnecting). And, yes, that's what I did throughout....while dealing with the issue before I posted today and then all through the processes that Aravisian stepped me through: I did not ever start up Zorin with the intent of testing/using the touchpad with the mouse turned on. Maybe twice, after a startup with the mouse off, once I determined that the touchpad wasn't working, I then turned on the mouse.

In this case I knew better. But I'm capable of being that dense.

2 Likes