HP Pavilion Laptop Keyboard Issue in Ubuntu 22.04

I am having a strange issue with my laptop keyboard.

When typing the response to each key press is very delayed, if I type at normal speed keystrokes are missed, holding down a key for a moment will result in that key getting “stuck” and typing infinitely after released.

The Laptop is a new HP Pavilion Aero Laptop 13.

I am running Ubuntu 22.04, all up to date. (with windows 11 dual boot)
EDIT: Initially using Kernel 5.19, updated with mainline to 6.4 to no effect.

It is only an issue with the built-in laptop keyboard, a USB keyboard works fine. EDIT: USB keyboard is now also having intermittent problems.
The built in keyboard also works fine in my windows dual-boot.
I checked the accessibility option “Slow Keys” is not enabled.
The built in trackpad works fine.
There is no driver for the fingerprint reader, I don’t care about using this, but could it be connected to the keyboard? https://linux-hardware.org/?probe=b025249305s

Asked By: James S

||

I also have a hp pavilion aero 13 with ryzen 7 (7000 series) and have the exact problem as you (and even my touchpad is hanging up from time to time). I have Ubuntu 23.04 on dual boot with win11.

According to this: https://bbs.archlinux.org/viewtopic.php?id=285327
the problem is in the linux kernel. I had linux kernel 6.2 which seems to have a problem according to this post. I tried upgrading to 6.4 but the issue does not resolve.

So maybe linux kernel 5.4 may clear up the issue according to that thread, (haven’t tried it yet).

This discussion and the patch given here might also help: https://bugzilla.kernel.org/show_bug.cgi?id=217406

Update:
I was able to compile a kernel with a patch successfully.
I didn’t follow anything exactly and googled stuff a bunch but basically, I used https://unix.stackexchange.com/questions/146666/how-do-you-patch-a-kernel for applying the patch and followed https://www.youtube.com/watch?v=APQY0wUbBow for compiling.

Also, I just copied the config file of the old kernel instead of creating a new one as in this video (just copy the file to the source directory, open the file (using make menuconfig) and save it). As for installing required tools I just went along and installed whatever was required when I got an error message for missing dependencies. Took me a few hours but my laptop is now right as rain.

Oh yeah and there were some issues with certificates that I resolved with this: https://unix.stackexchange.com/questions/293642/attempting-to-compile-kernel-yields-a-certification-error/649484#649484
Also instead of manually copying the files to correct location after compiling as in the video, make install should do the work (https://unix.stackexchange.com/questions/128634/why-is-the-config-file-not-copied-to-boot-after-installing-new-kernel)

Answered By: Irene

After trying to compile the patch version myself and failing;

Kernel version 6.5-rc6 seems to have resolved the issue for me.
It can be installed through the mainline GUI pre-compiled.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2ccdd1b13c591d306f0401d98dedc4bdcd02b421

Answered By: James S
Categories: Answers Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.