Changeset View
Changeset View
Standalone View
Standalone View
files/0003-speed-up-shutdown-suspend.patch
- This file was added.
| From 8f24896d10e0283929e00e997050d5c5e329ef0b Mon Sep 17 00:00:00 2001 | |||||
| From: Thomas Koch <linrunner@gmx.net> | |||||
| Date: Fri, 13 Nov 2020 15:00:16 +0100 | |||||
| Subject: [PATCH] Speed up system shutdown/suspend | |||||
| Rationale: applying AC settings on shutdown and suspend | |||||
| costs 1-2 secs. In comparison, the time saved by the | |||||
| acceleration due to the AC settings is negligible. | |||||
| Measure: do not apply AC settings on shutdown and suspend. | |||||
| The old behaviour may be reinstated by configuring | |||||
| hidden parameters: | |||||
| X_TLP_SHUTDOWN_ACMODE=1 | |||||
| X_TLP_SUSPEND_ACMODE=1 | |||||
| --- | |||||
| diff --git a/tlp.in b/tlp.in | |||||
| index b8f38de..7905a5a 100644 | |||||
| --- a/tlp.in | |||||
| +++ b/tlp.in | |||||
| @@ -297,11 +297,13 @@ case "$_cmd" in | |||||
| # clear saved power state | |||||
| clear_saved_power_state | |||||
| - # apply ac settings for faster shutdown | |||||
| - echo -n "Applying power save settings..." | |||||
| - apply_common_settings 0 | |||||
| - poweroff_drivebay $pwrmode 0 | |||||
| - echo "done." | |||||
| + # DISABLED: apply ac settings | |||||
| + if [ "$X_TLP_SHUTDOWN_ACMODE" = "1" ]; then | |||||
| + echo -n "Applying power save settings..." | |||||
| + apply_common_settings 0 | |||||
| + poweroff_drivebay $pwrmode 0 | |||||
| + echo "done." | |||||
| + fi | |||||
| # disable usb autosuspend if configured | |||||
| if [ "$USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN" = "1" ]; then | |||||
| @@ -398,13 +400,16 @@ case "$_cmd" in | |||||
| suspend) # handle suspend/hibernate | |||||
| check_root | |||||
| - if lock_tlp; then | |||||
| - save_device_states "bluetooth wwan" | |||||
| + save_device_states "bluetooth wwan" | |||||
| + suspend_drivebay $pwrmode | |||||
| - apply_common_settings 0 | |||||
| - suspend_drivebay $pwrmode | |||||
| - save_runconf | |||||
| - unlock_tlp | |||||
| + # DISABLED: apply ac settings | |||||
| + if [ "$X_TLP_SUSPEND_ACMODE" = "1" ]; then | |||||
| + if lock_tlp; then | |||||
| + apply_common_settings 0 | |||||
| + save_runconf | |||||
| + unlock_tlp | |||||
| + fi | |||||
| fi | |||||
| ;; | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.