mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
powertop: fix --auto-tune
See https://lists.01.org/pipermail/powertop/2014-December/001727.html
This commit is contained in:
parent
194357ad20
commit
b1edc7909a
11
pkgs/os-specific/linux/powertop/auto-tune.patch
Normal file
11
pkgs/os-specific/linux/powertop/auto-tune.patch
Normal file
@ -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;
|
||||
}
|
@ -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"
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user