From 86cbb3256bcf99cb2f287a62f1119c7604d27346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Fri, 19 Oct 2018 15:45:05 +0200 Subject: [PATCH 1/3] dell/xps/13-9370: init --- README.md | 2 ++ default.nix | 1 + dell/xps/13-9370/README.wiki | 16 ++++++++++++++++ dell/xps/13-9370/default.nix | 16 ++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 dell/xps/13-9370/README.wiki create mode 100644 dell/xps/13-9370/default.nix diff --git a/README.md b/README.md index 5bd0a15..f20bc64 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ imports = [ | [Apple MacBook Pro 10,1][] | `` | | Apple MacBook Pro 12,1 | `` | | BeagleBoard PocketBeagle | `` | +| [Dell XPS 13 9370][] | `` | | [Dell XPS 15 9550][] | `` | | [Inverse Path USB armory][] | `` | | Lenovo IdeaPad Z510 | `` | @@ -57,6 +58,7 @@ imports = [ [Acer Aspire 4810T]: acer/aspire/4810t [Apple MacBook Pro 10,1]: apple/macbook-pro/10-1 +[Dell XPS 13 9370]: dell/xps/13-9370 [Dell XPS 15 9550]: dell/xps/15-9550 [Inverse Path USB armory]: inversepath/usbarmory [Lenovo ThinkPad X1 (6th Gen)]: lenovo/thinkpad/x1/6th-gen diff --git a/default.nix b/default.nix index 9f1c7a2..097b8bc 100644 --- a/default.nix +++ b/default.nix @@ -31,6 +31,7 @@ in apple-macbook-pro-11-5 = buildProfile ./apple/macbook-pro/11-5; apple-macbook-pro-12-1 = buildProfile ./apple/macbook-pro/12-1; + dell-xps-13-9370 = buildProfile ./dell/xps/13-9370; dell-xps-15-9550 = buildProfile ./dell/xps/15-9550; lenovo-thinkpad-t410 = buildProfile ./lenovo/thinkpad/t410; diff --git a/dell/xps/13-9370/README.wiki b/dell/xps/13-9370/README.wiki new file mode 100644 index 0000000..57b5e08 --- /dev/null +++ b/dell/xps/13-9370/README.wiki @@ -0,0 +1,16 @@ += Dell XPS 13 9370 = + +== Battery drain when sleeping == + +The laptop uses the S2 sleep mode by default instead of S3, which leads to +draining a lot of battery during sleep. + +Though this is intentional by the manufacturer and might cause lockups when +forced I - @moredread - never had any issues with it. + +See https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370)#Power_Management +and https://bugzilla.kernel.org/show_bug.cgi?id=199689#c3 for reference + +== Additional resources == + +* Arch linux wiki: [https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370) Dell XPS 13 9370] diff --git a/dell/xps/13-9370/default.nix b/dell/xps/13-9370/default.nix new file mode 100644 index 0000000..06e339f --- /dev/null +++ b/dell/xps/13-9370/default.nix @@ -0,0 +1,16 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../../../common/cpu/intel/kaby-lake + ../../../common/pc/laptop + ../../../lenovo/thinkpad/acpi_call.nix + ../../../lenovo/thinkpad/cpu-throttling-bug.nix + ]; + + # Force S3 sleep mode. See README.wiki for details. + boot.kernelParams = [ "mem_sleep_default=deep" ]; + + # touchpad goes over i2c + boot.blacklistedKernelModules = [ "psmouse" ]; +} From d4a430fef28b584bfcf580a681cd63330a232241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Fri, 19 Oct 2018 15:46:09 +0200 Subject: [PATCH 2/3] CODEOWNERS: add moredread for Dell XPS 13 9370 --- CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/CODEOWNERS b/CODEOWNERS index f3c0e8f..563d516 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,4 +1,5 @@ beagleboard/pocketbeagle @yegortimoshenko +dell/xps/13-9370 @moredread lenovo/thinkpad/x230 @makefu @yegortimoshenko lenovo/thinkpad/x250 @Mic92 pcengines/apu @yegortimoshenko From 941fbef86f558b9a39e6d1460ba5a34ecd72ebd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Fri, 19 Oct 2018 17:52:25 +0200 Subject: [PATCH 3/3] move acpi_call.nix and cpu-throttling-bug.nix to common folder --- {lenovo/thinkpad => common/pc/laptop}/acpi_call.nix | 0 {lenovo/thinkpad => common/pc/laptop}/cpu-throttling-bug.nix | 0 dell/xps/13-9370/default.nix | 4 ++-- lenovo/thinkpad/t450s/default.nix | 2 +- lenovo/thinkpad/t480s/default.nix | 4 ++-- lenovo/thinkpad/x1/6th-gen/default.nix | 4 ++-- lenovo/thinkpad/x230/default.nix | 2 +- lenovo/thinkpad/x260/default.nix | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename {lenovo/thinkpad => common/pc/laptop}/acpi_call.nix (100%) rename {lenovo/thinkpad => common/pc/laptop}/cpu-throttling-bug.nix (100%) diff --git a/lenovo/thinkpad/acpi_call.nix b/common/pc/laptop/acpi_call.nix similarity index 100% rename from lenovo/thinkpad/acpi_call.nix rename to common/pc/laptop/acpi_call.nix diff --git a/lenovo/thinkpad/cpu-throttling-bug.nix b/common/pc/laptop/cpu-throttling-bug.nix similarity index 100% rename from lenovo/thinkpad/cpu-throttling-bug.nix rename to common/pc/laptop/cpu-throttling-bug.nix diff --git a/dell/xps/13-9370/default.nix b/dell/xps/13-9370/default.nix index 06e339f..cd53acd 100644 --- a/dell/xps/13-9370/default.nix +++ b/dell/xps/13-9370/default.nix @@ -4,8 +4,8 @@ imports = [ ../../../common/cpu/intel/kaby-lake ../../../common/pc/laptop - ../../../lenovo/thinkpad/acpi_call.nix - ../../../lenovo/thinkpad/cpu-throttling-bug.nix + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/cpu-throttling-bug.nix ]; # Force S3 sleep mode. See README.wiki for details. diff --git a/lenovo/thinkpad/t450s/default.nix b/lenovo/thinkpad/t450s/default.nix index 026332e..e623371 100644 --- a/lenovo/thinkpad/t450s/default.nix +++ b/lenovo/thinkpad/t450s/default.nix @@ -3,7 +3,7 @@ { imports = [ ../../../common/cpu/intel - ../acpi_call.nix + ../../../common/pc/laptop/acpi_call.nix ../. ]; } diff --git a/lenovo/thinkpad/t480s/default.nix b/lenovo/thinkpad/t480s/default.nix index 2f4b8a9..3e079d5 100644 --- a/lenovo/thinkpad/t480s/default.nix +++ b/lenovo/thinkpad/t480s/default.nix @@ -3,8 +3,8 @@ { imports = [ ../../../common/cpu/intel - ../acpi_call.nix - ../cpu-throttling-bug.nix + ../../../common/pc/laptop/acpi_call.nix + ../../../common/pc/laptop/cpu-throttling-bug.nix ../. ]; } diff --git a/lenovo/thinkpad/x1/6th-gen/default.nix b/lenovo/thinkpad/x1/6th-gen/default.nix index 4a10a23..9584bc7 100644 --- a/lenovo/thinkpad/x1/6th-gen/default.nix +++ b/lenovo/thinkpad/x1/6th-gen/default.nix @@ -7,8 +7,8 @@ { imports = [ ../. - ../../cpu-throttling-bug.nix - ../../acpi_call.nix + ../../../../common/pc/laptop/acpi_call.nix + ../../../../common/pc/laptop/cpu-throttling-bug.nix ]; # See https://linrunner.de/en/tlp/docs/tlp-faq.html#battery diff --git a/lenovo/thinkpad/x230/default.nix b/lenovo/thinkpad/x230/default.nix index 32e5c13..58b09f4 100644 --- a/lenovo/thinkpad/x230/default.nix +++ b/lenovo/thinkpad/x230/default.nix @@ -4,7 +4,7 @@ imports = [ ../. ../../../common/cpu/intel - ../acpi_call.nix + ../../../common/pc/laptop/acpi_call.nix ]; boot = { diff --git a/lenovo/thinkpad/x260/default.nix b/lenovo/thinkpad/x260/default.nix index 46530ee..d64a530 100644 --- a/lenovo/thinkpad/x260/default.nix +++ b/lenovo/thinkpad/x260/default.nix @@ -1,8 +1,8 @@ { imports = [ ../. - ../acpi_call.nix ../../../common/cpu/intel + ../../../common/pc/laptop/acpi_call.nix ]; # https://wiki.archlinux.org/index.php/TLP#Btrfs