]>
Commit | Line | Data |
---|---|---|
f893c9f4 JR |
1 | --- /dev/null 2017-02-28 21:16:52.000000000 +0100 |
2 | +++ laptop-mode-tools-1.71/usr/share/laptop-mode-tools/modules/sata-alpm 2017-03-04 10:16:55.823426823 +0100 | |
3 | @@ -0,0 +1,26 @@ | |
4 | +#!/bin/sh | |
5 | +# | |
6 | +# SATA link power management | |
7 | + | |
8 | +if [ "$KLEVEL" = "2.6" -a "$KMINOR" -lt 33 ] ; then | |
9 | + log "VERBOSE" "Changing SATA link power management may cause filesystem corruption on kernels before 2.6.33. Disabling." | |
10 | + CONTROL_SATA_ALPM=0 | |
11 | +fi | |
12 | + | |
13 | +if [ x$CONTROL_SATA_ALPM = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_SATA_ALPM = xauto ]; then | |
14 | + if [ $ON_AC -eq 1 ] ; then | |
15 | + if [ "$ACTIVATE" -eq 1 ] ; then | |
16 | + SATA_LINK_POLICY="$LM_AC_SATA_LINK_POLICY" | |
17 | + else | |
18 | + SATA_LINK_POLICY="$NOLM_AC_SATA_LINK_POLICY" | |
19 | + fi | |
20 | + else | |
21 | + SATA_LINK_POLICY="$BATT_SATA_LINK_POLICY" | |
22 | + fi | |
23 | + for SATAHOST in /sys/class/scsi_host/host*; do | |
24 | + if [ -w "$SATAHOST/link_power_management_policy" ]; then | |
25 | + log "VERBOSE" "Setting SATA APLM on $SATAHOST to $SATA_LINK_POLICY." | |
26 | + echo "$SATA_LINK_POLICY" > "$SATAHOST/link_power_management_policy" | |
27 | + fi | |
28 | + done | |
29 | +fi | |
30 | --- /dev/null 2017-02-28 21:16:52.000000000 +0100 | |
31 | +++ laptop-mode-tools-1.71/etc/laptop-mode/conf.d/sata-alpm.conf 2017-03-04 10:16:16.082421957 +0100 | |
32 | @@ -0,0 +1,57 @@ | |
33 | +# | |
34 | +# Configuration file for Laptop Mode Tools module sata-alpm. | |
35 | +# | |
36 | +# For more information, consult the laptop-mode.conf(8) manual page. | |
37 | +# | |
38 | + | |
39 | +############################################################################### | |
40 | +# SATA link power management | |
41 | +# ------------------------------------ | |
42 | +# | |
43 | +#__COMMENT Laptop mode tools can automatically adjust SATA link power management policy | |
44 | +#__COMMENT setting. | |
45 | +#__COMMENT | |
46 | +#__COMMENT This hook tries to save power by allowing SATA controllers to | |
47 | +#__COMMENT reduce power usage when the SATA subsystem is otherwise idle. | |
48 | +#__COMMEN | |
49 | +#__COMMENT This adds a little bit of latency to drive accesses in | |
50 | +#__COMMENT exchange for moderate power savings if you are not using the drive. | |
51 | +#__COMMENT | |
52 | +#__COMMENT see kernel commit 6013efd8860bf15c1f86f365332642cfe557152f | |
53 | +#__COMMENT | |
54 | +#__COMMENT This feature only works on 2.6.33+ kernels. | |
55 | +############################################################################### | |
56 | + | |
57 | +# Enable debug mode for this module | |
58 | +# Set to 1 if you want to debug this module | |
59 | +DEBUG=0 | |
60 | + | |
61 | +# | |
62 | +# Should laptop mode tools control SATA link power settings? | |
63 | +# | |
64 | +# Set to 0 to disable | |
65 | +SATA_ALPM_FREQUENCY="auto" | |
66 | + | |
67 | + | |
68 | +# | |
69 | +# This parameter allows the user to set the link (interface) power management. | |
fcc317d0 | 70 | +# There are 4 possible options: |
f893c9f4 JR |
71 | +# |
72 | +# Value Effect | |
73 | +# ---------------------------------------------------------------------------- | |
fcc317d0 JR |
74 | +# firmware_defaults Inherit configuration from the state programmed by |
75 | +# the firmware during system init. | |
76 | +# | |
f893c9f4 JR |
77 | +# min_power Tell the controller to try to make the link use the |
78 | +# least possible power when possible. This may | |
79 | +# sacrifice some performance due to increased latency | |
80 | +# when coming out of lower power states. | |
81 | +# | |
82 | +# max_performance Generally, this means no power management. Tell | |
83 | +# the controller to have performance be a priority | |
84 | +# over power management. | |
85 | +# | |
86 | +# medium_power Tell the controller to enter a lower power state | |
87 | +# when possible, but do not enter the lowest power | |
88 | +# state, thus improving latency over min_power setting. | |
89 | +# | |
fcc317d0 | 90 | +BATT_SATA_LINK_POLICY=medium_power |
f893c9f4 JR |
91 | +LM_AC_SATA_LINK_POLICY=max_performance |
92 | +NOLM_AC_SATA_LINK_POLICY=max_performance | |
fcc317d0 JR |
93 | --- laptop-mode-tools-1.71/etc/laptop-mode/laptop-mode.conf~ 2017-01-12 09:06:23.000000000 +0100 |
94 | +++ laptop-mode-tools-1.71/etc/laptop-mode/laptop-mode.conf 2017-03-04 11:22:17.909951954 +0100 | |
95 | @@ -120,6 +120,7 @@ | |
96 | # nmi-watchdog | |
97 | # pcie-aspm | |
98 | # runtime-pm | |
99 | +# sata-alpm | |
100 | # sched-mc-power-savings | |
101 | # sched-smt-power-savings | |
102 | # terminal-blanking |