-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deck): Add fix for suspend with some wifi adapters.
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
system_files/deck/shared/usr/etc/device-quirks/systemd-suspend-mods.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Line separated list of modules to unload/reload at suspend/resume. | ||
mt7921e |
20 changes: 20 additions & 0 deletions
20
system_files/deck/shared/usr/lib/systemd/system-sleep/systemd-suspend-mods.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# This file runs during sleep/resume events. It will read the list of modules | ||
# in /etc/device-quirks/systemd-suspend-mods.conf and rmmod them on suspend, | ||
# insmod them on resume. | ||
# Originally created by ChimeraOS | ||
|
||
MOD_LIST=$(grep -v ^\# /etc/device-quirks/systemd-suspend-mods.conf) | ||
|
||
case $1 in | ||
pre) | ||
for mod in $MOD_LIST; do | ||
modprobe -r $mod | ||
done | ||
;; | ||
post) | ||
for mod in $MOD_LIST; do | ||
modprobe $mod | ||
done | ||
;; | ||
esac |