I use Ubuntu 14.04 on a laptop, usually with an external usb mouse and keyboard and screen connected. Sometimes, however, I unplug all of them and move the laptop and keep using it with the builtin keyboard and screen and touchpad.
At random times it happens that the touchpad stops working (but if I plug the usb mouse, the usb mouse does work). Though this happens very rarely, when it does it's a great annoyance, as I'm forced to reboot if I need the touchpad to work again.
Is there some workaround that I can try, such as killing some process that would automatically restart, or some command that would cause the touchpad driver to restart or refresh or something? Anything that may "wake up" the touchpad without having to reboot?
To restart the laptop's touchpad driver:
Open terminal by pressing Ctrl+Alt+T and execute the following command
then
I have found the solution here and there is also solution for a usb mouse
I found a way to do this:
First, open a terminal, and print out all input devices to find the id you need for the input device you want to disable. In terminal, type:
Next: Notice where it says id=X in one long column for every input device. You want to find the device id that corresponds to the input device you want to disable (Maybe something that sounds like "touchpad"). Then replace X in the following command with the id number representing the input device you want to disable:
Note: If you're not sure which device id you should use to disable the touchpad, then you can find out by testing random id's and seeing if your mouse pad still works. Make sure you are NOT DOING ANYTHING IMPORTANT. Save all your work and be prepared to restart your computer if you do something like disable your keyboard. (You may have trouble trying to enable it again if you can't type into the terminal.
Then you'll have to run this last line (Thanks for catching this Arch Stanton!)
Reason: I desperately needed an answer to this problem because the problems I was experiencing with my touchpad made doing any kind of work impossible. Suddenly, at some random moment when using my laptop, for apparently no reason, my touchpad goes into some kind of "special mode". Merely moving one finger on my touchpad would cause the screen to scroll, instead of actually moving the cursor of the mouse on the screen so it was impossible to get the mouse to hover over anything in broswer without considerable coordinating efforts to account for the scrolling screen and non moving mouse. I wanted to find a way, WITHOUT RESTARTING THE LAPTOP, to reset the touchpad. On the plus side, resetting the touchpad with the method above actually fixes my problem.
Update: To make resetting the touchpad even easier, I made a hotkey for the above listed commands. When my touchpad goes on the fritz, I simply do the key combination ctrl+super+r and it does the reset for me. Quick and easy.
Here's how:
-Create a file inside your home directory and call it something like "touchpad-reset.sh".
-Inside this file, put in two of the three (the last two) previous commands listed above except, instead of using an X id number for the device, since it's subject to change with added peripherals (maybe??) you can do use this instead:
Here's an output from my computer inside the terminal using this commmand:
Result:
-Now what you do, you replace the X (which was an id before) for xinput disable X and xinput enable X with the name corresponding to that id inside single quotes. For example, from the above, if you wanted to do it for id=13, my touchpad device, you would use:
-So now, you're disabling by name instead of ID number, where an id may possibly change in time and then you'd be disabling and enabling some other device.
Finally, you need to give the permissions to make this file executable; run this command with your working directory in the terminal as your home directory (where you created the file):
So once you make this file with the appropriate commands written inside, making sure it's in your home directory, take the following steps below:
Congrats! Have fun.
I was having that problem with one laptop repeatedly until I noticed that the touchpad of that computer had its own On/Off switch which I must have been hitting by accident. Notably, the switch did not help to turn it back on. I just became careful not to press it, and before long I took to using an external wireless keyboard with integrated wireless touchpad, and I haven't had that problem since.
UPDATE: (Note: link below broken, solution is above) Since posting this "solution" I posted a comment which apparently met the user's needs. Having only just now learned that the comments remain only temporarily and are automatically deleted, I'm reposting the content of the useful comment below that it may be preserved for others:
I was sharing the "solution" that worked for me. Today it occurred to me to google for solutions more closely fitting your original question and found the following link. It isn't what I would personally consider "convenient", but it could at least be more elegant by making it a script out of it. I found this (see below) – gyropyge Sep 25 at 20:06
If you have a synaptics touchpad :
If you do not know what module your touchpad uses you can find out with a bit of digging around
for me this returns
then see what kernel modules are available in this category:
which for me returns
Cross reference the two - in my case it looks like the module for my touchpad is
elan_i2c.ko
Edit: I recently figured out how to reliably get the name of the driver in use with a convoluted command, which terdon simplified nicely for me
To check you got the right module, test the command to unload it from the kernel:
The touchpad will instantly die if you got the right module, so you can easily find it by trial and error. Reload it with
This effectively restarts the module. You can run the two commands together like this:
I occasionally have to do this on resume from suspend.
What may be easier, and which worked for me, was reloading the driver in the kernel. The following code first finds the name of the kernel driver which handles the touch pad, then unloads it with
rmmod
and reloads it withmodprobe
. Note that you need to be root to run these commands, so runsudo su
first.Here is what was working for me is [Zenbook ASUS UX501VW]:
And my missing touch pad is back.
For me, on kernel 4.13.0-46 on Asus for ELAN1200, it wasn't about reloading
elan_i2c
but thehid-multitouch
driver:The simplest solution might be to:
Also try
gksudo /etc/init.d/hotplug restart