2

[This is a repost from Ubuntu Ask, as as I'm actually on Linux Mint 20.2 and therefore this question belongs in this site]

I've had a dual boot on two hard drives with Windows 10 and Linux Mint for quite a while, and recently changed my GPU. After updating the drivers on both OS, I encounter this issue on GRUB: pressing Enter works, allowing me to boot on Mint, but pressing down goes (almost) immediately to the last item in the menu, and then GRUB becomes unusable. It's as if the down key was hold instead of being just pressed once! Trying any other key gives the same result. I also tried "c" to open a terminal, and indeed the "c" letter is then spammed in the prompt. Although not eternally: it stops after a while. Typing any letter then gives the same result, it appears 15 or 20 times in the terminal, then it stops. Unfortunately the GRUB menu is forever stuck as soon as a key is pressed (other than Enter).

I've done a bit of research, but the only discussion I found that resemble those symptoms is this one on launchpad. (most of the cases, discussion about keyboard in GRUB are about keyboard not being detected at all). The problem has been here for quite a while it seems, and is reported only once a year. I've provided a bit of information there as well.

What I've tried so far is:

  • Switching my USB keyboard from a USB3 to a USB2 port
  • Disabling the Legacy USB support in the BIOS
  • Disabling XHCI in BIOS
  • Purging and Re-installing GRUB (through boot-repair)

None of those solutions had any effect. Although sometimes, I've been able to use GRUB! It gave me the impression to have fixed the issue, I think most of the times it was after I had change something? Unfortunately GRUB is still glitching after the next reboot, and I have been unable to consistently reproduce this glimpse of hope.

Next I might try to update my BIOS itself. I strongly suspect the AMD driver manager on Windows to have done something to it. Not sure yet when I'll have the time to do it, I'll update you once it's done (hopefully the operation will be successfull).

Anyway, here are some info on my system:

If you need anything more, please ask.

Update 17/09: I posted an answer clarifying the issue after some researches, see below.

1
  • Update: So I updated my BIOS, and nothing changed. I'm kinda out of ideas now. Since GRUB is installed on all of my drives, even booting on the Windows one is pointless! Does anyone have any suggestion to, I don't know, use another way to select my OS or have a clean GRUB?
    – Itooh
    Commented Sep 14, 2022 at 19:51

3 Answers 3

2

I eventually solved it!

I did a CMOS clear on the motherboard, then plugged my keyboard on a USB2 port.

For people having this issue in the future, the first step might be optional. In my case I probably had some hardware malfunction.

Also something important to note: switching USB port while grub is running has no effect! I had to reboot before trying again, and only then it worked (I actually did 5 attempts to be sure and confirm that the case was closed).

More details on the Linux Mint forums.

2
  • Indeed, this was my problem too. I think what caused it was removing my pc power cord, then unplugging my keyboard from usb2 and using usb from there on.
    – Daniel
    Commented Dec 19, 2022 at 21:58
  • I'm currently fighting this precise issue. Not yet tried your fix. And as much as I appreciate this fix I think this is at best a workaround/mitigation. Why is this an issue, at all? After all, after booting there is not problem anywhere. I don't have an issue in the Bios, I don't have an issue in Windows boot loader, nor in Windows, nor do I don't have an issue in Linux (Ubuntu) after booting. Just grub is bent out of shape. Now I have to go reset my Bios and use a specific type of USB port to humor the boot loader. Feels like something wrong in bootloader then. Even so, thanks again.
    – W.Prins
    Commented Oct 21, 2023 at 12:16
0

Alright, I still have the issue, but I made some significant progress.

First, I identified the problem: the refresh rate in GRUB is too high, making the keyboard too sensitive. One press on down is registered as 10 presses (which a lot of time make the GRUB menu freeze). So, the question now is: How to lower the framerate of GRUB so that the keyboard is usable?

For this, I tried several things in /etc/default/grub. Inspired by this thread (which had the exact same problem), and the GRUB documentation, I played with some of the values:

  • GRUB_TERMINAL_INPUT: Tried console, usb_keyboard, serial, did not seem to have a real impact.
  • GRUB_TERMINAL_OUTPUT: Seemed to make a difference when set on console (and also `serial)! The resolution was as small as possible, and half of the time the keyboard was working! Unfortunately, the other half, GRUB would just freeze whatever I do.
  • GRUB_GFX_MODE: I experimented with several resolutions. After a lot of trials, my impression is that the lower the resolution is, the worse the problem gets.
  • GRUB_GFXPAYLOAD_LINUX: I tried to set it on text, but it generated some issues that sometimes prevented Linux from booting. Anyway, this apparently only impacts the boot of Linux, not the GRUB menu itself, so I don't think it is relevant.
  • GRUB_CMDLINE_LINUX_DEFAULT: I thought I would be able to set the framerate manually by adding the argument video=1920x1080@60, but it had no effect.

I tried several combinations, some looked promising, but eventually none really worked and now I'm (again) back to where I was.

At least I know a little bit more what I'm searching for. And I have a small workaround: if I press my keyboard very, very gently in the GRUB menu, I'm somewhat able to select what I want. It's not ideal though, the smallest wrong move can freeze GRUB and force to reboot. So once again, I'm open to suggestions!

Here is my current grub config, by the way.

0

Tried other suggested solutions and couldn't find anything that helped, apart from changing it to text mode like this: GRUB_TERMINAL=console in the /etc/default/grub file.
It looks extremely nostalgic, but it's usable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .