Score:1

Keyboard does not work for first few seconds

pe flag

I notice that my keyboard does not work for first few seconds while I boot into ubuntu or open after suspension. After a few seconds it works completely fine. I get stuck in the login page for a few seconds as I am unable to enter anything using my keyboard. I use a HP pavilion 15 series laptop with ubuntu 20.04.3 dual booted along with windows.

PS: Its not the slow keys that's creating this issue

Has anyone encountered similar issues? and knows a solution?

David avatar
cn flag
What issue? Your question is very unclear. You say the keyboard has an issue and then you say it is not the keyboard.
in flag
A lot of modern notebooks have the keyboard on the USB bus. If the USB devices require a few seconds to initialise after the machine starts up, this would explain the lag. If you [edit] your question to include the terminal output of `sudo lsusb`, it may be possible to verify this.
Rahul M avatar
pe flag
To be more clear, it does not work only for first few seconds after booting or suspending. After that it works fine.
Score:0
ng flag
A K

Check this topic https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1916314

https://github.com/berzoidberg/i8042-spectre-dkms

I have same issue on my HP Spectre and here is what i did:

git clone https://github.com/berzoidberg/i8042-spectre-dkms
sudo cp -R i8042-spectre-dkms /usr/src/i8042-spectre-1.0
sudo dkms add -m i8042-spectre -v 1.0
sudo dkms build -m i8042-spectre -v 1.0
sudo dkms install -m i8042-spectre -v 1.0
echo blacklist i8042 | sudo tee -a /etc/modprobe.d/blacklist.conf
Rahul M avatar
pe flag
I tried this but still doesn't solve the problem. Is there anything else that has to be done after these 6 commands? Or just close the terminal?
Score:0
ng flag
A K

In order to fix this bug go to your /etc/default/grub and add i8042.nopnp=1 i8042.dumbkbd=1.

  1. Open /etc/default/grub:

    sudo nano /etc/default/grub 
    
  2. Change the following line from:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    

    to:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nopnp=1 i8042.dumbkbd=1"
    
  3. Save the changes made to GRUB (Ctrl+O, Enter, Ctrl+X).

  4. Then open a terminal and run the following:

    sudo grub-mkconfig -o /boot/grub/grub.cfg
    
  5. Restart and your keyboard lag should be fixed.

Nachos avatar
be flag
This worked perfectly on my HP Spectre x360 running Ubuntu 22.04 LTS. Thank you!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.