From 6c550338835784d91b83bd016036c5d75ad7fbf4 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Mon, 13 Aug 2018 23:05:57 +0200 Subject: [PATCH 1/5] lenovo/thinkpad/x260: Init --- lenovo/thinkpad/x260/default.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lenovo/thinkpad/x260/default.nix diff --git a/lenovo/thinkpad/x260/default.nix b/lenovo/thinkpad/x260/default.nix new file mode 100644 index 0000000..999a0cf --- /dev/null +++ b/lenovo/thinkpad/x260/default.nix @@ -0,0 +1,20 @@ +{ + imports = [ + ../. + ../acpi_call.nix + ../../../common/cpu/intel + ]; + + # See https://linrunner.de/en/tlp/docs/tlp-faq.html#battery https://wiki.archlinux.org/index.php/TLP#Btrfs + services.tlp.extraConfig = '' + START_CHARGE_THRESH_BAT0=75 + STOP_CHARGE_THRESH_BAT0=80 + START_CHARGE_THRESH_BAT1=75 + STOP_CHARGE_THRESH_BAT1=80 + + SATA_LINKPWR_ON_BAT=max_performance + + CPU_SCALING_GOVERNOR_ON_BAT=powersave + ENERGY_PERF_POLICY_ON_BAT=powersave + ''; +} From bdd79454eed9425dc0d922e1e70ecee673bddade Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Fri, 17 Aug 2018 18:07:48 +0200 Subject: [PATCH 2/5] default: Add Lenovo x260 --- default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/default.nix b/default.nix index 17612ce..cf01355 100644 --- a/default.nix +++ b/default.nix @@ -40,6 +40,7 @@ in lenovo-thinkpad-x220 = buildProfile ./lenovo/thinkpad/x220; lenovo-thinkpad-x230 = buildProfile ./lenovo/thinkpad/x230; lenovo-thinkpad-x250 = buildProfile ./lenovo/thinkpad/x250; + lenovo-thinkpad-x260 = buildProfile ./lenovo/thinkpad/x260; microsoft-surface-pro-3 = buildProfile ./microsoft/surface-pro/3; From 0400c7e1dd48bf4f763933bc1f7e1bfd97c54022 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Thu, 30 Aug 2018 14:59:11 +0200 Subject: [PATCH 3/5] README: Add Lenovo ThinkPad x260 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 20c7a60..f8f2f91 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ imports = [ | Lenovo ThinkPad X220 | `` | | Lenovo ThinkPad X230 | `` | | Lenovo ThinkPad X250 | `` | +| [Lenovo ThinkPad X260][] | `` | | Lenovo ThinkPad X270 | `` | | [Lenovo ThinkPad X1 (6th Gen)][] | ``| | [Microsoft Surface Pro 3][] | `` | @@ -56,6 +57,7 @@ imports = [ [Dell XPS 15 9550]: dell/xps/15-9550 [Inverse Path USB armory]: inversepath/usbarmory [Lenovo ThinkPad X1 (6th Gen)]: lenovo/thinkpad/x1/6th-gen +[Lenovo ThinkPad X260]: lenovo/thinkpad/x260 [Microsoft Surface Pro 3]: microsoft/surface-pro/3 [Raspberry Pi 2]: raspberry-pi/2 [Samsung Series 9 NP900X3C]: samsung/np900x3c From f37c5dfb9a96f0b6bab94bcc09df98056d6a664b Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Thu, 30 Aug 2018 15:01:35 +0200 Subject: [PATCH 4/5] lenovo/thinkpad/x260: Remove opinionated TLP config --- lenovo/thinkpad/x260/default.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lenovo/thinkpad/x260/default.nix b/lenovo/thinkpad/x260/default.nix index 999a0cf..f400d63 100644 --- a/lenovo/thinkpad/x260/default.nix +++ b/lenovo/thinkpad/x260/default.nix @@ -5,16 +5,8 @@ ../../../common/cpu/intel ]; - # See https://linrunner.de/en/tlp/docs/tlp-faq.html#battery https://wiki.archlinux.org/index.php/TLP#Btrfs + # https://wiki.archlinux.org/index.php/TLP#Btrfs services.tlp.extraConfig = '' - START_CHARGE_THRESH_BAT0=75 - STOP_CHARGE_THRESH_BAT0=80 - START_CHARGE_THRESH_BAT1=75 - STOP_CHARGE_THRESH_BAT1=80 - SATA_LINKPWR_ON_BAT=max_performance - - CPU_SCALING_GOVERNOR_ON_BAT=powersave - ENERGY_PERF_POLICY_ON_BAT=powersave ''; } From 6ed4feade232d6cbf55b62f42499d2a1e405c95a Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Sun, 2 Sep 2018 01:56:49 +0200 Subject: [PATCH 5/5] lenovo/thinkpad/x260: Use `med_power_with_dipm` in TLP --- lenovo/thinkpad/x260/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenovo/thinkpad/x260/default.nix b/lenovo/thinkpad/x260/default.nix index f400d63..46530ee 100644 --- a/lenovo/thinkpad/x260/default.nix +++ b/lenovo/thinkpad/x260/default.nix @@ -7,6 +7,6 @@ # https://wiki.archlinux.org/index.php/TLP#Btrfs services.tlp.extraConfig = '' - SATA_LINKPWR_ON_BAT=max_performance + SATA_LINKPWR_ON_BAT=med_power_with_dipm ''; }