0

I have a system with these specs:

Everything was fine, until I ordered the NVIDIA graphics card and installed it. When trying to boot with one or two monitors plugged into the NVIDIA card (even booting to a live USB image to install a new distro), the boot fails with this output:

couldn't allocate usb device

For what it's worth, I'm installing Linux Mint, but we haven't been able to get other distros to work either, but the error message is different for each one. In this case, I can boot to the live USB image, select that I want to boot Linux Mint, and the Mint logo appears for a while, then this error appears.

I can boot with the monitors plugged into the integrated graphics, and then switch them, but there's about 5-10 seconds of lag when I click the mouse or press a key on the keyboard then, so the computer is basically unusable.

Basically, I have no idea why plugging the monitors into the graphics card yields a "couldn't allocate usb_device" error. It seems to think there are more than 127 USB devices plugged in, which is definitely not true.

Matt
  • 813

1 Answers1

1

Turns out the solution is to add amd_iommu=off to the kernel's boot parameters.

To do this when booting the live USB image, I hit "e" at the boot menu and found the line that started with "linux" and added amd_iommu=off before the final -- at the end of the line (right after quiet splash).

After installing Mint, I rebooted but the same error appeared, because that fix was only temporary, for that singular boot. To make the fix permanent, I repeatedly hit the Esc key after power cycling until the grub prompt appeared. I typed normal to load the grub menu, whereupon I repeated the steps above to disable amd_iommu temporarily. Once it booted, I made it permanent by editing /etc/default/grub and modifying a line near the top with GRUB_CMDLINE_LINUX_DEFAULT to be GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amd_iommu=off" (per these instructions).

I'm told this has some security implications. However, setting amd_iommu=fullflush caused the boot to hang and eventually fail.

That resolved the issue permanently; monitors still plugged into the NVIDIA card.

(Documenting the rest of this for myself in case I need to do it again later, slightly different issue though...) However: I have two LG 4K monitors, and only 1 was running at 60Hz; the other was at 30Hz with no 60Hz option available (xrandr), despite the graphics card being capable of it. One was on DisplayPort and the other was on HDMI. The HDMI monitor was stuck at 30Hz. I fixed this by using the monitor's controls to go to Menu -> Quick Settings -> Ratio and setting it to Original, instead of Wide. The next time I ran xrandr, a 60Hz option was available. I enabled that rate by running xrandr --output HDMI-O --mode 3840x2160 --rate 60. But since that's only a temporary fix, I modified ~/.config/monitors.xml and changed its <rate> field to 60. Now it goes to 60Hz at every boot.

Whew. I'm beat -- took a week to figure this out. Thanks to patient coworkers who helped.

Matt
  • 813