Disable Inbuilt keyboard

Hello.
I need help to disable my Laptop Inbuilt keyboard permanently as there is a stuck key and I don't use that keyboard anymore. I use a usb keyboard so I wanted to disable the Inbuilt keyboard
What I tried -
xinput list
xinput float
which temporarily disables the keyboard but after reboot it is enabled back. So I searched online for a solution and found that in Ubuntu editing the grub file like below does the work I've tried that myself on Zorin before but I'm new to Garuda arch based linux so need help doing the same. Your help is appreciated.

Open /etc/default/grub as root and change the GRUB_CMDLINE_LINUX_DEFAULT variable to include i8042.nokbd . It will look somewhat like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet i8042.nokbd" . Save the file and then run (as root) in the terminal: update-grub . Restart your laptop

garuda-inxi
System:
Kernel: 5.17.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=0b3ee793-04a5-4396-a397-8dbad9c6feeb rw rootflags=subvol=@
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=684fccb6-7d6a-4eda-8875-5b25dc60d985 loglevel=3
Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: Hewlett-Packard product: HP Pavilion g6 Notebook PC
v: 0884110000385910000610100 serial: <superuser required> Chassis: type: 10
serial: <superuser required>
Mobo: Hewlett-Packard model: 183E v: 56.32 serial: <superuser required>
UEFI: Insyde v: F.22 date: 11/22/2012
Battery:
ID-1: BAT0 charge: 15.6 Wh (100.0%) condition: 15.6/15.6 Wh (100.0%)
volts: 12.4 min: 10.8 model: Hewlett-Packard Primary type: Li-ion
serial: N/A status: full
CPU:
Info: model: Intel Core i3-3110M bits: 64 type: MT MCP arch: Ivy Bridge
family: 6 model-id: 0x3A (58) stepping: 9 microcode: 0x21
Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
L3: 3 MiB desc: 1x3 MiB
Speed (MHz): avg: 1496 high: 2193 min/max: 1200/2400 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 1397 2: 2193 3: 1197
4: 1197 bogomips: 19156
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
STIBP: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel 3rd Gen Core processor Graphics vendor: Hewlett-Packard
driver: i915 v: kernel ports: active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1
bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
Device-2: AMD Thames [Radeon HD 7500M/7600M Series]
vendor: Hewlett-Packard driver: radeon v: kernel alternate: amdgpu pcie:
gen: 1 speed: 2.5 GT/s lanes: 8 link-max: gen: 2 speed: 5 GT/s lanes: 16
bus-ID: 01:00.0 chip-ID: 1002:6840 class-ID: 0300
Device-3: Suyin HP TrueVision HD Integrated Webcam type: USB
driver: uvcvideo bus-ID: 2-1.5:3 chip-ID: 064e:e263 class-ID: 0e02
serial: <filter>
Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
loaded: intel,radeon unloaded: modesetting alternate: fbdev,vesa gpu: i915
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
s-diag: 414mm (16.31")
Monitor-1: LVDS-1 mapped: LVDS1 model: LG Display 0x034d built: 2012
res: 1366x768 hz: 60 dpi: 102 gamma: 1.2 size: 340x190mm (13.39x7.48")
diag: 395mm (15.5") ratio: 16:9 modes: 1366x768
OpenGL: renderer: Mesa Intel HD Graphics 4000 (IVB GT2)
v: 4.2 Mesa 22.0.0 compat-v: 3.1 direct render: Yes
Audio:
Device-1: Intel 7 Series/C216 Family High Definition Audio
vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
chip-ID: 8086:1e20 class-ID: 0403
Sound Server-1: ALSA v: k5.17.1-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.49 running: yes
Network:
Device-1: Ralink RT3290 Wireless 802.11n 1T/1R PCIe vendor: Hewlett-Packard
driver: rt2800pci v: 2.3.0 pcie: gen: 1 speed: 2.5 GT/s lanes: 1
bus-ID: 07:00.0 chip-ID: 1814:3290 class-ID: 0280
IF: wlo1 state: down mac: <filter>
Device-2: Realtek RTL810xE PCI Express Fast Ethernet
vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 08:00.0 chip-ID: 10ec:8136
class-ID: 0200
IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter>
Bluetooth:
Device-1: Ralink RT3290 Bluetooth vendor: Hewlett-Packard driver: N/A pcie:
gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 07:00.1 chip-ID: 1814:3298
class-ID: 0d11
Report: bt-service: enabled,stopped note: tool can't run
Drives:
Local Storage: total: 931.51 GiB used: 8.11 GiB (0.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM024 HN-M101MBB
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B
speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: 0001
scheme: GPT
Partition:
ID-1: / raw-size: 915.01 GiB size: 915.01 GiB (100.00%)
used: 8.11 GiB (0.9%) fs: btrfs dev: /dev/sda3 maj-min: 8:3
ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
used: 576 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 915.01 GiB size: 915.01 GiB (100.00%)
used: 8.11 GiB (0.9%) fs: btrfs dev: /dev/sda3 maj-min: 8:3
ID-4: /var/log raw-size: 915.01 GiB size: 915.01 GiB (100.00%)
used: 8.11 GiB (0.9%) fs: btrfs dev: /dev/sda3 maj-min: 8:3
ID-5: /var/tmp raw-size: 915.01 GiB size: 915.01 GiB (100.00%)
used: 8.11 GiB (0.9%) fs: btrfs dev: /dev/sda3 maj-min: 8:3
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 7.66 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
ID-2: swap-2 type: partition size: 16 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/sda2 maj-min: 8:2
Sensors:
System Temperatures: cpu: 65.0 C mobo: N/A gpu: radeon temp: 58.0 C
Fan Speeds (RPM): N/A
Info:
Processes: 225 Uptime: 11m wakeups: 1 Memory: 7.66 GiB
used: 2.62 GiB (34.2%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 Packages: pacman: 1361 lib: 350 Shell: fish v: 3.3.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.14
Garuda (2.5.6-2):
System install date:     2022-03-31
Last full system update: 2022-03-31
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       No/Undetected
Snapshots:               Snapper (maybe)
Failed units:            bluetooth-autoconnect.service

I would find the disassembly manual for the laptop and disconnect the ribbon cable for the keyboard.

well that's too much of a hassle bro. Why not make use of commands to disable it. I feel there should be something else other than this I don't wanna break something.

After all, why fix a crack rather than just paper over it?

Because the stuck key will be providing input during the boot process. Physically removing the keyboard is the most robust solution for disabling the keyboard.

Using intuition in place of facts is an interesting approach to using computers.

Which part of this doesn’t work?

2 Likes

Which part of this doesn’t work?

As per the steps in Zorin I followed was

  1. Open /etc/default/grub as root
  2. Txt file opens and edit GRUB_CMDLINE_LINUX_DEFAULT variable to include i8042.nokbd
  3. After edit it looks like this GRUB_CMDLINE_LINUX_DEFAULT="quiet i8042.nokbd"

But when I fire the command - /etc/default/grub this is what I get so is there something similar that I can do to edit the config file which saves it permanently.

etc/default/grub
fish: The file “/etc/default/grub” is not executable by this user

sudo /etc/default/grub
[sudo] password for kundanwadkar:
sudo: /etc/default/grub: command not found

╭─kundanwadkar@Garuda in ~ as 🧙 took 8s
[đź”´] Ă— sudo su /etc/default/grub
su: user /etc/default/grub does not exist or the user entry does not contain all the required fields

Because the stuck key will be providing input during the boot process. Physically removing the keyboard is the most robust solution for disabling the keyboard.

Also the key stuck issues doesn’t happen always but when it happens it is annoying so I simply used to disable the keyboard when On Windows I used to disable that In Device mngr but I switched to Linux few weeks ago and my first Distro was Zorin where I followed the above approach. My first priority whenever I switch OS is disabling inbuilt keyboard but No I don’t want to open the Laptop manually and as a risk of breaking something this is my only system and I cant afford to mess it up. So I hope you understand the issue here. Thanks a lot for helping me out here I’m pretty new to Linux and I’m still learning

This is not a command, it is the name and path of a file. To open it, you will have to specify a program (text editor, since it is a text file).

sudo micro /etc/default/grub

Then add the kernel parameter to the GRUB_CMDLINE_LINUX_DEFAULT line and press Ctrl+Q to exit, reply “Y” to the prompt to save the file.

sudo update-grub

:point_up_2: Don’t forget the hyphen. Reboot, and see how it goes. :slightly_smiling_face:

1 Like

When I used this it gives me this result
sudo micro /etc/default/grub

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Garuda"
GRUB_CMDLINE_LINUX_DEFAULT="quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 resume=UUID=684fccb6-7d6a-4eda-8875-5b25dc60d985 loglevel=3"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME="/usr/share/grub/themes/garuda-dr460nized/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=false

It looked different on Zorin it had just one parameter in the line

GRUB_CMDLINE_LINUX_DEFAULT="quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 resume=UUID=684fccb6-7d6a-4eda-8875-5b25dc60d985 loglevel=3"

But here it has multiple Id's and what not I'm so confused please help what should I delete from this line and where exactly to add this GRUB_CMDLINE_LINUX_DEFAULT="quiet i8042.nokbd"

Also while searching I just came across this maybe someone knows about it
[Disable laptop keyboard / Newbie Corner / Arch Linux Forums]

where it says -
Just today a similar question was asked: [SOLVED] Turn off touchpad / Kernel & Hardware / Arch Linux Forums

I'm not sure, but try editing your /etc/X11/xorg.conf.d/10-evdev.conf file to match something like this (and then restart X):

...
Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "yes"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "KeyboardOff" "1"
EndSection
...

Add i8042.nokbd to the end of the GRUB_CMDLINE_LINUX_DEFAULT line (after loglevel=3 and before ").

3 Likes

Thanks this worked and issues is resolved.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.