Problem
Dual-boot (Windows 11/Ubuntu) computer is unable to use the keyboard for Ubuntu, but it works on Windows. This started after a problematic Windows Update.
Questions
- Laptop or Desktop?
- Have you tried a different keyboard?
- Can you access the Ubuntu machine via SSH from another computer (if you don't have another keyboard)?
- Anything obvious jump out from logs?
sudo dmesg
- What is the Make/Model of the keyboard?
Keyboard Driver
Install any drivers Ubuntu sees are missing:
sudo ubuntu-drivers autoinstall
Find and Re-Install
See what's installed:
ubuntu-drivers devices
Re-install:
sudo apt <packageName> reinstall
System Updates
Another easy win, if it works.
sudo apt update
sudo apt upgrade
Previous Version of Grub
Reboot Your Computer: If your computer is currently running, you'll need to reboot it to access the GRUB menu.
Access GRUB Menu: As your computer restarts, hold down the Shift key (or Esc key on some systems) to access the GRUB menu. This key should be pressed immediately after the BIOS/UEFI splash screen disappears.
Select Previous Configuration: Once you're in the GRUB menu, you'll see a list of boot options. Use the arrow keys to select the Ubuntu entry you want to boot into. Look for an entry that mentions "Previous Linux versions" or something similar. This should boot into a previous kernel version and configuration.
Grub Config & Update
Ref: https://askubuntu.com/a/817999/192800
Take a look at the configuration:
cat /etc/default/grub
Long Explanation of "Normal":
Here are some configuration items in /etc/default/grub that could
potentially affect keyboard behavior or input:
GRUB_TIMEOUT: This parameter specifies the timeout duration (in
seconds) for the GRUB menu to appear during boot. If you have a very
short timeout, it might be difficult to select options from the GRUB
menu using the keyboard.
GRUB_DEFAULT: This parameter specifies the default boot entry that
GRUB will use if no selection is made during the timeout period.
Ensure that the default boot entry corresponds to the correct Ubuntu
kernel entry in your GRUB menu.
GRUB_CMDLINE_LINUX: This parameter allows you to specify kernel
parameters that are passed to the Linux kernel during boot. While not
directly related to keyboard input, kernel parameters can affect
various system behaviors, including input/output (I/O) operations,
which might indirectly impact keyboard functionality.
GRUB_TERMINAL: This parameter determines whether GRUB should use a
graphical or text-based interface for its menu. You can set it to
"console" to force a text-based interface, which might be helpful for
troubleshooting keyboard-related issues.
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu
GRUB_HIDDEN_TIMEOUT=
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
In this example:
- GRUB_DEFAULT=0: Specifies the default boot entry (usually the first entry).
- GRUB_TIMEOUT=5: Sets the timeout duration to 5 seconds.
- GRUB_CMDLINE_LINUX_DEFAULT="quiet splash": Specifies default kernel parameters (quiet mode and splash screen).
- GRUB_CMDLINE_LINUX="": Additional kernel parameters can be added here if needed.
Update
Make sure to run sudo update-grub
after making changes to /etc/default/grub to apply the changes to the GRUB configuration file (/boot/grub/grub.cfg). This command regenerates the GRUB configuration file based on the settings in /etc/default/grub.