Macbook flash drive preventing hibernation resume

I’ve been banging my head against the wall trying to get hibernate/resume working on an older macbook. I finally found the source of the problem in dmesg

[    2.403536] PM: Image signature found, resuming
[    2.403541] PM: hibernation: resume from hibernation
[    2.403545] random: crng reseeded on system resumption
[    2.403687] Freezing user space processes
[    2.404817] Freezing user space processes completed (elapsed 0.001 seconds)
[    2.404821] OOM killer disabled.
[    2.404822] Freezing remaining freezable tasks
[   12.317097] mmc0: Timeout waiting for hardware cmd interrupt.
[   12.319566] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[   12.322068] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x00001502
[   12.324616] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[   12.327036] mmc0: sdhci: Argument:  0x00000c00 | Trn mode: 0x00000000
[   12.329383] mmc0: sdhci: Present:   0x1fff0001 | Host ctl: 0x00000001
[   12.331707] mmc0: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[   12.333921] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x0000fa07
[   12.336154] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00018000
[   12.338394] mmc0: sdhci: Int enab:  0x00ff0083 | Sig enab: 0x00ff0083
[   12.340679] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000001
[   12.342953] mmc0: sdhci: Caps:      0x176ec8b0 | Caps_1:   0x03002177
[   12.345228] mmc0: sdhci: Cmd:       0x0000341a | Max curr: 0x00000000
[   12.347559] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[   12.349848] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[   12.352143] mmc0: sdhci: Host ctl2: 0x00000000
[   12.354417] mmc0: sdhci: ADMA Err:  0x00000001 | ADMA Ptr: 0x0000000000000000
[   12.356737] mmc0: sdhci: ============================================
[   22.413506] Freezing remaining freezable tasks failed after 20.008 seconds (0 tasks refusing to freeze, wq_busy=1):
[   22.416093] Showing freezable workqueues that are still busy:
[   22.416098] workqueue events_freezable: flags=0x4
[   22.416102]   pwq 14: cpus=7 node=0 flags=0x0 nice=0 active=1/0 refcnt=2
[   22.416113]     in-flight: 139:mmc_rescan [mmc_core]
[   22.416174]   pwq 6: cpus=3 node=0 flags=0x0 nice=0 active=0/0 refcnt=2
[   22.416181]     inactive: pci_pme_list_scan
[   22.416194] workqueue usb_hub_wq: flags=0x4
[   22.416197]   pwq 14: cpus=7 node=0 flags=0x0 nice=0 active=0/0 refcnt=2
[   22.416203]     inactive: hub_event
[   22.416211]   pwq 4: cpus=2 node=0 flags=0x0 nice=0 active=0/0 refcnt=2
[   22.416216]     inactive: hub_event
[   22.416250] Restarting kernel threads ... done.
[   22.416728] OOM killer enabled.

After chasing 4 or 5 red herrings in that output, I finally looked up what mmc0 was. Turns out its my expansion 128GB flash drive.

If i pop the flash drive out hibernate/resume works flawlessly.

I’m curious if anyone has a suggestion of how I could work around this to allow hibernate to work with the flash drive installed. Is there a command I could try running before hibernate to manually unmount and unload the flash drive modules?

Thanks much

I found this handy page wiki page which describes my problem. Trying it out now.

https://wiki.archlinux.org/title/MacBookPro10,x#Memory_Card_(SDHCI/SDX)_Reader

So I tried running these commands

sudo rmmod sdhci-pci sdhci
sudo modprobe sdhci debug_quirks2=4
sudo modprobe sdhci-pci

And then tested hibernation again, but I’m back to

[   12.317097] mmc0: Timeout waiting for hardware cmd interrupt.

I also tested just rmmod on both modules without adding them back. Same issue.

Just out of curiosity I tried to add these modules to /etc/modprobe.d/blacklist.conf

I tried both

blacklist sdhci
blacklist sdhci-pci

and

install sdhci-pci /bin/true
install sdhci /bin/true

Neither prevented the module from loading.

I eventually added module_blacklist=sdhci,sdhci-pci to my kernel options and that prevents the module from loading.and allows hibernate to work.

However now I’m not able to manually load the modules for the sd card in the event I need to use it.

What MacBook model? And what DE/WM are you running?

MacBookPro10,1
KDE 6 Wayland

Nearly fresh install of Gemini