Keyboard and mouse randomly not working at boot Linux ARM64

Discussion in 'Parallels Desktop on a Mac with Apple silicon' started by cyb3rw0lf, Feb 15, 2023.

  1. cyb3rw0lf

    cyb3rw0lf Junior Member

    Messages:
    13
    When booting Linux ARM64, (tested with Debian and Kali) the following message is received and both keyboard and mouse stop working.
    Code:
    [8.140694] usb 3-1: can't set config #1, error -62
    [20.434345] xhci_hod 0000:00:03.0: Error while assigning device slot ID
    [20.434466] xhci_hed 0000:00:03.0: Max number of devices this xHCI host supports is 32.
    [20.434524] usb usb3-portZ: couldn't allocate usb device
    [32.715807] xhci_hod 0000:00:03.0: Error while assigning device slot ID
    [32.7159531 xhci_hed 0000:00:03.0: Max number of devices this xHCI host supports is 32.
    [32.716022] usb usb3-port3: couldn't allocate us device
    
    Keyboard works during GRUB but then it stop when kernel is loaded.
    The issue happens randomly and forcing shutdown of the VM and booting again fix it. Sometimes one power-off is not enough and needs to be done multiple times. Very annoying.

    Had the same problems with multiple VMs and could also reproduce it in a newly installed machine.
    Tested with keyboard and mouse in both "Optimized for Gaming" and not with the same result.
     
    BellaW1 likes this.
  2. cyb3rw0lf

    cyb3rw0lf Junior Member

    Messages:
    13
    same issue with arch linux. Is there a fix for this?
     
  3. Nico7

    Nico7 Bit poster

    Messages:
    2
    have you had any luck on fixing this? I have exactly the same issue
     
  4. cyb3rw0lf

    cyb3rw0lf Junior Member

    Messages:
    13
    Yes, I opened a ticket with parallels support and got a working solution by adding xhci_hcd.quirks=0x40 in the bootloader option.
    Before starting take a snapshot of the VM.

    For GRUB:
    1. Open Terminal, and execute the following command:
    Code:
    sudo nano /etc/default/grub
    2. Scroll down and locate the line:
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet"
    3. Replace that line with the following line:
    Code:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet xhci_hcd.quirks=0x40"
    4. Save the file ("Control+X" -> press "Y" -> press "Enter").
    5. Next, execute the following command:
    Code:
    sudo update-grub

    For SYSTEMD-BOOT:
    1. Find your loader configuration file
    Code:
    sudo bootctl status | grep source
    Example:
    Code:
    arch$ sudo bootctl status | grep source                       
          source: /boot//loader/entries/archlinux-core-main.conf
    2. Edit the loader configuration file and append the xhci_hcd.quirks=0x40 command in the options field, comma separated
    Code:
    sudo nano /boot//loader/entries/archlinux-core-main.conf
    Example:
    Code:
    title    Arch Linux
    linux    /Image
    initrd   /amd-ucode.img
    initrd   /initramfs-linux.img
    options  root=PARTUUID=xxxxx-xxxx-xxxx-xxxx-xxxxxxxx rootfstype=btrfs rw rootflags=rw,noatime,compress=lzo,ssd,space_cache=v2,subvolid=256,subvol=/root,subvol=root cgroup_disable=memory add_efi_memmap, xhci_hcd.quirks=0x40
     
  5. Nico7

    Nico7 Bit poster

    Messages:
    2
    This worked perfectly, thanks :)
     
  6. sbarnea

    sbarnea Junior Member

    Messages:
    13
    Any chance we can get a permanent fix for this? Apparently the keyboard is getting frozen all the time when booting from fresh install and when booting from the arch ISO it does freeze in ~50% of the cases, making close to impossible to even apply the workaround on the machine, especially as remote login with ssh is disabled by default for security reasons.

    I wonder if there is something we can do on guest os to prevent this from happening.
     
  7. cyb3rw0lf

    cyb3rw0lf Junior Member

    Messages:
    13
    You can edit the GRUB/SYSTEMD-BOOT menu entry before booting and add the same option so that the keyboard and mouse will work at the first boot.
    For GRUB press 'e' to edit the entry, for systemd-boot I don't remember.
    I don't know about permanent fix but hopefully will come.
     

Share This Page