Skip to main content
deleted 228 characters in body
Source Link
musicman1979
  • 1.2k
  • 1
  • 10
  • 26
  1. Laptop or Desktop?
  2. Have you tried a different keyboard?
  3. Can you access the Ubuntu machine via SSH from another computer (if you don't have another keyboard)?
  4. Anything obvious jump out from logs? sudo dmesg
  5. What is the Make/Model of the keyboard?

A normal GRUBHere are some configuration file, typically located at items in /bootetc/grubdefault/grub.cfg that could potentially affect keyboard behavior or input:

GRUB_TIMEOUT: This parameter specifies the timeout duration /boot/grub2/grub(in seconds) for the GRUB menu to appear during boot.cfg depending on your If you have a very distributionshort timeout, consists of various sections definingit 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 entries for.

GRUB_CMDLINE_LINUX: This parameter allows you to specify kernel different operating systemsparameters that are passed to the Linux kernel during boot. While not directly related to keyboard input, kernel optionsparameters can affect various system behaviors, and other settings.including input/output (I/O) operations, Here'swhich might indirectly impact keyboard functionality.

GRUB_TERMINAL: This parameter determines whether GRUB should use a simplified example of what graphical or text-based interface for its menu. You can set it to "console" to force a GRUB configuration filetext-based interface, which might be helpful for look like:troubleshooting keyboard-related issues.

# BEGIN /etc/grub.d/00_header set default="0" set timeout="5"


# BEGIN /etc/grub.d/10_linux
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt2'
    linux   /boot/vmlinuz-5.4.0-91-generic root=UUID=1a2b3c4d-5678-90ef-1234-567890abcdef ro quiet splash
    initrd  /boot/initrd.img-5.4.0-91-generic
}

# BEGIN /etc/grub.d/30_os-prober
menuentry 'Windows 11' --class windows --class os {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt1'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}GRUB_DEFAULT=0
GRUB_TIMEOUT=5
# BEGIN /etc/grub.d/40_customGRUB_TIMEOUT_STYLE=menu
menuentry 'Custom Entry' {GRUB_HIDDEN_TIMEOUT=
    set root='hd0,gpt3'GRUB_HIDDEN_TIMEOUT_QUIET=true
    linux   /boot/vmlinuz-customGRUB_DISTRIBUTOR=`lsb_release root=UUID=abcd1234-5678-90ef-5678-90abcdef1234 ro quiet splash
    initrd i /boot/initrd-custom.img
}

# BEGIN /etc/grub.d/40_custom
menuentry 'Custom Entry' {
    set root='hd0,gpt3'
    linux s 2> /bootdev/vmlinuz-custom root=UUID=abcd1234-5678-90ef-5678-90abcdef1234null ro|| quietecho splashDebian`
    initrd GRUB_CMDLINE_LINUX_DEFAULT="quiet /boot/initrd-custom.imgsplash"
}GRUB_CMDLINE_LINUX=""

In this example:

  • The 00_header section sets default timeout andGRUB_DEFAULT=0: Specifies the default boot entry (usually the first entry).
  • The 10_linux section defines a menu entry for Ubuntu, specifying kernel and initrd paths, kernel parameters, and other optionsGRUB_TIMEOUT=5: Sets the timeout duration to 5 seconds.
  • The 30_os-prober section defines a menu entry for Windows 11, specifying the chainloader for the Windows bootloaderGRUB_CMDLINE_LINUX_DEFAULT="quiet splash": Specifies default kernel parameters (quiet mode and splash screen).
  • The 40_custom section defines a custom menu entry with specificGRUB_CMDLINE_LINUX="": Additional kernel parameters can be added here if needed.

Each menuentry block represents a different operating system or configuration option. The set commands and other instructions set various parameters and behaviors for the GRUB bootloader.

Grub can be updated using: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.

sudo update-grub
  1. Laptop or Desktop
  2. Have you tried a different keyboard?
  3. Can you access the Ubuntu machine via SSH from another computer (if you don't have another keyboard)?
  4. Anything obvious jump out from logs? sudo dmesg
  5. What is the Make/Model of the keyboard?

A normal GRUB configuration file, typically located at /boot/grub/grub.cfg or /boot/grub2/grub.cfg depending on your distribution, consists of various sections defining menu entries for different operating systems, kernel options, and other settings. Here's a simplified example of what a GRUB configuration file might look like:

# BEGIN /etc/grub.d/00_header set default="0" set timeout="5"


# BEGIN /etc/grub.d/10_linux
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt2'
    linux   /boot/vmlinuz-5.4.0-91-generic root=UUID=1a2b3c4d-5678-90ef-1234-567890abcdef ro quiet splash
    initrd  /boot/initrd.img-5.4.0-91-generic
}

# BEGIN /etc/grub.d/30_os-prober
menuentry 'Windows 11' --class windows --class os {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt1'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

# BEGIN /etc/grub.d/40_custom
menuentry 'Custom Entry' {
    set root='hd0,gpt3'
    linux   /boot/vmlinuz-custom root=UUID=abcd1234-5678-90ef-5678-90abcdef1234 ro quiet splash
    initrd  /boot/initrd-custom.img
}

# BEGIN /etc/grub.d/40_custom
menuentry 'Custom Entry' {
    set root='hd0,gpt3'
    linux   /boot/vmlinuz-custom root=UUID=abcd1234-5678-90ef-5678-90abcdef1234 ro quiet splash
    initrd  /boot/initrd-custom.img
}

In this example:

  • The 00_header section sets default timeout and default boot entry.
  • The 10_linux section defines a menu entry for Ubuntu, specifying kernel and initrd paths, kernel parameters, and other options.
  • The 30_os-prober section defines a menu entry for Windows 11, specifying the chainloader for the Windows bootloader.
  • The 40_custom section defines a custom menu entry with specific kernel parameters.

Each menuentry block represents a different operating system or configuration option. The set commands and other instructions set various parameters and behaviors for the GRUB bootloader.

Grub can be updated using:

sudo update-grub
  1. Laptop or Desktop?
  2. Have you tried a different keyboard?
  3. Can you access the Ubuntu machine via SSH from another computer (if you don't have another keyboard)?
  4. Anything obvious jump out from logs? sudo dmesg
  5. What is the Make/Model of the keyboard?

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.

Source Link
musicman1979
  • 1.2k
  • 1
  • 10
  • 26

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

  1. Laptop or Desktop
  2. Have you tried a different keyboard?
  3. Can you access the Ubuntu machine via SSH from another computer (if you don't have another keyboard)?
  4. Anything obvious jump out from logs? sudo dmesg
  5. 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

  1. Reboot Your Computer: If your computer is currently running, you'll need to reboot it to access the GRUB menu.

  2. 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.

  3. 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":

A normal GRUB configuration file, typically located at /boot/grub/grub.cfg or /boot/grub2/grub.cfg depending on your distribution, consists of various sections defining menu entries for different operating systems, kernel options, and other settings. Here's a simplified example of what a GRUB configuration file might look like:

# BEGIN /etc/grub.d/00_header set default="0" set timeout="5"


# BEGIN /etc/grub.d/10_linux
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt2'
    linux   /boot/vmlinuz-5.4.0-91-generic root=UUID=1a2b3c4d-5678-90ef-1234-567890abcdef ro quiet splash
    initrd  /boot/initrd.img-5.4.0-91-generic
}

# BEGIN /etc/grub.d/30_os-prober
menuentry 'Windows 11' --class windows --class os {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt1'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

# BEGIN /etc/grub.d/40_custom
menuentry 'Custom Entry' {
    set root='hd0,gpt3'
    linux   /boot/vmlinuz-custom root=UUID=abcd1234-5678-90ef-5678-90abcdef1234 ro quiet splash
    initrd  /boot/initrd-custom.img
}

# BEGIN /etc/grub.d/40_custom
menuentry 'Custom Entry' {
    set root='hd0,gpt3'
    linux   /boot/vmlinuz-custom root=UUID=abcd1234-5678-90ef-5678-90abcdef1234 ro quiet splash
    initrd  /boot/initrd-custom.img
}

In this example:

  • The 00_header section sets default timeout and default boot entry.
  • The 10_linux section defines a menu entry for Ubuntu, specifying kernel and initrd paths, kernel parameters, and other options.
  • The 30_os-prober section defines a menu entry for Windows 11, specifying the chainloader for the Windows bootloader.
  • The 40_custom section defines a custom menu entry with specific kernel parameters.

Each menuentry block represents a different operating system or configuration option. The set commands and other instructions set various parameters and behaviors for the GRUB bootloader.

Grub can be updated using:

sudo update-grub