iTranslated by AI
Keyboard Issues on Ubuntu Laptops with Ryzen CPUs
Overview
When I installed Ubuntu on a laptop equipped with a Ryzen CPU, I noticed that the keyboard behavior was strange.
Specifically, when I held down a key, the same character would continue to be input even after I released it, or there was a long delay from the time I pressed the key until the input appeared.
I eventually resolved the problem by changing the Linux kernel, so I have summarized the details here.
Environment Information
- Hardware: HP Pavilion Aero 13-be2000
- CPU: AMD Ryzen 7 7735U with Radeon Graphics
- OS: Ubuntu 22.04.3 LTS
- Linux kernel version (at the time of the issue): 6.2
- Occurred on the built-in keyboard, but not on USB external keyboards
Solution
Web pages such as HP Pavilion Laptop Keyboard Issue in Ubuntu 22.04 and this one were helpful.
It seems that the cause is a change made starting from Linux kernel 5.19.10 based on the judgment that "IRQ override is not necessary on modern PCs."
It appears that the issue can be resolved by using a kernel version of 5.19.9 or earlier (not tested), or 6.5 or later.
I changed the kernel version using the following commands and confirmed that the problem did not occur after rebooting.
# Check current kernel version
uname -r # It was 6.2.0-39-generic when the issue occurred
# Update the kernel
# Search for the version to update using 'apt search linux-image | grep generic', etc.
sudo apt install --install-recommends --install-suggests linux-image-6.5.0-14-generic
# Reboot
sudo reboot now
# Check current kernel version
uname -r # 6.5.0-14-generic
Discussion