Ubuntu 20.04 - keyboard not working

14,484

Solution 1

The problem is Ubuntu thinks your PC is a tablet and diables the keyboard. The fix below works if the following command gives you any number that is not 31 or 32.

cat /sys/class/dmi/id/chassis_type

How to fix this: (from https://askubuntu.com/a/1282269/558457)

There is a bug in recent kernels that disables some laptop keyboards. Mainly Acer and HP so far. Can usually go to recovery and boot from kernel 5.4.0-42 or use an external keyboard.

Blacklisting the intel_vbtn kernel module is a workaround for this, as seen in Why my laptop's keyboard screwed up since kernel 5.4.0-47 till 5.8.0-20

To implement this, you can either create a new file in /etc/modprobe.d with the suffix .conf or use the main blacklist.conf file. The former may be preferable, since you can then just delete the file when it is no longer required (i.e. when the bug is fixed):

sudoedit /etc/modprobe.d/blacklist-intel_vbtn.conf

Add a line to the file, optionally with a comment explaining why you are doing this

# bug in module breaks keyboard, so don't load it
blacklist intel_vbtn

Save the file, exit and reboot.

Solution 2

Right! Have found a workaround. Have access to GNU GRUB menu as i have dual boot with windows. From There if i select 'advanced options' instead of the default and boot from Linux 5.4.0-42-generic i have access to all keyboard and trackpad features.

Share:
14,484
MisterChrisL
Author by

MisterChrisL

New convert to Linux/Ubuntu after many torrid years with Windows and Mac OS! Have previously dabbled with other Linux distros but never really in-depth.

Updated on September 18, 2022

Comments

  • MisterChrisL
    MisterChrisL over 1 year

    I just upgraded my laptop from 18.04.5 to 20.04 and my keyboard and mouse have stopped working. The keyboard works in BIOS and when entering my password for cryptsetup but as soon as it's all fully loaded up, the mouse and keyboard stop working. I've tried using the terminal/command line to enter sudo alt-get install xserver-xorg-input-all as suggested on a few sites. This has not helped at all! Does anyone have any suggestions? I'm completely lost without my laptop!! Thanks in advance.

  • MisterChrisL
    MisterChrisL over 3 years
    Thanks - good to know it's not just me! Just to clarify (I'm quite new to Ubuntu), what is a recovery boot?
  • crip659
    crip659 over 3 years
    When grub shows you have choice of booting into main/most recent kernel of Ubuntu(boot into Ubuntu) or the next line down is recovery. If you do not have grub set to show on loading/startup(only ubuntu on computer) might need to hit shift button a few times when computer logo shows on power up.
  • Invisible Man
    Invisible Man over 3 years
    @MisterChrisL Try this - Access to GNU GRUB. From There select 'advanced options' instead of the default and boot from Linux 5.4.0-42-generic i have access to all keyboard and trackpad features since.
  • Invisible Man
    Invisible Man over 3 years
    Right, as @crip659 said, but instead of selecting any of the recovery modes select the previous kernel version 5.4.0-42-generic.This worked for me
  • MisterChrisL
    MisterChrisL over 3 years
    Thanks mate, and @crip659 - I've got an old wired USB mouse and keyboard plugged in and working, will try to fiddle around with kernels tomorrow! Hopefully this will be fixed pronto?
  • leoheck
    leoheck about 3 years
    I have the same issue here on a Dell XPS 1500 however your workaround didn't work. Do you have any other workaround so I can give it a try? My current kernel is 5.8.0-48. Going back to the 5.8.0-45 also didn't work.
  • p0wl
    p0wl about 3 years
    I'm sorry, I'm not an expert on this. Did you check the original answer I linked to as well as the comments there?
  • Owen
    Owen almost 3 years
    Same solution offered here, but they note it may not work if you have chassis_type 31 or 32: askubuntu.com/questions/1280217/…
  • Nicholas Bourbaki
    Nicholas Bourbaki almost 3 years
    Thanks so much p0wl; it fixed my no keyboard problem. I had a desktop PC using an Intel motherboard. I changed it to using a Gigabyte motherboard and the problem persisted. My system was duel boot: Windows-10/ XUbuntu 20.04. I could only boot the default Windows without the keyboard working. The new motherboard had a plug for a PS-2 keyboard, however. I plugged that in and unplugged my Logitech USB keyboard. Then I was able to boot into XUbuntu 20.04. I added your file ( blacklist-intel_vbtn.conf) and now have keyboard working even with only the USB Logitech keyboard plugged in.
  • Haydentech
    Haydentech over 2 years
    Worked for me on a Dell XPS 8940. I could not type or click the mouse in X, but oddly the mouse did move normally!
  • TastyWheat
    TastyWheat over 2 years
    Oh, restart? The thing I was trying to avoid? I might not know if this fixed anything at all.
  • Vikram Sinha
    Vikram Sinha about 2 years
    I updated to 20.04 from 18.04 and I had the same issue with keyboard and mouse , I boot in kernel mode form advanced settings to kernel 5.4.0-97 my chassis_type is 10 I created the blacklisted file for intel as mentioned and still the keyboard and mouse do not work after I enter my credentials at Ubuntu load. Can anyone help with a workaround ? I have a Huawei matebook pro
  • opinion_no9
    opinion_no9 about 2 years
    Thanks a lot!! Even Ubuntu 22.04 still has this issue. Unfortunately it does not do the trick if I change to display manager sddm. Only gdm3 will work together with the described workaround. This is a pitty since sddm avoids the sudden death by energy saver settings before the laptop (or desktop) is logged in with user credentials.
  • opinion_no9
    opinion_no9 about 2 years
    still a f#$* issue in Ubuntu 18.04.4 and 20.10 and 22.04 Jammy Jellyfish - keyboard and ALL input buttons get deactivated - including the on/off button! Wow that's really a f#$*up & sacrifice for these fashionate tablet devices.