NixOS / nixos-hardware

A collection of NixOS modules covering hardware quirks.
Creative Commons Zero v1.0 Universal
1.98k stars 611 forks source link

apple/macbook-pro/12-1: won't resume after hibernation #211

Closed ivankovnatsky closed 3 years ago

ivankovnatsky commented 3 years ago

description: systemctl hibernate -- works fine, though when resuming it fails to get into the system, and the system reboots by itself.

kernel: Linux mac 5.4.78 #1-NixOS SMP Wed Nov 18 18:20:34 UTC 2020 x86_64 GNU/Linux

using:

  systemd.sleep.extraConfig = ''
    HibernateMode=shutdown
  '';

ram/swap:

❯ free -m
              total        used        free      shared  buff/cache   available
Mem:           7870        1675        4452         507        1742        5397
Swap:          8191           0        8191

using luks encryption:

❯ lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda             8:0    0   113G  0 disk
├─sda1          8:1    0   511M  0 part  /boot
└─sda2          8:2    0 112.5G  0 part
  └─crypted   254:0    0 112.5G  0 crypt
    ├─vg-swap 254:1    0     8G  0 lvm   [SWAP]
    └─vg-root 254:2    0 104.5G  0 lvm   /
Mic92 commented 3 years ago

Just to clarify. The swap is big enough. Is there disk encryption used?

ivankovnatsky commented 3 years ago

added some description, but you're right, that's all upstream issues, same as my another issue here, concerning wireless.

apparently there are lots of issues with specifically brcmfmac driver (or the hardware itself).

pretty old bug, but i guess still relevant:

https://bugzilla.kernel.org/show_bug.cgi?id=101681#c116

because i had success resuming after hibernation doing: rmmod brcmfmac && systemctl hibernate.

Mic92 commented 3 years ago

We could try to automate this with systemd suspend modules: https://gist.github.com/mauron85/f764c88d2dc47af157487a7a318dd35b