How to Disable Laptop Keyboard on Ubuntu

Tri Juhari
2 min readFeb 25, 2021

Since my laptop keyboard currently has a lot of dead keys and I use an external keyboard more often, I thought to disable my laptop keyboard permanently.

Before finding a permanent method, the method I used before just disable temporary , so the consequently is when the laptop reboots, the keyboard will function again. For those of you who want to temporarily disable your laptop keyboard, you can follow this method.

Temporarily Disable Laptop Keyboard

  1. Open a terminal on your linux then type the command below.
xinput --list

Then the page will appear as below. Then you can search for the text like this “AT Translated Set 2 Keyboard with id = 10”.

List Input

2. Then we can enter the command as below to disable our laptop’s internal keyboard.

xinput --disable 10

3. Press enter.

4. If you want to enable the keyboard, you can open a terminal on Linux and enter the command as below.

xinput --enable 10

Permanently Disable Laptop Keyboard

If you want to permanently disable the laptop keyboard, you can follow the steps below.

  1. Open your grub file using root access like the command below.
sudo xed /etc/default/grub
Halaman Grub

2. find text like below.

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

3.Then replace the text as below.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nokbd"

4. Save and regenerate grub.cfg with command as below

sudo update-grub2

5. Reboot your system.

6. If you want to enabling your keyboard, you can follow the first step command that is open your grub file using root access, then look for the text as below.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nokbd"

7. Then you replace it with the command as below

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

8. Save and regenerate grub.cfg with command as below

sudo update-grub2

9. Reboot your system.

--

--