From fcc317d0bdbc5e6099e785fedd6cd6bfa724e7e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sat, 4 Mar 2017 11:54:01 +0100 Subject: [PATCH] - add support for SATA ALPM - rel 2 --- laptop-mode-tools.spec | 4 +++- sata-alpm.patch | 17 +++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/laptop-mode-tools.spec b/laptop-mode-tools.spec index 38626ae..19aaec8 100644 --- a/laptop-mode-tools.spec +++ b/laptop-mode-tools.spec @@ -18,7 +18,7 @@ Summary: Laptop Mode Tools Summary(pl.UTF-8): Narzędzia do trybu laptopowego Name: laptop-mode-tools Version: 1.71 -Release: 1 +Release: 2 License: GPL Group: Applications/System Source0: https://github.com/rickysarraf/laptop-mode-tools/archive/%{version}/%{name}-%{version}.tar.gz @@ -26,6 +26,7 @@ Source0: https://github.com/rickysarraf/laptop-mode-tools/archive/%{version}/%{n Source1: %{name}.init Patch0: no-exec-redirection.patch Patch1: cpufreq-pstate.patch +Patch2: sata-alpm.patch URL: https://github.com/rickysarraf/laptop-mode-tools BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.714 @@ -104,6 +105,7 @@ GUI dla narzędzi do trybu laptopowego. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %{__sed} -i -e 's|/usr/bin/env python2|/usr/bin/python|' gui/LMT.py diff --git a/sata-alpm.patch b/sata-alpm.patch index 4a58d1a..a101d9b 100644 --- a/sata-alpm.patch +++ b/sata-alpm.patch @@ -67,10 +67,13 @@ + +# +# This parameter allows the user to set the link (interface) power management. -+# There are 3 possible options: ++# There are 4 possible options: +# +# Value Effect +# ---------------------------------------------------------------------------- ++# firmware_defaults Inherit configuration from the state programmed by ++# the firmware during system init. ++# +# min_power Tell the controller to try to make the link use the +# least possible power when possible. This may +# sacrifice some performance due to increased latency @@ -84,6 +87,16 @@ +# when possible, but do not enter the lowest power +# state, thus improving latency over min_power setting. +# -+BATT_SATA_LINK_POLICY=min_power ++BATT_SATA_LINK_POLICY=medium_power +LM_AC_SATA_LINK_POLICY=max_performance +NOLM_AC_SATA_LINK_POLICY=max_performance +--- laptop-mode-tools-1.71/etc/laptop-mode/laptop-mode.conf~ 2017-01-12 09:06:23.000000000 +0100 ++++ laptop-mode-tools-1.71/etc/laptop-mode/laptop-mode.conf 2017-03-04 11:22:17.909951954 +0100 +@@ -120,6 +120,7 @@ + # nmi-watchdog + # pcie-aspm + # runtime-pm ++# sata-alpm + # sched-mc-power-savings + # sched-smt-power-savings + # terminal-blanking -- 2.44.0