51

So I just updated to 16.10 (just got 16.04 a few weeks ago, still new to Linux). The keyboard still works when I need to enter my password to unencrypt the lvm drive, but stops working (along with the mouse) when I get to the login screen. Is this a known problem? How do I fix this? By the way this is installed on a lenovo think pad.

Thanks

Edit: got home and tried connecting a usb keyboard. Does not work (again only after reaching the login screen) . What on earth is going on?

6 Answers 6

81

I had the same issue today and found this bug report.

The problem seems to be, that during update process they forget to install/update the package xserver-xorg-input-all!

So these instructions worked for me on my thinkpad p51s notebook with a little modification:

  1. Press a Shift key during boot to get the GRUB menu.
  2. In GRUB, select Advanced Options, then the first kernel with the recovery mode.
  3. Select "Network" to get network access (needed for package installation)
  4. Select "Drop to root shell"
  5. Press Enter to confirm.
  6. On my system not needed because, the filesystem was mounted rw, but if needed then mount -o rw,remount /.
  7. Install the needed package: apt install xserver-xorg-input-all (and the message that they need to uninstall 16.04 packages!)
  8. Press Ctrl+D to leave the root shell.
  9. Select resume boot from the menu.
  10. Now I could only log into console.
  11. sudo reboot

After reboot my ThinkPad's mouse and keyboard and the external mouse and keyboard worked fine!

11
  • 3
    Thx for the hint, I solved it by SSH into the mashine and just sudo apt install xserver-xorg-input-all Dec 21, 2017 at 9:12
  • 1
    Thanks so much for your assistance; this detailed answer really helped. I would add that enabling network in Advanced Options does not always work in such a situation. You can end up with error messages for /etc/resolv.conf file not existing / link broken. In such a case, I recommend echo "nameserver 8.8.8.8" > /etc/resolv.conf. Do try and have a wired connection also, easier than getting wifi running in this scenario.
    – shf8888
    Sep 8, 2018 at 16:41
  • 1
    Also good for v 18.04
    – DavidC
    Oct 9, 2018 at 9:49
  • 1
    Thank you! I had this problem when trying to install mtrack on ubuntu 16.04, and your solution also fixed it. Except I had to press Esc instead of shift at first.
    – Peter
    Mar 13, 2019 at 21:03
  • 1
    Worked on 18.04.3
    – ICE
    Aug 14, 2019 at 4:07
25

I had the same problem. I fixed it using only my trackpad. I had to enable the onscreen keyboard from System Settings > Universal Access > Typing, then opened a terminal and ran sudo apt install xserver-xorg-input-all. After a restart, everything was fine. A little tedious but it's the simplest solution I've seen.

4
  • Thanks. That just saved me. Short effective answer. That dude scared me with his 11 steps. This question was asked on April. Two months ago, no body thought to fix it yet?
    – M J
    Jul 18, 2017 at 17:11
  • 5
    MJored, the 11 steps are understandable due to the fact that the person who asked the question had lost both their keyboard and mouse..aka..trackpad. Without a mouse, it is impossible to access the online keyboard. Oct 12, 2017 at 1:52
  • How to enable onscreen keyboard because keyboard and touchpad is not working on login screen? I was update my Ubuntu from 16.04 to 17.04.
    – Katty
    Oct 31, 2017 at 6:29
  • This worked for me using a wired Mac aluminum keyboard, just don't forget to have the keyboard plugged, that was my second issue after running these commands and the keyboard didn't work. DOH!
    – Robby1212
    Oct 30, 2019 at 15:05
8

To fix this you can use the Live CD or as @Arties suggested using recovery mode to run apt-get to get the new files to fix your system.

--

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
apt update
apt upgrade
apt full-upgrade -y
apt install -y ubuntu-desktop
apt install xserver-xorg-input-all

If you have trouble accessing your network after chroot, you probably use DHCP and can work around this by adding OpenDNS name servers to your /etc/resolv.conf after you use chroot:

nameserver 208.67.222.222
nameserver 208.67.220.220
2
  • This answer saved my life!! Only after adding nameserver to /etc/resolv.conf I think I had to restart the LiveCD Jan 28, 2018 at 13:12
  • 1
    After chroot, I added the nameservers to /etc/resolv.conf and all was good. Many thanks.
    – mip
    Jan 29, 2018 at 9:15
3

I went from 16.04 to 17.04. Instead of going through the recovery mode I went a different route. (For some reason, I cannot connect to the internet in recovery mode)

I have ssh enabled on my Ubuntu desktop so I just connected to it remotely and installed xserver-xorg-input-all package and rebooted. My mouse and keyboard are working again.

0

Here's a way that I managed, though it is a bit unorthodox. I had no keyboard function on my laptop, but did have use of the trackpad. I think I had fixed trackpad functionality previously. I tried the 11-step plan from @Arties above, but got stuck on step 7, possibly because of an internet connection problem. So, on my WIN10 machine I created a text file in Notepad++ with Unix line endings (Edit>EOL Conversion...) and typed:

sudo apt install xserver-xorg-input-all
<blank line with Unix line ending>
<my password>
<blank line with Unix line ending>
y
<blank line with Unix line ending>

I transferred this text file to the Ubuntu laptop via USB stick. Then using the trackpad I opened the text file, and used the right click button to copy and paste the various lines (and the subsequent blank lines to avoid using the ENTER button on the keyboard) into the terminal window at the appropriate times. Not sure if the Unix line endings (versus Windows line endings) were critical. Keyboard functionality was restored after one or two restarts. Hopefully this will help someone.

0

My issue was that after switching to Gnome3 (cinnamon?) on an Intel 64bit NUC running Ubuntu 16.04.3 LTS, the USB mouse would randomly stop working completely. Usually it would be in this state after the PC (NUC) had been idle and gone into lock mode; but a few times it also occurred while I was typing and mousing.

Simply unplugging and re-plugging the mouse always got it working again, instantly.

I followed the advice to kill fwupd, but found the issue still recurring - but also saw the daemon had restarted. So I "apt remove"d fwupd and killed it, and since then the issue has not recurred. There's no man page for fwupd, and I'm not sure how important a component it is, nor even whether it would be advisable to let it make firmware changes to a NUC.

Updated: I spoke to soon. The problem still occurs, so fwupd is probably not the culprit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .