This script configures your system to properly suspend and resume by managing the Broadcom WiFi driver and Apple BCE keyboard backlight driver. It creates systemd services to handle driver unloading before suspend and reloading after resume in correct sequence. Keyboard backlight not working on boot is also taken care of.
We can't continue developing this script. It showed that people with the same hardware and same distro have varying results. It leads to the conclusion that we are either dealing with different hardware or firmware revisions. This is impossible to handle. Please try the script. If it's working - yay! If not, use the uninstaller and call it a day until T2Linux devs come up with a better solution.
- The system needs more time to resume than you're used to from MacOS. The script takes between 1.5 to 3 seconds to run through. The longest waiting times is userland re-initializing.
- Some systems don't work with the script. It's unclear if this is related to the specific hardware, firmware or distro.
- There is an uninstall option when running the script. If the script doesn't work for you, just reboot and run it again. It will restore your previous settings and files.
- Note that using powertop --auto-tune or any related script enabling/forcing ASPM will block "optimized" PCI devices from transitioning to D3 power state. Or in other words: If you want to enjoy working suspend, remove such scripts.
- The script uses deep sleep. Hibernate and hybrid sleep will also work, but require further manual steps like creating a swap partition.
- Download the script:
wget https://raw.githubusercontent.com/deqrocks/T2Linux-Suspend-Fix/refs/heads/main/t2-suspend-fix.sh- Make it executable:
chmod +x t2-suspend-fix.sh- Run it:
./t2-suspend-fix.sh-
Choose install or uninstall
-
Check the prompts and Reboot
The script performs the following actions:
- Configures the system to use deep sleep mode
- Creates systemd services
- Backups, disables or removes conflicting services (thermald/override.conf)
- Sets ASPM to off if needed
- Installs libnotify (if notify-send is missing) to show desktop notifications for failed resume steps
/etc/systemd/system/suspend-wifi-unload.service
Runs before suspend to aggressively unload WiFi and BCE drivers:
- Deactivates WiFi interface via NetworkManager
- Unloads brcmfmac_wcc and brcmfmac modules
- Removes the apple-bce module
/etc/systemd/system/resume-wifi-reload.service
Runs after resume to restore WiFi and BCE:
- Loads apple-bce module
- Waits up to 15s for apple-bce to appear; if it doesn't, resume-wifi-reload aborts and logs a message (desktop notification when notify-send is available)
- Loads brcmfmac module
- Reactivates WiFi interface
- After 5 seconds, checks if brcmfmac is bound; if not, reloads brcmfmac
/etc/systemd/system/fix-kbd-backlight.service
Runs on boot and after resume to restore keyboard backlight:
- Checks if keyboard backlight path exists
- Reloads apple-bce driver if needed
- Sets keyboard backlight brightness
/usr/local/bin/fix-kbd-backlight.sh
Shell script called by the keyboard backlight service to handle driver reload logic.
The script also modifies the following system settings:
- Sets
mem_sleep_default=deepkernel parameter via grubby - Disables thermald service if present
- Sets
pcie_aspm=off - Backups and removes systemd-suspend override.conf if present
To remove the suspend fix run the script again and choose the uninstall option.
Download debug-suspend.sh
Make script executable:
chmod +x debug-suspend.sh
Execute BEFORE suspend:
./debug-suspend.sh
Then suspend and execute again AFTER suspend:
./debug-suspend.sh
The script will show you the output location of the log files like this:
=== Debug information collected ===
Log saved to: /tmp/t2-suspend-debug-20260202-230441.log
Please post both log files when reporting issues.
Yes please!
Use at your own risk.