sleep 782 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. case $1 in
  3. pre)
  4. # unload the modules before going to sleep
  5. systemctl stop NetworkManager.service
  6. modprobe -r intel_ipts
  7. modprobe -r mei_me
  8. modprobe -r mei
  9. modprobe -r mwifiex_pcie;
  10. modprobe -r mwifiex;
  11. modprobe -r cfg80211;
  12. ;;
  13. post)
  14. # need to cycle the modules on a resume and after the reset is called, so unload...
  15. modprobe -r intel_ipts
  16. modprobe -r mei_me
  17. modprobe -r mei
  18. modprobe -r mwifiex_pcie;
  19. modprobe -r mwifiex;
  20. modprobe -r cfg80211;
  21. # and reload
  22. modprobe -i intel_ipts
  23. modprobe -i mei_me
  24. modprobe -i mei
  25. modprobe -i cfg80211;
  26. modprobe -i mwifiex;
  27. modprobe -i mwifiex_pcie;
  28. echo 1 > /sys/bus/pci/rescan
  29. systemctl restart NetworkManager.service
  30. ;;
  31. esac