Monday, January 20, 2020

Disable Laptop Keyboard

My laptop keyboard is having issues where a shift key stopped working and now (after I tried messing with it) is in a perpetual state of shift. At first, plugging in a USB keyboard mitigated the issue, except during boot where I had to hit my caps lock in order to type in my luks passphrase, but now it starts acting up within a few minutes of actually trying to use it.

While repairing the keyboard, or getting a new laptop 😀, is the ideal solution, I needed a quicker and cheaper option. After doing some searching, I found this askUbuntu post explaining how to disable the laptop keyboard so I could just use my USB keyboard.

I am running Pop!_OS now. I have a System76 laptop, which is about 5 years old (so they keyboard thing isn't an immediate failure), and wanted to give it shot while updating my firmware. I have been pretty happy with it, but that also means I am using systemd-boot to boot my laptop.

For anyone using Pop!_OS, the way to make this change is to run:

sudo vi /boot/efi/loader/entries/Pop_OS-current.conf

At the end of the options line I added the i8042.nokbd that is mentioned in the post I referenced.

The 8042 is an Intel microcontroller. One of its functions is to handle the standard keyboard interface. Adding that option to the kernel disables the keyboard interface. The USB keyboard I am using is unaffected because it is a USB keyboard. The nokbd option is handled by the i8042.c driver.

All you have to do is reboot after making the change, nothing else is needed. If you are concerned about your old kernel boot config, you can also modify the Pop_OS-oldkern.conf in the same location.