Skip to content

Commit

Permalink
Added suspension workaround script to postinstall.md (#551)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Aditya Garg <[email protected]>
  • Loading branch information
angelobdev and AdityaGarg8 authored Jun 27, 2024
1 parent d11ad47 commit cc6062e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/guides/postinstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,40 @@ blacklist cdc_mbim" >> /etc/modprobe.d/blacklist.conf'
```
Please note that this internal ethernet interface is required for various services including touchid that there currently is no Linux support for. In the future, if any of these services are supported, you'll need to undo this.

# Suspend Workaround

S3 suspend has been broken since macOS Sonoma, it has never been fixed, but this workaround will make deep suspend work:

This comment has been minimized.

Copy link
@asavageiv

asavageiv Aug 7, 2024

Thank you for this documentation.

Are S3 and deep suspend the same thing?

This comment has been minimized.

Copy link
@AdityaGarg8

AdityaGarg8 Aug 7, 2024

Author Member

Yes


1. Create and edit this file: `/etc/systemd/system/suspend-fix-t2.service`

2. Paste this content:

```service
[Unit]
Description=Disable and Re-Enable Apple BCE Module (and Wi-Fi)
Before=sleep.target
StopWhenUnneeded=yes
[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/modprobe -r brcmfmac_wcc
ExecStart=/usr/bin/modprobe -r brcmfmac
ExecStart=/usr/bin/rmmod -f apple-bce
ExecStop=/usr/bin/modprobe apple-bce
ExecStart=/usr/bin/modprobe brcmfmac
ExecStart=/usr/bin/modprobe brcmfmac_wcc
[Install]
WantedBy=sleep.target
```

3. Enable the service by running: `sudo systemctl enable --now suspend-fix-t2.service`

!!! note
This seems to be working only on Arch with `CONFIG_MODULE_FORCE_UNLOAD=y` in the kernel config.
To check, run: `zcat /proc/config.gz | grep "CONFIG_MODULE_FORCE_UNLOAD"`

0 comments on commit cc6062e

Please sign in to comment.