You are not logged in.

#1 2023-09-16 18:48:43

jbmt
Member
Registered: 2023-09-16
Posts: 5

[SOLVED] Weird behavior of hibernate on macbook air 2015

Hi, I'm running out of googling, so this is my last effort.

I got a macbook air 11 inch 2015 version, with core i5 cpu, 4G ram, 128G ssd.
As this mac is not supported by the latest MacOS now, I installed archlinux on it, everything works perfectly except hibernate function.

I've followed the arch wiki: https://wiki.archlinux.org/title/Power_ … _hibernate, have a 4G swap partition, add the resume hook in mkinitcpio.conf and added resume=UUID=<swap uuid> kernel parameter.
the suspend function works fine. But the hibernate function only works when my ram usage is under ~500M.

I can login in console and execute systemctl hibernate, it worked, I can boot again with no data loss. but as long as i login into a DE, say KDE or XFCE, no matter in X11 or wayland, systemctl hibernate only makes the screen blink once
and the whole system just freeze, the screen and keyboard light is on, but no action for more than 5 minutes, I have to hold power button to shutdown.

I have tried mess up with sleep.conf, using echo disk > /sys/power/state instead of systemctl hibernate command, add acpi_osi=Darwin kernel parameter,change to linux-lts kernel, disable zswap, all with no luck.

It's so bizarre to me that when ram usage is low, hibernate works. I can login without a DE, start a simple window manager like sway, hibernate still works, but after a "large" application is opened, say firefox, hibernation fails.

Any suggestions?

Last edited by jbmt (2023-09-19 18:54:44)

Offline

#2 2023-09-19 18:53:45

jbmt
Member
Registered: 2023-09-16
Posts: 5

Re: [SOLVED] Weird behavior of hibernate on macbook air 2015

[UPDATE]
I finally figured out the problem, It's because the facetimehd kernel module I installed from AUR: https://aur.archlinux.org/packages/bcwc-pcie-git

the facetimehd wiki says:

Suspend / resume doesn't work properly. Suspending must be done with the device closed.

maybe is related, anyway I decide to make a workaround, remove facetimehd kernel module before suspend and load it after resume:

/usr/lib/systemd/system-sleep/facetimehd-fix.sh

#!/bin/sh
case $1/$2 in
  pre/*)
    rmmod facetimehd
    ;;
  post/*)
    modprobe facetimehd
    ;;
esac

Now, both hibernate and facetimehd camera work well

Last edited by jbmt (2023-09-19 18:56:03)

Offline

Board footer

Powered by FluxBB