iMac M1, issues with the latest kernel

Hi all,

After updating the kernel (to 6.10.9-401) and a few other packages (bluez and some firmware-packages) this morning , wifi and bluetooth are not working anymore, as if the system doesn’t detect any bluetooth and wifi controller.

Downgrading some of the newly updated packages (brcmfmac-firmware , bluez, qcom-firmware, linux-firmware) doesn’t change anything.

But booting another kernel (6.10.6-401) solves the issues.

Here is what I noticed when attempting to understand what was going on (I’m very far from being an expert, so that may be useless) :

  • during the boot with kernel 6.10.9-401 , the countdown from 2 to 0 is longer than with the previous kernels
  • with kernel 6.10.9-401 , 2 of the 4 usb-c port at the back of my iMac are not working. Only the two with the small flash symbol above them are working . With kernel 6.10.6 , all 4 are working.

Note : when I select kernel 6.10.6-401 in the grub menu, it seems I fall in a loop displaying “XHCI timeout on event type 0” . I have to hit a random key so that the system boots.

Question : what can I do to fix the issues with 6.10.9 or to avoid selecting kernel 6.10.6 with grub at each boot ?

Many thanks for your help.

Does /lib/firmware/vendor exist and have contents when you boot into the broken kernel? This sounds like a firmware issue, possibly caused by the initramfs. Check that you have asahi-platform-metapackage and asahi-scripts installed.

There are some PCIe related changes in 6.10.9-401 but I don’t understand how they could break PCIe on some devices and/or some conditions.
Please attach a kernel log from a boot with 6.10.9-401. Is the ethernet PCIe card present? The output of lspci would be interesting as well.

Thanks for your quick answers.

  • /lib/firmware/vendor exists and has content when using the broken kernel : 3 folders (apple , asmedia and brcm , which are not empty).
    asahi-platform-metapackage and asahi-scripts are installed.

  • here is a kernel log file from a boot with 6.10.9-401 : Kernel logs (where my username is replaced by *********)

  • Output of lspci with 6.10.9-401
    00:00.0 PCI bridge: Apple Inc. Apple Silicon PCI Express Root Port (rev 01)
    00:01.0 PCI bridge: Apple Inc. Apple Silicon PCI Express Root Port (rev 01)
    00:02.0 PCI bridge: Apple Inc. Apple Silicon PCI Express Root Port (rev 01)

  • Output of lspci with 6.10.6-401 :
    00:00.0 PCI bridge: Apple Inc. Apple Silicon PCI Express Root Port (rev 01)
    00:01.0 PCI bridge: Apple Inc. Apple Silicon PCI Express Root Port (rev 01)
    00:02.0 PCI bridge: Apple Inc. Apple Silicon PCI Express Root Port (rev 01)
    01:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4378 802.11ax Dual Band Wireless Network Adapter (rev 03)
    01:00.1 Network controller: Broadcom Inc. and subsidiaries BRCM4378 Bluetooth Controller (rev 03)
    02:00.0 USB controller: ASMedia Technology Inc. ASM2142/ASM3142 USB 3.1 Host Controller
    03:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57762 Gigabit Ethernet PCIe

The above kernel logs are the output of journalctl -k (it’s maybe not what you were expecting).

Below are :

Does it make make a difference if you boot without keyboard connected (I assume this is one of the Apple keyboards included in the imac).

The journalctl kernel.log is unfortunately truncated. can you instead post the output of sudo dmesg | grep pci for both the broken 6.10.9-401 and the working 6.10.6-401.

Changing the ID to boot from an older Kernel by default | grubby looks like it still contains accurate information on how to change the default boot kernel.

When I boot 6.10.9-401 without keyboard connected (yes, it’s the apple magic keyboard connected with its wire) , the boot process seems to be more “normal” :

  • the system isn’t stuck at “booting nvme 0” for around 10 seconds as it is when booting with keyboard connected
  • the system display the logs while booting whereas it doesn’t when booting with keyboard connected

But still no ethernet PCIe card / bluetooth/wifi controller detected.

Here are the output of sudo dmesg | grep pci :

Since installing 6.10.9-401.asahi.fc40 on my M1 iMac I don’t have working ethernet either. Just no adapter listed in the output of “ip l”. Booting in to 6.10.6 fixes the issue. I don’t use Bluetooth so unsure if it is affected here.

I tried a few things: power cycling the PSU, plugging / unplugging from the iMac end, booting in to macOS etc.

I think the issue may be related to these lines from the outputs of dmesg (after booting with 6.10.9-401) :
pcie-apple 690000000.pcie: /soc/pcie@690000000/pci@0,0 link didn’t come up
pcie-apple 690000000.pcie: /soc/pcie@690000000/pci@1,0 link didn’t come up
pcie-apple 690000000.pcie: /soc/pcie@690000000/pci@2,0 link didn’t come up

The asahi developers have already discussed in the past about this kind of lines :

But this is to me expert discussions, and I don’t know if we can do something or if we have to wait for another kernel release.

The issue is understood and fixes (for kernel and u-boot) are underway. It wasn’t caught during testing since iboot configures GPIO pins inconsistently and only the configuration on imacs (as far as I’m aware).

1 Like

Should be fixed by kernel-16k-6.10.9-402.asahi, available via sudo dnf --refresh upgrade. Sorry for the inconvenience.

2 Likes

Confirming that 6.10.9-402 fixes the problem here.

Say, @nigau, you haven’t run in to the same black frame issue I have had with the iMac at Full screen black flashes on M1 iMac after recent update have you?

I also confirm that 6.10.9-402 solves the issue. Thank you very much Janne for your quick help ! :+1: :+1: