Skip to content

Boot delay with Asahi Linux #21

Open

Description

@bumblebeeman2

Since the latest update, booting Asahi Linux on Mac mini M2 hangs on "Booting: nvme 0" an takes quite some time to continue. You can accelerate this by pressing Enter. Occasionally, when doing nothing or when going to the boot options you even run into some kind of XHCI timeout. It definitely wasn't like this before. I even did a full reinstall of Asahi to make sure I didn't mess up anything.

Activity

  1. jannau commented on Aug 28, 2024

    @jannau
    Member

    This is probably an issue between u-boot's USB stack and your keyboard. Try booting without keyboard for confirmation.
    Please attach the output of lsusb -vd ${idVendor}:${idProduct}. idVendor and idProduct are printed as "ID 1d6b:0002" in the lsusb output (with different numbers).

  2. bumblebeeman2 commented on Aug 30, 2024

    @bumblebeeman2
    Author

    Thanks for answering. You were right, the delay is gone without the keyboard connected. Here's the output you requested:

    Bus 005 Device 002: ID 05ac:029f Apple, Inc. Magic Keyboard with Touch ID and Numeric Keypad
    Couldn't open device, some information will be missing
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.00
    bDeviceClass 0 [unknown]
    bDeviceSubClass 0 [unknown]
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x05ac Apple, Inc.
    idProduct 0x029f Magic Keyboard with Touch ID and Numeric Keypad
    bcdDevice 4.20
    iManufacturer 1 Apple Inc.
    iProduct 2 Magic Keyboard with Touch ID and Numeric Keypad
    iSerial 3 F0T3435RHBL0PK8A8
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 0x0054
    bNumInterfaces 3
    bConfigurationValue 1
    iConfiguration 4
    bmAttributes 0xa0
    (Bus Powered)
    Remote Wakeup
    MaxPower 500mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 3 Human Interface Device
    bInterfaceSubClass 0 [unknown]
    bInterfaceProtocol 0
    iInterface 5
    HID Device Descriptor:
    bLength 9
    bDescriptorType 33
    bcdHID 1.10
    bCountryCode 0 Not supported
    bNumDescriptors 1
    bDescriptorType 34 Report
    wDescriptorLength 83
    Report Descriptors:
    ** UNAVAILABLE **
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0010 1x 16 bytes
    bInterval 8
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 3 Human Interface Device
    bInterfaceSubClass 1 Boot Interface Subclass
    bInterfaceProtocol 1 Keyboard
    iInterface 6
    HID Device Descriptor:
    bLength 9
    bDescriptorType 33
    bcdHID 1.10
    bCountryCode 13 International (ISO)
    bNumDescriptors 1
    bDescriptorType 34 Report
    wDescriptorLength 207
    Report Descriptors:
    ** UNAVAILABLE **
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0010 1x 16 bytes
    bInterval 8
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 2
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 3 Human Interface Device
    bInterfaceSubClass 0 [unknown]
    bInterfaceProtocol 0
    iInterface 7
    HID Device Descriptor:
    bLength 9
    bDescriptorType 33
    bcdHID 1.10
    bCountryCode 0 Not supported
    bNumDescriptors 1
    bDescriptorType 34 Report
    wDescriptorLength 49
    Report Descriptors:
    ** UNAVAILABLE **
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x85 EP 5 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 1

  3. dontdieych commented on Sep 16, 2024

    @dontdieych

    I'd removed Arch ARM then installed Fedora Asahi. There is significant delay between timeout 0 -> boot spinning + logo stage. About 7-10 seconds? But it always works.

    Problem is it hang on second stage(spinning circle + logo). Pres ESC then systemd boot output show blah ... vconsole setup failed ...cannot log in to root ... blah messages then stop. Ctrl+Alt+Del worked. Sometimes OK, sometimes fail.

    By accident, I realized external keyboard matters. Without external keyboard, boot is ok. Still there is delay after timeout 0.

    $ lsusb
    
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 002 Device 002: ID 04e8:61f3 Samsung Electronics Co., Ltd Portable SSD T3 (MU-PT250B, MU-PT500B)
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    
    # This is my external keyboard. Plug with USB-A to C adapter.
    Bus 003 Device 002: ID 0853:0145 Topre Corporation REALFORCE 87 US 
    
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    
    $ sudo lsusb -vd 0853:0145
    
    Bus 003 Device 002: ID 0853:0145 Topre Corporation REALFORCE 87 US
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               1.01
      bDeviceClass            0 [unknown]
      bDeviceSubClass         0 [unknown]
      bDeviceProtocol         0 
      bMaxPacketSize0         8
      idVendor           0x0853 Topre Corporation
      idProduct          0x0145 REALFORCE 87 US
      bcdDevice            0.01
      iManufacturer           1 Topre
      iProduct                2 REALFORCE 87 US
      iSerial                 0 
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x005b
        bNumInterfaces          3
        bConfigurationValue     1
        iConfiguration          0 
        bmAttributes         0xa0
          (Bus Powered)
          Remote Wakeup
        MaxPower              100mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         3 Human Interface Device
          bInterfaceSubClass      1 Boot Interface Subclass
          bInterfaceProtocol      1 Keyboard
          iInterface              3 Keyboard
            HID Device Descriptor:
              bLength                 9
              bDescriptorType        33
              bcdHID               1.11
              bCountryCode            0 Not supported
              bNumDescriptors         1
              bDescriptorType        34 Report
              wDescriptorLength      65
              Report Descriptors: 
                ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  1x 8 bytes
            bInterval               1
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        1
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         3 Human Interface Device
          bInterfaceSubClass      0 [unknown]
          bInterfaceProtocol      0 
          iInterface              4 Multi-media
            HID Device Descriptor:
              bLength                 9
              bDescriptorType        33
              bcdHID               1.11
              bCountryCode            0 Not supported
              bNumDescriptors         1
              bDescriptorType        34 Report
              wDescriptorLength     119
              Report Descriptors: 
                ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0020  1x 32 bytes
            bInterval               1
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        2
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass         3 Human Interface Device
          bInterfaceSubClass      0 [unknown]
          bInterfaceProtocol      0 
          iInterface              0 
            HID Device Descriptor:
              bLength                 9
              bDescriptorType        33
              bcdHID               1.11
              bCountryCode            0 Not supported
              bNumDescriptors         1
              bDescriptorType        34 Report
              wDescriptorLength      34
              Report Descriptors: 
                ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x83  EP 3 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x04  EP 4 OUT
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               1
    Device Status:     0x0000
      (Bus Powered)
    
    Operating System: Fedora Linux Asahi Remix 40
    KDE Plasma Version: 6.1.4
    KDE Frameworks Version: 6.5.0
    Qt Version: 6.7.2
    Kernel Version: 6.10.9-401.asahi.fc40.aarch64+16k (64-bit)
    Graphics Platform: Wayland
    Processors: 4 × Apple Avalanche (M2), 4 × Apple Blizzard (M2)
    Memory: 7.3 GiB of RAM
    Graphics Processor: Apple M2
    Product Name: Apple MacBook Air (15-inch, M2, 2023)�
    U-Boot Version: 2024.04�
    
  4. dontdieych commented on Sep 26, 2024

    @dontdieych

    Do we need to set this?

    https://docs.u-boot.org/en/latest/usage/environment.html

    usb_ignorelist
    
    Ignore USB devices to prevent binding them to an USB device driver. This can be
    used to ignore devices are for some reason undesirable or causes crashes
    u-boot’s USB stack. An example for undesired behavior is the keyboard emulation
    of security keys like Yubikeys. **U-boot currently supports only a single USB
    keyboard device so try to probe an useful keyboard device.** The default
    environment blocks Yubico devices as common devices emulating keyboards.
    Devices are matched by idVendor and idProduct. The variable contains a comma
    separated list of idVendor:idProduct pairs as hexadecimal numbers joined by a
    colon. ‘*’ functions as a wildcard for idProduct to block all devices with the
    specified idVendor.
    

    my lsusb output,

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 002 Device 002: ID 04e8:61f3 Samsung Electronics Co., Ltd Portable SSD T3 (MU-PT250B, MU-PT500B)
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 002: ID 0853:0145 Topre Corporation REALFORCE 87 US
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    

    four 1d6b:0003, 1d6b:0002 device are USB-C gender. (two per one gender) That is connected to external USB keyboard and external SSD.

    How could I try to set env var usb_ignorelist for uboot?

    Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions