How to Fix Keyboard Not Working After Ubuntu Update

Recently, I updated my Ubuntu from 17.10 to 18.04 and after the reboot, the keyboard stopped working. It works on the lock screen, but not once I am logged in. Turns out, this is a fairly common problem. The keyboard input driver breaks after every major update, which causes miscommunication between the Ubuntu OS and the input devices.

You can easily fix this by installing the input X Server’s driver again. But since the keyboard is not working in the first place, this gets a bit tricky. And no, the external USB keyboard doesn’t work as well. So, here is how you fix the keyboard not working after updating your Ubuntu.

Fix keyboard not working in Ubuntu 18.04

Case 1: Keyboard and Mouse both working on Lock Screen

In this case, you have the keyboard and trackpad both working on the lock screen, you can directly launch a terminal session by pressing Ctrl + Alt + F3 and skip to this step.

Case 2: Keyboard not working but Mouse working on Lock Screen

Step 1: In this case, log in to the system with the help of the screen keyboard. You can enable it by clicking on the Accessibility or Human icon on the top-right corner. Once you are logged in, we need to once again turn on the screen keyboard. For that, open the Settings menu by clicking on the arrow at the top-right corner.  Next, click on the gear icon from the extending menu.


Read: 3 Ways To Setup Static IP Address in Ubuntu

Step 2: In the Settings menu, click on “Universal Access” on the left-hand tab to go to the Hearing and Typing menu.


Step 3: On the Universal Access menu, navigate to the Typing menu. Click on the slider beside the “Screen Keyboard” text to the on the on-screen keyboard.


Step 4: Now that we have the on-screen keyboard, we need the terminal to run the command. To open the terminal, right-click on the Desktop and select Open Terminal.


Step 5: Once you have the terminal launched, type the following command and hit Enter.

At times Ubuntu might try to go fanatical and prompt you for the password even after entering sudo. Just use the on-screen keyboard to enter the password.

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

It should again prompt for input, press Y and hit Enter again.


Once after we have the X Server keyboard input drivers installed, reboot your System. When the system is back up and running, you should be able to use your keyboard and mouse.

Case 3: Keyboard and Mouse both not working

In case, the keyboard, trackpad, and mouse all are not working for you even on the lock screen, we need to launch the terminal during boot itself. To do that force shutdown the system with the physical keys.

While, the system is starting up, hold down the Shift key after the BIOS load and you will enter the GRUB menu. On the GRUB menu, press “e” to edit boot options. Search for the line which looks like the following.

linux /boot/vmlinuz-4.18.0-25-generic root=UUID=a98c605-2ac4-4ee3-8070-2560255293fe ro quiet splash $vt_handoff

Insert “/bin/bash” before $vt_handoff and press Ctrl + X or F10 to reboot. Once you in the command, run the following command and reboot back the system again.

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

Upon reboot, you should have the keyboard and mouse working for you.

Changing the GRUB file is a temporary change and not persistent. So if the boot crashes, just restart the system and it should be back to normal.

Wrapping Up

Ubuntu is a good free operating system to switch to if you don’t want to spend on a Windows license. However, Ubuntu has its own set of problems which take a while to fix. Read our other articles on 15 must-have apps on Ubuntu right after a fresh install and how to run Linux on Windows with a virtual box.

Let me know in the comments below in case of any issues or queries.

19 thoughts on “How to Fix Keyboard Not Working After Ubuntu Update”

  1. ray — you are by far the best I have ever encountered when dealing with my Ubuntu problems. By best, I mean: Precise and clear while providing straight and simple solutions.

    Thanks very much.

  2. Hi, thanks a lot for the post! I am facing this problem (keyboard not working, but the muse does). I tried to follow your instruction but I cannot pass the login screen. I enabled the onscreen keyboard but actually nothing happens. There is no keyboard showing up in the screen, not even when I touch the pass field. Therefore I tried the last option: I go to the Grub, press “e” and add the “/bin/bash”, but when I reboot nothing happens (no command line, just directly to the login screen). Any idea of what else could I do in this case?

  3. How is this working some of my keys act differently like arrow key working as home and end, y key is working as taking screenshot, space bar is not working even in grub i am getting same problem.

  4. By following your advice on fixing ‘keyboard not working’, I can complete all the steps. After rebooting, ‘on screen keyboard’ is enable but the keyboard is still not working.

    At least I can use ‘on screen keyboard’ as a get around solution. Thanks for your advice.

  5. I have tried everything listed and have the keyboard on the screen but cannot type anything into the terminal nor does the on-screen keyboard type any characters in Grub, the Terminal or anywhere else. I even tried an external keyboard with the same results.

  6. Got the screen keyboard working to enter my login in the password but the ‘Enter’ key did not seem to work nor did the backspace. I’m using ubuntu on a remote hard drive on an old Dell XPS where the windows hard drive had died.

  7. I replaced my keyboard (Dell Latitude E5570) and now have even more keys not working (u,i,o,h,j,k,l,n,m,comma, period). I am typing this with an external keyboard, which does work (clearly). What else could this possibly be?

  8. I am not able to fix the error , updated my touchpad using terminal and after that i rebooted after that my keyboard and mouse both are not working plsss help 😭

  9. I also have problems with the keyboard.
    My PC:
    HP EliteDesk 800 G2 SFF
    Ubuntu 20.04.3 LTS
    Keyboard: Microsoft Wireless Keyboard 2000

    The last line after executing the command: “sudo apt-get install xserver-xorg-input-all”:
    “0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.”

  10. Installing xserver does not work for me. Uninstalled and installed several times already, still nothing. USB keyboard works fine, though

  11. I have the third case where both keyboard and mouse are not working. I tried adding /bin/bash but this resulted in a normal boot. I then accessed the terminal through recovery mode but when I try to install xserver I get “Failed to Fetch” errors. I tried several things to resolve this but keep getting the same error. Is there anything else I can try to fix this?

  12. Hi,
    I tried the fix you suggested but it does not seem to work for me. While I followed the steps as you mentioned, it did not return any error. However, when Ubuntu boots and reaches the login menu, the keyboard and mouse does not work. Is there any other way to get them both working again? I am using a Dell Precision Tower 5810 with external keyboard and mouse.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.