#7 Install hwdb file to override auto suspend on GL9755 SD card reader
Merged by marcan. Opened by jannau.
fedora-asahi/ jannau/fedora-asahi-remix-scripts gl9755_no_autosuspend  into  main

Download 7.patch

systemd v255 shipped a hwdb update enabling auto suspend (runtime PM)
for the SD card reader Apple uses in 14- and 16-inch Macbook Pros and
Mac Studios
(https://github.com/systemd/systemd/commit/2f72e94984fc2994ab2705e384f92e15cc026264).
This PCI ID is imported from ChromiumOS. The driver in upstream Linux
does not support runtime PM so this change is questionable to useless.
Unfortunately it creates a race between enabling auto suspend and probing
the sdhci_pci driver. If the default idle timeout (2000 ms) triggers
before the driver is bound the default PCI device runtime suspend
callback will be called. On Apple silicon devices the GL9755 card
reader is inaccessible after it is resumed for the driver's probe
function. Accessing the device's BAR results in a SError with
ESR = 0x92000018.
It's not entirely clear whether which is an issue with the device or
with Apple silicon's PCIe implementation or Linux driver.

Should this be fixed in systemd upstream?

this is still unclear. The hwdb change just removes one trigger for the issue (although the most likely one). It's conceivable that someone enables autosuspend (through powertop / TLP) and then removes and reloads the sdhci_pci module.
The bad error case with a SError is very likely Apple silicon specific and we need to look into it.

This is getting nasty and hitting more users (including me). Let's ship the workaround now while we figure out how to more properly fix it in the kernel.

Pull-Request has been merged by marcan

Metadata