diff options
author | Charles Strahan <charles.c.strahan@gmail.com> | 2015-10-15 14:25:43 -0400 |
---|---|---|
committer | Charles Strahan <charles.c.strahan@gmail.com> | 2015-10-15 14:27:09 -0400 |
commit | b1edc7909a116bf48ea95c41c6702941cf62a792 (patch) | |
tree | a7b7351e0185b4fae172aba7bc478be067a0fa72 /pkgs/os-specific/linux/powertop | |
parent | 194357ad2036ba723bf8bd66ad250dfb19384c4b (diff) | |
download | nixpkgs-b1edc7909a116bf48ea95c41c6702941cf62a792.tar nixpkgs-b1edc7909a116bf48ea95c41c6702941cf62a792.tar.gz nixpkgs-b1edc7909a116bf48ea95c41c6702941cf62a792.tar.bz2 nixpkgs-b1edc7909a116bf48ea95c41c6702941cf62a792.tar.lz nixpkgs-b1edc7909a116bf48ea95c41c6702941cf62a792.tar.xz nixpkgs-b1edc7909a116bf48ea95c41c6702941cf62a792.tar.zst nixpkgs-b1edc7909a116bf48ea95c41c6702941cf62a792.zip |
powertop: fix --auto-tune
See https://lists.01.org/pipermail/powertop/2014-December/001727.html
Diffstat (limited to 'pkgs/os-specific/linux/powertop')
-rw-r--r-- | pkgs/os-specific/linux/powertop/auto-tune.patch | 11 | ||||
-rw-r--r-- | pkgs/os-specific/linux/powertop/default.nix | 6 |
2 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/powertop/auto-tune.patch b/pkgs/os-specific/linux/powertop/auto-tune.patch new file mode 100644 index 00000000000..c9095336e8d --- /dev/null +++ b/pkgs/os-specific/linux/powertop/auto-tune.patch @@ -0,0 +1,11 @@ +diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp +index d2e56e3..4de5c9b 100644 +--- a/src/devices/devfreq.cpp ++++ b/src/devices/devfreq.cpp +@@ -247,6 +247,7 @@ void create_all_devfreq_devices(void) + fprintf(stderr, "Devfreq not enabled\n"); + is_enabled = false; + closedir(dir); ++ dir = NULL; + return; + } diff --git a/pkgs/os-specific/linux/powertop/default.nix b/pkgs/os-specific/linux/powertop/default.nix index 9e32cd70cfb..82ca746d6a4 100644 --- a/pkgs/os-specific/linux/powertop/default.nix +++ b/pkgs/os-specific/linux/powertop/default.nix @@ -10,7 +10,11 @@ stdenv.mkDerivation rec { buildInputs = [ gettext libnl ncurses pciutils pkgconfig zlib ]; - patchPhase = '' + # Fix --auto-tune bug: + # https://lists.01.org/pipermail/powertop/2014-December/001727.html + patches = [ ./auto-tune.patch ]; + + postPatch = '' substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe" ''; |