Update systemd-sleep script for IPTS changes
Integrate the changes discussed in [1] as proposed by @kitakar5525 in [2]. The IPTS suspend/resume mechanism should work without the need for unloading/reloading the corresponding modules, so we comment-out and update the workaround and will handle any issues coming from that via the IPTS drivers. The workaround is not completely removed yet as want to provide an easy-to-apply temporary fix in case anything goes wrong. [1]: https://github.com/jakeday/linux-surface/issues/544 [2]: https://github.com/jakeday/linux-surface/issues/544#issuecomment-519126757
This commit is contained in:
parent
e8a3d85b22
commit
fadf055d5f
|
@ -1,27 +1,36 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
case $1 in
|
case $1 in
|
||||||
pre)
|
pre) # unload the modules before going to sleep
|
||||||
# unload the modules before going to sleep
|
# handle wifi issues
|
||||||
systemctl stop NetworkManager.service
|
systemctl stop NetworkManager.service
|
||||||
modprobe -r intel_ipts
|
|
||||||
modprobe -r mei_me
|
|
||||||
modprobe -r mei
|
|
||||||
modprobe -r mwifiex_pcie;
|
modprobe -r mwifiex_pcie;
|
||||||
modprobe -r mwifiex;
|
modprobe -r mwifiex;
|
||||||
modprobe -r cfg80211;
|
modprobe -r cfg80211;
|
||||||
|
|
||||||
|
## IPTS: see notes below
|
||||||
|
## > Remove IPTS from ME side
|
||||||
|
#modprobe -r intel_ipts
|
||||||
|
#modprobe -r mei_hdcp
|
||||||
|
#modprobe -r mei_me
|
||||||
|
#modprobe -r mei
|
||||||
|
## > Remove IPTS from i915 side
|
||||||
|
#for i in $(find /sys/kernel/debug/dri -name i915_intel_ipts_cleanup); do echo 1 > $i; done
|
||||||
;;
|
;;
|
||||||
post)
|
post) # re-load modules after resume
|
||||||
# need to cycle the modules on a resume and after the reset is called, so unload...
|
## IPTS: see notes below
|
||||||
modprobe -r intel_ipts
|
## > Load IPTS from i915 side
|
||||||
modprobe -r mei_me
|
#for i in $(find /sys/kernel/debug/dri -name i915_intel_ipts_init); do echo 1 > $i; done
|
||||||
modprobe -r mei
|
## > Load IPTS from ME side
|
||||||
|
#modprobe mei
|
||||||
|
#modprobe mei_me
|
||||||
|
#modprobe mei_hdcp
|
||||||
|
#modprobe intel_ipts
|
||||||
|
|
||||||
|
# handle wifi issues: complete cycle
|
||||||
modprobe -r mwifiex_pcie;
|
modprobe -r mwifiex_pcie;
|
||||||
modprobe -r mwifiex;
|
modprobe -r mwifiex;
|
||||||
modprobe -r cfg80211;
|
modprobe -r cfg80211;
|
||||||
# and reload
|
# and reload
|
||||||
modprobe -i intel_ipts
|
|
||||||
modprobe -i mei_me
|
|
||||||
modprobe -i mei
|
|
||||||
modprobe -i cfg80211;
|
modprobe -i cfg80211;
|
||||||
modprobe -i mwifiex;
|
modprobe -i mwifiex;
|
||||||
modprobe -i mwifiex_pcie;
|
modprobe -i mwifiex_pcie;
|
||||||
|
@ -29,3 +38,12 @@ case $1 in
|
||||||
systemctl restart NetworkManager.service
|
systemctl restart NetworkManager.service
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Notes:
|
||||||
|
# - For IPTS, see
|
||||||
|
# > https://github.com/jakeday/linux-surface/issues/544#issuecomment-519126757
|
||||||
|
# for an explanation/discussion. We do not unload/reload modules for now as
|
||||||
|
# the IPTS drivers should be able to resume/suspend without this. If you
|
||||||
|
# experience any issues on suspend/resume, please file an appropriate issue or
|
||||||
|
# join the discussion linked above so that we can fix it. As a temporary
|
||||||
|
# workaround, you may want to uncomment the IPTS-related lines above.
|
||||||
|
|
Loading…
Reference in a new issue