From 03e2db8b65b2aca3c591680c3c3cfc47545ccea0 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Jul 22 2024 19:59:14 +0000 Subject: Install hwdb file to override auto suspend on GL9755 SD card reader 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. --- diff --git a/65-autosuspend-override-asahi.hwdb b/65-autosuspend-override-asahi.hwdb new file mode 100644 index 0000000..46b7dc4 --- /dev/null +++ b/65-autosuspend-override-asahi.hwdb @@ -0,0 +1,2 @@ +pci:v000017A0d00009755* + ID_AUTOSUSPEND=0 diff --git a/fedora-asahi-remix-scripts.spec b/fedora-asahi-remix-scripts.spec index f40c8f7..4415439 100644 --- a/fedora-asahi-remix-scripts.spec +++ b/fedora-asahi-remix-scripts.spec @@ -1,5 +1,5 @@ Name: fedora-asahi-remix-scripts -Version: 20240622 +Version: 20240722 Release: 1%{?dist} Summary: Fedora Asahi Remix utility scripts @@ -12,6 +12,7 @@ BuildArch: noarch BuildRequires: systemd-rpm-macros Requires: dnf Requires: systemd +Requires: systemd-udev Requires: btrfs-progs %description @@ -28,6 +29,7 @@ install -Dpm0644 -t %{buildroot}%{_unitdir} asahi-extras-firstboot.service install -Dpm0644 -t %{buildroot}%{_unitdir} asahi-setup-swap-firstboot.service install -Dpm0644 -t %{buildroot}%{_unitdir} asahi-branding-fixup.service install -Dpm0644 -t %{buildroot}%{_unitdir} asahi-branding-fixup.timer +install -Dpm0644 -t %{buildroot}%{_udevhwdbdir} 65-autosuspend-override-asahi.hwdb install -Dpm0755 -t %{buildroot}%{_libexecdir}/%{name} install-extras.sh install -Dpm0755 -t %{buildroot}%{_libexecdir}/%{name} setup-swap.sh install -Dpm0755 -t %{buildroot}%{_libexecdir}/%{name} fixup-branding-packages.sh @@ -58,9 +60,13 @@ systemctl enable asahi-branding-fixup.timer %{_unitdir}/asahi-setup-swap-firstboot.service %{_unitdir}/asahi-branding-fixup.service %{_unitdir}/asahi-branding-fixup.timer +%{_udevhwdbdir}/65-autosuspend-override-asahi.hwdb %{_libexecdir}/%{name}/ %changelog +* Mon Jul 22 2024 Janne Grunau - 20240722-1 +- Install hwdb file to override auto suspend on GL9755 SD card reader + * Sat Jun 22 2024 Neal Gompa - 20240622-1 - Switch the branding fixup service to timer-based run