mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Restore previouse power profile after the boost
This commit is contained in:
@@ -2,9 +2,14 @@
|
||||
|
||||
# Temporarily switch to performance power profile on resume
|
||||
# to avoid sluggishness while the system catches up, then
|
||||
# drop back to balanced after 10 seconds.
|
||||
# restore the previous profile after 10 seconds.
|
||||
|
||||
if [[ $1 == "pre" ]]; then
|
||||
powerprofilesctl get > /tmp/power-profile-before-sleep
|
||||
fi
|
||||
|
||||
if [[ $1 == "post" ]]; then
|
||||
previous=$(cat /tmp/power-profile-before-sleep 2>/dev/null || echo "balanced")
|
||||
powerprofilesctl set performance
|
||||
(sleep 10 && powerprofilesctl set balanced) &
|
||||
(sleep 10 && powerprofilesctl set "$previous") &
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user