Skip to content

Instantly share code, notes, and snippets.

@JonathanPorta
Created July 4, 2019 20:16
Show Gist options
  • Save JonathanPorta/cbefcb7675746dbe730ffb02c3ee9c0f to your computer and use it in GitHub Desktop.
Save JonathanPorta/cbefcb7675746dbe730ffb02c3ee9c0f to your computer and use it in GitHub Desktop.
Fixes issue with Wifi on MacBook Pro becoming permanently disabled (until you reload the kernel module) after machine wakes up from suspend.
[Unit]
Description=Unload and reload the wifi module after computer resumes from suspend.
After=suspend.target
[Service]
User=root
Type=oneshot
ExecStart=/bin/bash -c "/usr/sbin/rmmod brcmfmac && /usr/sbin/modprobe brcmfmac"
TimeoutSec=0
StandardOutput=syslog
[Install]
WantedBy=suspend.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment