Ubuntu keyboard and mouse suddenly stopped working
Olivia Zamora
I played Skyrim via Wine, then it started lagging so hard that I rebooted computer holding Power button. Then, when I turned it on, on a login page keyboard and mouse were working. I typed password, and after logging in noticed that keyboard and mouse are not working. I tried to reboot (same situation), tried recovery mode. Nothing worked. What I need to do? Ubuntu 18.04
32 Answers
If you can type on the login screen, then there should be a way to workable shell.
This article has more on it.
From the description of the error, I would doublecheck for hardware problems, like e.g. a dying SSD. I would look for I/O errors in system logs.
If there are indeed signs of significant disk problems, then, before anything else, I would backup all important documents/files/etc from the disk, while being booted from a live USB.
After important files are backed up, I would also consider a filesystem check and possibly repair with fsck (on the unmounted / partition), again, from a live USB.
Then, regarding the keyboard / mouse:
Recently I have seen a few places that recommended
sudo apt-get install xserver-xorg-input-all
or
sudo apt-get install --reinstall xserver-xorg-input-all
read these: Keyboard and mouse unresponsive after suspend,
and the aforementioned article.
I have no personal experience with this procedure, just offering for consideration.
Finally, regarding "rebooted computer holding Power button", I recommend googling and learning how to reboot with the "REISUB" method. It's not always effective, but when it is, it's nicer on the (file)system.
3To complete the answer provided by Levente, the following commands may come in handy:
1. Enable a disabled input device
- Get the ids of the devices:
xinput --list - Enable the device with id=n:
xinput enable n
2. Remove/add modules to Linux kernel
- Remove touchpad driver:
modprobe -r psmouse - Add it again:
modprobe psmouse - For keyboard, I think you must use atkbd instead of psmouse
NOTE that you need to run the commands as super user, I mean, sudo.