diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3094c20 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/powertop-v2.9.tar.gz diff --git a/.powertop.metadata b/.powertop.metadata new file mode 100644 index 0000000..d7851c2 --- /dev/null +++ b/.powertop.metadata @@ -0,0 +1 @@ +0b49a0fe9fd8a1026faf731a959146ed93d83153 SOURCES/powertop-v2.9.tar.gz diff --git a/SOURCES/powertop-2.7-always-create-params.patch b/SOURCES/powertop-2.7-always-create-params.patch new file mode 100644 index 0000000..87ddf7d --- /dev/null +++ b/SOURCES/powertop-2.7-always-create-params.patch @@ -0,0 +1,35 @@ +diff --git a/src/parameters/persistent.cpp b/src/parameters/persistent.cpp +index 9a5688a..6a232cd 100644 +--- a/src/parameters/persistent.cpp ++++ b/src/parameters/persistent.cpp +@@ -145,9 +145,6 @@ void save_parameters(const char *filename) + + // printf("result size is %i, #parameters is %i \n", (int)past_results.size(), (int)all_parameters.parameters.size()); + +- if (!global_power_valid()) +- return; +- + pathname = get_param_directory(filename); + + file.open(pathname, ios::out); +@@ -156,12 +153,15 @@ void save_parameters(const char *filename) + return; + } + +- map::iterator it; ++ if (global_power_valid()) ++ { ++ map::iterator it; + +- for (it = param_index.begin(); it != param_index.end(); it++) { +- int index; +- index = it->second; +- file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n"; ++ for (it = param_index.begin(); it != param_index.end(); it++) { ++ int index; ++ index = it->second; ++ file << it->first << "\t" << setprecision(9) << all_parameters.parameters[index] << "\n"; ++ } + } + file.close(); + } diff --git a/SOURCES/powertop-2.9-cstates-rewrite-fix.patch b/SOURCES/powertop-2.9-cstates-rewrite-fix.patch new file mode 100644 index 0000000..3119bc8 --- /dev/null +++ b/SOURCES/powertop-2.9-cstates-rewrite-fix.patch @@ -0,0 +1,41 @@ +From f3f350f138912dc89abb37676f7e65fc6057ec53 Mon Sep 17 00:00:00 2001 +From: Gautam Paranjape +Date: Fri, 21 Jul 2017 07:02:13 -0700 +Subject: [PATCH] Some c-states exposed by the intel_idle driver are assigned + the same line_level, which means that the most recent one assigned can + overwrite another c-state. For example, the C1-SKL c-state is overwritten by + the C1E-SKL c-state because both have a "1" in the name and are assigned the + same line level. To fix this, check if a "sub c-state" (ex. C1E-SKL) is being + inserted. If so, check the vector of c-states if a c-state with similar name + (ex. C1-SKL) exists, and increment the line level. + +Signed-off-by: Gautam Paranjape +--- + src/cpu/abstract_cpu.cpp | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/cpu/abstract_cpu.cpp b/src/cpu/abstract_cpu.cpp +index bc32336..c59721c 100644 +--- a/src/cpu/abstract_cpu.cpp ++++ b/src/cpu/abstract_cpu.cpp +@@ -218,6 +218,17 @@ void abstract_cpu::insert_cstate(const char *linux_name, const char *human_name, + } + if (*c >= '0' && *c <='9') { + state->line_level = strtoull(c, NULL, 10); ++ if(*(c+1) != '-'){ ++ int greater_line_level = strtoull(c, NULL, 10); ++ for(unsigned int pos = 0; pos < cstates.size(); pos++){ ++ if(*c == cstates[pos]->human_name[1]){ ++ if(*(c+1) != cstates[pos]->human_name[2]){ ++ greater_line_level = max(greater_line_level, cstates[pos]->line_level); ++ state->line_level = greater_line_level + 1; ++ } ++ } ++ } ++ } + break; + } + c++; +-- +2.14.3 + diff --git a/SOURCES/powertop-2.9-intel-cnluy-support.patch b/SOURCES/powertop-2.9-intel-cnluy-support.patch new file mode 100644 index 0000000..7e3a3b4 --- /dev/null +++ b/SOURCES/powertop-2.9-intel-cnluy-support.patch @@ -0,0 +1,51 @@ +From 0d3a1cda2a95484fa41cc4c35294a4153b3a5e97 Mon Sep 17 00:00:00 2001 +From: Nivedita Swaminathan +Date: Wed, 31 Jan 2018 14:53:28 -0800 +Subject: [PATCH] Enable support for Intel CNL-U/Y + +This commit adds support for Intel CNL-U/Y platforms + +Signed-off-by: Nivedita Swaminathan +--- + src/cpu/intel_cpus.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp +index 4980516..4c7b315 100644 +--- a/src/cpu/intel_cpus.cpp ++++ b/src/cpu/intel_cpus.cpp +@@ -68,6 +68,7 @@ static int intel_cpu_models[] = { + 0x5E, /* SKY */ + 0x56, /* BDX-DE */ + 0x5c, /* BXT-P */ ++ 0x66, /* CNL-U/Y */ + 0x7A, /* GLK */ + 0x8E, /* KBL */ + 0x9E, /* KBL */ +@@ -166,6 +167,7 @@ nhm_core::nhm_core(int model) + case 0x5E: /* SKY */ + case 0x3D: /* BDW */ + case 0x5c: /* BXT-P */ ++ case 0x66: /* CNL-U/Y */ + case 0x7A: /* GLK */ + case 0x8E: /* KBL */ + case 0x9E: /* KBL */ +@@ -347,6 +349,7 @@ nhm_package::nhm_package(int model) + case 0x5E: /* SKY */ + case 0x3D: /* BDW */ + case 0x5c: /* BXT-P */ ++ case 0x66: /* CNL-U/Y */ + case 0x7A: /* GLK */ + case 0x8E: /* KBL */ + case 0x9E: /* KBL */ +@@ -380,6 +383,7 @@ nhm_package::nhm_package(int model) + case 0x4E: /* SKY */ + case 0x5E: /* SKY */ + case 0x5c: /* BXT-P */ ++ case 0x66: /* CNL-U/Y */ + case 0x7A: /* GLK */ + case 0x8E: /* KBL */ + case 0x9E: /* KBL */ +-- +2.14.3 + diff --git a/SOURCES/powertop-2.9-intel-cpu-check-aperf.patch b/SOURCES/powertop-2.9-intel-cpu-check-aperf.patch new file mode 100644 index 0000000..4793685 --- /dev/null +++ b/SOURCES/powertop-2.9-intel-cpu-check-aperf.patch @@ -0,0 +1,66 @@ +diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp +index f3711f5..019d922 100644 +--- a/src/cpu/cpu.cpp ++++ b/src/cpu/cpu.cpp +@@ -68,7 +68,7 @@ static class abstract_cpu * new_package(int package, int cpu, char * vendor, int + char packagename[128]; + if (strcmp(vendor, "GenuineIntel") == 0) + if (family == 6) +- if (is_supported_intel_cpu(model)) ++ if (is_supported_intel_cpu(model, cpu)) + ret = new class nhm_package(model); + + if (!ret) +@@ -105,7 +105,7 @@ static class abstract_cpu * new_core(int core, int cpu, char * vendor, int famil + + if (strcmp(vendor, "GenuineIntel") == 0) + if (family == 6) +- if (is_supported_intel_cpu(model)) ++ if (is_supported_intel_cpu(model, cpu)) + ret = new class nhm_core(model); + + if (!ret) +@@ -134,7 +134,7 @@ static class abstract_cpu * new_cpu(int number, char * vendor, int family, int m + + if (strcmp(vendor, "GenuineIntel") == 0) + if (family == 6) +- if (is_supported_intel_cpu(model)) ++ if (is_supported_intel_cpu(model, number)) + ret = new class nhm_cpu; + + if (!ret) +diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp +index 4c7b315..0030dba 100644 +--- a/src/cpu/intel_cpus.cpp ++++ b/src/cpu/intel_cpus.cpp +@@ -77,13 +77,15 @@ static int intel_cpu_models[] = { + + static int intel_pstate_driver_loaded = -1; + +-int is_supported_intel_cpu(int model) ++int is_supported_intel_cpu(int model, int cpu) + { + int i; ++ uint64_t msr; + + for (i = 0; intel_cpu_models[i] != 0; i++) + if (model == intel_cpu_models[i]) +- return 1; ++ if (cpu < 0 || read_msr(cpu, MSR_APERF, &msr) >= 0) ++ return 1; + + return 0; + } +diff --git a/src/cpu/intel_cpus.h b/src/cpu/intel_cpus.h +index d20db9a..79afb98 100644 +--- a/src/cpu/intel_cpus.h ++++ b/src/cpu/intel_cpus.h +@@ -172,7 +172,7 @@ public: + + }; + +-int is_supported_intel_cpu(int model); ++int is_supported_intel_cpu(int model, int cpu); + int byt_has_ahci(); + + int is_intel_pstate_driver_loaded(); diff --git a/SOURCES/powertop-2.9-intel-glk-support.patch b/SOURCES/powertop-2.9-intel-glk-support.patch new file mode 100644 index 0000000..fa086ab --- /dev/null +++ b/SOURCES/powertop-2.9-intel-glk-support.patch @@ -0,0 +1,51 @@ +From 523b15bd892f036bb6b777ad6c88f334f0980347 Mon Sep 17 00:00:00 2001 +From: Nivedita Swaminathan +Date: Wed, 31 Jan 2018 14:41:18 -0800 +Subject: [PATCH] Enable support for Intel GLK + +This commit enables support for Intel GLK platforms + +Signed-off-by: Nivedita Swaminathan +--- + src/cpu/intel_cpus.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp +index 3901342..4980516 100644 +--- a/src/cpu/intel_cpus.cpp ++++ b/src/cpu/intel_cpus.cpp +@@ -68,6 +68,7 @@ static int intel_cpu_models[] = { + 0x5E, /* SKY */ + 0x56, /* BDX-DE */ + 0x5c, /* BXT-P */ ++ 0x7A, /* GLK */ + 0x8E, /* KBL */ + 0x9E, /* KBL */ + 0 /* last entry must be zero */ +@@ -165,6 +166,7 @@ nhm_core::nhm_core(int model) + case 0x5E: /* SKY */ + case 0x3D: /* BDW */ + case 0x5c: /* BXT-P */ ++ case 0x7A: /* GLK */ + case 0x8E: /* KBL */ + case 0x9E: /* KBL */ + has_c7_res = 1; +@@ -345,6 +347,7 @@ nhm_package::nhm_package(int model) + case 0x5E: /* SKY */ + case 0x3D: /* BDW */ + case 0x5c: /* BXT-P */ ++ case 0x7A: /* GLK */ + case 0x8E: /* KBL */ + case 0x9E: /* KBL */ + has_c2c6_res=1; +@@ -377,6 +380,7 @@ nhm_package::nhm_package(int model) + case 0x4E: /* SKY */ + case 0x5E: /* SKY */ + case 0x5c: /* BXT-P */ ++ case 0x7A: /* GLK */ + case 0x8E: /* KBL */ + case 0x9E: /* KBL */ + has_c8c9c10_res = 1; +-- +2.14.3 + diff --git a/SOURCES/powertop-2.9-powertop-2.3-compat.patch b/SOURCES/powertop-2.9-powertop-2.3-compat.patch new file mode 100644 index 0000000..3742e4c --- /dev/null +++ b/SOURCES/powertop-2.9-powertop-2.3-compat.patch @@ -0,0 +1,552 @@ +From fa86b4030ae67b7a8445c831493bba551c6613e8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Fri, 4 May 2018 14:56:13 +0200 +Subject: [PATCH] RHEL-7 PowerTOP 2.3 compatibility patch +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jaroslav Škarvada +--- + doc/powertop.8 | 22 ++++-- + src/Makefile.am | 2 + + src/Makefile.in | 20 +++++ + src/main.cpp | 17 +++-- + src/report/report-formatter-plain.cpp | 133 ++++++++++++++++++++++++++++++++++ + src/report/report-formatter-plain.h | 54 ++++++++++++++ + src/report/report-maker.cpp | 3 + + src/report/report-maker.h | 5 +- + src/report/report.cpp | 53 ++++++++------ + 9 files changed, 275 insertions(+), 34 deletions(-) + create mode 100644 src/report/report-formatter-plain.cpp + create mode 100644 src/report/report-formatter-plain.h + +diff --git a/doc/powertop.8 b/doc/powertop.8 +index 60e3c73..c18344d 100644 +--- a/doc/powertop.8 ++++ b/doc/powertop.8 +@@ -23,12 +23,20 @@ can get more accurate estimates by using this option to enable a + calibration cycle. This will cycle through various display levels and + USB device activities and workloads. + .TP +-\fB\-C\fR, \fB\-\-csv\fR[=\fIfilename\fR] ++\fB\-C\fR[\fIfilename\fR], \fB\-\-csv\fR[=\fIfilename\fR] + Generate a CSV report. If a + .I filename + is not specified then the default name + .B powertop.csv +-is used. The CSV report can be used for reporting and data analysis. ++is used. If a ++.I filename ++is "\fB\-\fR" then STDOUT is used. The CSV report can ++be used for reporting and data analysis. ++.TP ++\fB\-d\fR[\fIfilename\fR], \fB\-\-dump\fR[=\fIfilename\fR] ++Generate a plain text report. If a ++.I filename ++is not specified or it is "\fB\-\fR" then STDOUT is used. + .TP + .B \-\-debug + Run in debug mode. +@@ -39,13 +47,15 @@ specify the serial device node of the serial to USB adaptor connecting to + the Extech Power Analyzer, for example + .IR /dev/ttyUSB0 . + .TP +-\fB\-r\fR, \fB\-\-html\fR[=\fIfilename\fR] ++\fB\-r\fR[\fIfilename\fR], \fB\-h\fR[\fIfilename\fR], \fB\-\-html\fR[=\fIfilename\fR] + Generate an HTML report. If a + .I filename + is not specified then the default name + .B powertop.html +-is used. The HTML report can be sent to others to help diagnose power +-issues. ++is used. If a ++.I filename ++is "\fB\-\fR" then STDOUT is used. The HTML report can be sent to others to help ++diagnose power issues. + .TP + \fB\-i\fR, \fB\-\-iteration\fR[=\fIiterations\fR] + Number of times to run each test. +@@ -65,7 +75,7 @@ file as a part of calibration before making a report. + .BR \-V ", " \-\-version + Print version information and exit. + .TP +-.BR \-h ", " \-\-help ++.BR \-u ", " \-\-help + Show the help message and exit. + .SH COMMANDS + In interactive mode, the following key bindings are available: +diff --git a/src/Makefile.am b/src/Makefile.am +index 8357bae..5882468 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -99,6 +99,8 @@ powertop_SOURCES = \ + report/report-formatter-csv.h \ + report/report-formatter-html.cpp \ + report/report-formatter-html.h \ ++ report/report-formatter-plain.cpp \ ++ eport/report-formatter-plain.h \ + report/report-formatter.h \ + report/report-maker.cpp \ + report/report-maker.h \ +diff --git a/src/Makefile.in b/src/Makefile.in +index 643b7ce..90ebdff 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -159,6 +159,7 @@ am_powertop_OBJECTS = powertop-devlist.$(OBJEXT) \ + report/powertop-report-formatter-base.$(OBJEXT) \ + report/powertop-report-formatter-csv.$(OBJEXT) \ + report/powertop-report-formatter-html.$(OBJEXT) \ ++ report/powertop-report-formatter-plain.$(OBJEXT) \ + report/powertop-report-maker.$(OBJEXT) \ + report/powertop-report.$(OBJEXT) \ + tuning/powertop-bluetooth.$(OBJEXT) \ +@@ -512,6 +513,8 @@ powertop_SOURCES = \ + report/report-formatter-csv.h \ + report/report-formatter-html.cpp \ + report/report-formatter-html.h \ ++ report/report-formatter-plain.cpp \ ++ report/report-formatter-plain.h \ + report/report-formatter.h \ + report/report-maker.cpp \ + report/report-maker.h \ +@@ -806,6 +809,8 @@ report/powertop-report-formatter-csv.$(OBJEXT): \ + report/$(am__dirstamp) report/$(DEPDIR)/$(am__dirstamp) + report/powertop-report-formatter-html.$(OBJEXT): \ + report/$(am__dirstamp) report/$(DEPDIR)/$(am__dirstamp) ++report/powertop-report-formatter-plain.$(OBJEXT): \ ++ report/$(am__dirstamp) report/$(DEPDIR)/$(am__dirstamp) + report/powertop-report-maker.$(OBJEXT): report/$(am__dirstamp) \ + report/$(DEPDIR)/$(am__dirstamp) + report/powertop-report.$(OBJEXT): report/$(am__dirstamp) \ +@@ -907,6 +912,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@report/$(DEPDIR)/powertop-report-formatter-base.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@report/$(DEPDIR)/powertop-report-formatter-csv.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@report/$(DEPDIR)/powertop-report-formatter-html.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@report/$(DEPDIR)/powertop-report-formatter-plain.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@report/$(DEPDIR)/powertop-report-maker.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@report/$(DEPDIR)/powertop-report.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@tuning/$(DEPDIR)/powertop-bluetooth.Po@am__quote@ +@@ -1675,6 +1681,20 @@ report/powertop-report-formatter-html.o: report/report-formatter-html.cpp + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(powertop_CPPFLAGS) $(CPPFLAGS) $(powertop_CXXFLAGS) $(CXXFLAGS) -c -o report/powertop-report-formatter-html.o `test -f 'report/report-formatter-html.cpp' || echo '$(srcdir)/'`report/report-formatter-html.cpp + ++report/powertop-report-formatter-plain.o: report/report-formatter-plain.cpp ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(powertop_CPPFLAGS) $(CPPFLAGS) $(powertop_CXXFLAGS) $(CXXFLAGS) -MT report/powertop-report-formatter-plain.o -MD -MP -MF report/$(DEPDIR)/powertop-report-formatter-plain.Tpo -c -o report/powertop-report-formatter-plain.o `test -f 'report/report-formatter-plain.cpp' || echo '$(srcdir)/'`report/report-formatter-plain.cpp ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) report/$(DEPDIR)/powertop-report-formatter-plain.Tpo report/$(DEPDIR)/powertop-report-formatter-plain.Po ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='report/report-formatter-plain.cpp' object='report/powertop-report-formatter-plain.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(powertop_CPPFLAGS) $(CPPFLAGS) $(powertop_CXXFLAGS) $(CXXFLAGS) -c -o report/powertop-report-formatter-plain.o `test -f 'report/report-formatter-plain.cpp' || echo '$(srcdir)/'`report/report-formatter-plain.cpp ++ ++report/powertop-report-formatter-plain.obj: report/report-formatter-plain.cpp ++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(powertop_CPPFLAGS) $(CPPFLAGS) $(powertop_CXXFLAGS) $(CXXFLAGS) -MT report/powertop-report-formatter-plain.obj -MD -MP -MF report/$(DEPDIR)/powertop-report-formatter-plain.Tpo -c -o report/powertop-report-formatter-plain.obj `if test -f 'report/report-formatter-plain.cpp'; then $(CYGPATH_W) 'report/report-formatter-plain.cpp'; else $(CYGPATH_W) '$(srcdir)/report/report-formatter-plain.cpp'; fi` ++@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) report/$(DEPDIR)/powertop-report-formatter-plain.Tpo report/$(DEPDIR)/powertop-report-formatter-plain.Po ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='report/report-formatter-palin.cpp' object='report/powertop-report-formatter-plain.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(powertop_CPPFLAGS) $(CPPFLAGS) $(powertop_CXXFLAGS) $(CXXFLAGS) -c -o report/powertop-report-formatter-plain.obj `if test -f 'report/report-formatter-plain.cpp'; then $(CYGPATH_W) 'report/report-formatter-plain.cpp'; else $(CYGPATH_W) '$(srcdir)/report/report-formatter-plain.cpp'; fi` ++ + report/powertop-report-formatter-html.obj: report/report-formatter-html.cpp + @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(powertop_CPPFLAGS) $(CPPFLAGS) $(powertop_CXXFLAGS) $(CXXFLAGS) -MT report/powertop-report-formatter-html.obj -MD -MP -MF report/$(DEPDIR)/powertop-report-formatter-html.Tpo -c -o report/powertop-report-formatter-html.obj `if test -f 'report/report-formatter-html.cpp'; then $(CYGPATH_W) 'report/report-formatter-html.cpp'; else $(CYGPATH_W) '$(srcdir)/report/report-formatter-html.cpp'; fi` + @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) report/$(DEPDIR)/powertop-report-formatter-html.Tpo report/$(DEPDIR)/powertop-report-formatter-html.Po +diff --git a/src/main.cpp b/src/main.cpp +index 7467f0f..769d593 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -84,6 +84,7 @@ static const struct option long_options[] = + {"auto-tune", no_argument, NULL, OPT_AUTO_TUNE}, + {"calibrate", no_argument, NULL, 'c'}, + {"csv", optional_argument, NULL, 'C'}, ++ {"dump", optional_argument, NULL, 'd'}, + {"debug", no_argument, &debug_learning, OPT_DEBUG}, + {"extech", optional_argument, NULL, OPT_EXTECH}, + {"html", optional_argument, NULL, 'r'}, +@@ -93,7 +94,7 @@ static const struct option long_options[] = + {"time", optional_argument, NULL, 't'}, + {"workload", optional_argument, NULL, 'w'}, + {"version", no_argument, NULL, 'V'}, +- {"help", no_argument, NULL, 'h'}, ++ {"help", no_argument, NULL, 'u'}, + {NULL, 0, NULL, 0} + }; + +@@ -122,16 +123,17 @@ static void print_usage() + printf(" --auto-tune\t %s\n", _("sets all tunable options to their GOOD setting")); + printf(" -c, --calibrate\t %s\n", _("runs powertop in calibration mode")); + printf(" -C, --csv%s\t %s\n", _("[=filename]"), _("generate a csv report")); ++ printf(" -d, --dump%s\t %s\n", _("[=filename]"), _("generate plain text report")); + printf(" --debug\t\t %s\n", _("run in \"debug\" mode")); + printf(" --extech%s\t %s\n", _("[=devnode]"), _("uses an Extech Power Analyzer for measurements")); +- printf(" -r, --html%s\t %s\n", _("[=filename]"), _("generate a html report")); ++ printf(" -r, -h, --html%s\t %s\n", _("[=filename]"), _("generate a html report")); + printf(" -i, --iteration%s\n", _("[=iterations] number of times to run each test")); + printf(" -q, --quiet\t\t %s\n", _("suppress stderr output")); + printf(" -s, --sample%s\t %s\n", _("[=seconds]"), _("interval for power consumption measurement")); + printf(" -t, --time%s\t %s\n", _("[=seconds]"), _("generate a report for 'x' seconds")); + printf(" -w, --workload%s %s\n", _("[=workload]"), _("file to execute for workload")); + printf(" -V, --version\t\t %s\n", _("print version information")); +- printf(" -h, --help\t\t %s\n", _("print this help menu")); ++ printf(" -u, --help\t\t %s\n", _("print this help menu")); + printf("\n"); + printf("%s\n\n", _("For more help please refer to the 'man 8 powertop'")); + } +@@ -441,7 +443,7 @@ int main(int argc, char **argv) + #endif + ui_notify_user = ui_notify_user_ncurses; + while (1) { /* parse commandline options */ +- c = getopt_long(argc, argv, "cC:r:i:qt:w:Vh", long_options, &option_index); ++ c = getopt_long(argc, argv, "cC::d::r::i:qt:w:uVh::", long_options, &option_index); + /* Detect the end of the options. */ + if (c == -1) + break; +@@ -471,6 +473,7 @@ int main(int argc, char **argv) + checkroot(); + extech_power_meter(optarg ? optarg : "/dev/ttyUSB0"); + break; ++ case 'h': + case 'r': /* html report */ + reporttype = REPORT_HTML; + snprintf(filename, sizeof(filename), "%s", optarg ? optarg : "powertop.html"); +@@ -480,6 +483,10 @@ int main(int argc, char **argv) + exit(1); + } + break; ++ case 'd': /* plain text report (dump) */ ++ reporttype = REPORT_PLAIN; ++ snprintf(filename, sizeof(filename), "%s", optarg ? optarg : "-"); ++ break; + case 'i': + iterations = (optarg ? atoi(optarg) : 1); + break; +@@ -500,7 +507,7 @@ int main(int argc, char **argv) + print_version(); + exit(0); + break; +- case 'h': ++ case 'u': + print_usage(); + exit(0); + break; +diff --git a/src/report/report-formatter-plain.cpp b/src/report/report-formatter-plain.cpp +new file mode 100644 +index 0000000..9a0d636 +--- /dev/null ++++ b/src/report/report-formatter-plain.cpp +@@ -0,0 +1,133 @@ ++/* Copyright (c) 2016-2018 Jaroslav Škarvada ++ * Based on CSV formatter code by Igor Zhbanov ++ * ++ * This file is part of PowerTOP ++ * ++ * This program file is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program in a file named COPYING; if not, write to the ++ * Free Software Foundation, Inc, ++ * 51 Franklin Street, Fifth Floor, ++ * Boston, MA 02110-1301 USA ++ * or just google for it. ++ */ ++ ++#define _BSD_SOURCE ++ ++/* Uncomment to disable asserts */ ++/*#define NDEBUG*/ ++ ++#include ++#include ++#include ++ ++#include "report-formatter-plain.h" ++#include "report-data-html.h" ++ ++/* ************************************************************************ */ ++report_formatter_plain::report_formatter_plain() ++{ ++ /* Do nothing special */ ++} ++ ++/* ************************************************************************ */ ++void report_formatter_plain::finish_report() ++{ ++ /* Do nothing special */ ++} ++ ++string report_formatter_plain::escape_string(const char *str) ++{ ++ assert(str); ++ return string(str); ++} ++ ++/* Report Style */ ++void report_formatter_plain::add_header() ++{ ++} ++ ++void ++report_formatter_plain::end_header() ++{ ++ /* Do nothing */ ++} ++ ++void ++report_formatter_plain::add_logo() ++{ ++ add_exact("===PowerTOP Report===\n"); ++} ++ ++ ++void ++report_formatter_plain::add_div(struct tag_attr * div_attr) ++{ ++ add_exact("\n"); ++} ++ ++void ++report_formatter_plain::end_div() ++{ ++ /*Do nothing*/ ++} ++ ++void ++report_formatter_plain::add_title(struct tag_attr *title_att, const char *title) ++{ ++ addf_exact("==%s==\n", title); ++} ++ ++void ++report_formatter_plain::add_navigation() ++{ ++ /* No nav in plain - thinking on table of contents */ ++} ++ ++void ++report_formatter_plain::add_summary_list(string *list, int size) ++{ ++ int i; ++ add_exact("\n"); ++ for (i=0; i < size; i+=2){ ++ addf_exact("%s %s", list[i].c_str(), list[i+1].c_str()); ++ if(i < (size - 1)) ++ add_exact(" "); ++ } ++ add_exact("\n"); ++} ++ ++void ++report_formatter_plain::add_table(string *system_data, struct table_attributes* tb_attr) ++{ ++ int i, j; ++ int offset=0; ++ string tmp_str=""; ++ int empty_row=0; ++ add_exact("\n"); ++ for (i=0; i < tb_attr->rows; i++){ ++ for (j=0; j < tb_attr->cols; j++){ ++ offset = i * (tb_attr->cols) + j; ++ tmp_str=system_data[offset]; ++ ++ if(tmp_str == " ") ++ empty_row+=1; ++ else{ ++ addf_exact("%s", system_data[offset].c_str()); ++ if(j < (tb_attr->cols - 1)) ++ add_exact(" "); ++ } ++ } ++ if(empty_row < tb_attr->cols) ++ add_exact("\n"); ++ empty_row=0; ++ } ++} +diff --git a/src/report/report-formatter-plain.h b/src/report/report-formatter-plain.h +new file mode 100644 +index 0000000..276b5ac +--- /dev/null ++++ b/src/report/report-formatter-plain.h +@@ -0,0 +1,54 @@ ++/* Copyright (c) 2016-2018 Jaroslav Škarvada ++ * Based on CSV formatter code by Igor Zhbanov ++ * ++ * This file is part of PowerTOP ++ * ++ * This program file is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program in a file named COPYING; if not, write to the ++ * Free Software Foundation, Inc, ++ * 51 Franklin Street, Fifth Floor, ++ * Boston, MA 02110-1301 USA ++ * or just google for it. ++ */ ++ ++#ifndef _REPORT_FORMATTER_PLAIN_H_ ++#define _REPORT_FORMATTER_PLAIN_H_ ++ ++#include ++ ++#include "report-formatter-base.h" ++ ++class report_formatter_plain: public report_formatter_string_base ++{ ++public: ++ report_formatter_plain(); ++ void finish_report(); ++ ++ /* Report Style */ ++ void add_logo(); ++ void add_header(); ++ void end_header(); ++ void add_div(struct tag_attr *div_attr); ++ void end_div(); ++ void add_title(struct tag_attr *title_att, const char *title); ++ void add_navigation(); ++ void add_summary_list(string *list, int size); ++ void add_table(string *system_data, struct table_attributes *tb_attr); ++ ++private: ++ void add_quotes(); ++ string escape_string(const char *str); ++ bool csv_need_quotes; ++ size_t text_start; ++}; ++ ++#endif /* _REPORT_FORMATTER_PLAIN_H_ */ +diff --git a/src/report/report-maker.cpp b/src/report/report-maker.cpp +index 4049a54..4d0932a 100644 +--- a/src/report/report-maker.cpp ++++ b/src/report/report-maker.cpp +@@ -32,6 +32,7 @@ + #include "report-maker.h" + #include "report-formatter-csv.h" + #include "report-formatter-html.h" ++#include "report-formatter-plain.h" + + /* ************************************************************************ */ + +@@ -103,6 +104,8 @@ report_maker::setup_report_formatter() + formatter = new report_formatter_html(); + else if (type == REPORT_CSV) + formatter = new report_formatter_csv(); ++ else if (type == REPORT_PLAIN) ++ formatter = new report_formatter_plain(); + else if (type == REPORT_OFF) + formatter = new report_formatter(); + else +diff --git a/src/report/report-maker.h b/src/report/report-maker.h +index bda4cef..08d2a6d 100644 +--- a/src/report/report-maker.h ++++ b/src/report/report-maker.h +@@ -65,7 +65,7 @@ using namespace std; + /* Conditional gettext. We need original strings for CSV. */ + #ifdef ENABLE_NLS + #define __(STRING) \ +- ((report.get_type() == REPORT_CSV) ? (STRING) : gettext(STRING)) ++ ((report.get_type() == REPORT_CSV || report.get_type() == REPORT_PLAIN) ? (STRING) : gettext(STRING)) + #else + #define __(STRING) (STRING) + #endif +@@ -79,7 +79,8 @@ using namespace std; + enum report_type { + REPORT_OFF, + REPORT_HTML, +- REPORT_CSV ++ REPORT_CSV, ++ REPORT_PLAIN + }; + + /* ************************************************************************ */ +diff --git a/src/report/report.cpp b/src/report/report.cpp +index f0f31ee..5fa9051 100644 +--- a/src/report/report.cpp ++++ b/src/report/report.cpp +@@ -172,30 +172,37 @@ void init_report_output(char *filename_str, int iterations) + string filename; + time_t stamp; + char datestr[200]; ++ int len; + +- if (iterations == 1) +- snprintf(reportout.filename, sizeof(reportout.filename), "%s", filename_str); ++ len = strlen(filename_str); ++ if (!len || (len == 1 && filename_str[0] == '-')) ++ reportout.report_file = stdout; + else + { +- filename = string(filename_str); +- period = filename.find_last_of("."); +- if (period > filename.length()) +- period = filename.length(); +- memset(&datestr, 0, 200); +- memset(&stamp, 0, sizeof(time_t)); +- stamp = time(NULL); +- strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M%S", localtime(&stamp)); +- snprintf(reportout.filename, sizeof(reportout.filename), "%s-%s%s", +- filename.substr(0, period).c_str(), datestr, +- filename.substr(period).c_str()); +- } ++ if (iterations == 1) ++ snprintf(reportout.filename, sizeof(reportout.filename), "%s", filename_str); ++ else ++ { ++ filename = string(filename_str); ++ period = filename.find_last_of("."); ++ if (period > filename.length()) ++ period = filename.length(); ++ memset(&datestr, 0, 200); ++ memset(&stamp, 0, sizeof(time_t)); ++ stamp = time(NULL); ++ strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M%S", localtime(&stamp)); ++ snprintf(reportout.filename, sizeof(reportout.filename), "%s-%s%s", ++ filename.substr(0, period).c_str(), datestr, ++ filename.substr(period).c_str()); ++ } + +- reportout.report_file = fopen(reportout.filename, "wm"); +- if (!reportout.report_file) { +- fprintf(stderr, _("Cannot open output file %s (%s)\n"), +- reportout.filename, strerror(errno)); ++ reportout.report_file = fopen(reportout.filename, "wm"); ++ if (!reportout.report_file) { ++ fprintf(stderr, _("Cannot open output file %s (%s)\n"), ++ reportout.filename, strerror(errno)); ++ } + } +- ++ + report.set_type(reporttype); + system_info(); + } +@@ -208,10 +215,14 @@ void finish_report_output(void) + report.finish_report(); + if (reportout.report_file) + { +- fprintf(stderr, _("PowerTOP outputing using base filename %s\n"), reportout.filename); ++ if (reportout.report_file == stdout) ++ fprintf(stderr, _("PowerTOP outputing using standard output\n")); ++ else ++ fprintf(stderr, _("PowerTOP outputing using base filename %s\n"), reportout.filename); + fputs(report.get_result(), reportout.report_file); + fdatasync(fileno(reportout.report_file)); +- fclose(reportout.report_file); ++ if (reportout.report_file != stdout) ++ fclose(reportout.report_file); + } + report.clear_result(); + } +-- +2.14.3 + diff --git a/SOURCES/powertop.service b/SOURCES/powertop.service new file mode 100644 index 0000000..96669ae --- /dev/null +++ b/SOURCES/powertop.service @@ -0,0 +1,9 @@ +[Unit] +Description=PowerTOP autotuner + +[Service] +Type=oneshot +ExecStart=/usr/sbin/powertop --auto-tune + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/powertop.spec b/SPECS/powertop.spec new file mode 100644 index 0000000..ba46a5b --- /dev/null +++ b/SPECS/powertop.spec @@ -0,0 +1,323 @@ +Name: powertop +Version: 2.9 +Release: 1%{?dist} +Summary: Power consumption monitor + +Group: Applications/System +License: GPLv2 +URL: http://01.org/powertop/ +Source0: http://01.org/sites/default/files/downloads/powertop/%{name}-v%{version}.tar.gz +Source1: powertop.service + +# Sent upstream +Patch0: powertop-2.7-always-create-params.patch +Patch1: powertop-2.9-cstates-rewrite-fix.patch +Patch2: powertop-2.9-intel-glk-support.patch +Patch3: powertop-2.9-intel-cnluy-support.patch +Patch4: powertop-2.9-intel-cpu-check-aperf.patch +Patch5: powertop-2.9-powertop-2.3-compat.patch +BuildRequires: gettext-devel, ncurses-devel, pciutils-devel, zlib-devel, libnl3-devel +BuildRequires: systemd +BuildRequires: gcc, gcc-c++ +Requires(post): systemd, coreutils +Requires(preun): systemd +Requires(postun): systemd +Provides: bundled(kernel-event-lib) + +%description +PowerTOP is a tool that finds the software component(s) that make your +computer use more power than necessary while it is idle. + +%prep +%setup -q -n %{name}-v%{version} +%patch0 -p1 -b .always-create-params +# https://github.com/fenrus75/powertop/commit/f3f350f138912dc89abb37676f7e65fc6057ec53 +%patch1 -p1 -b .cstates-rewrite-fix +# https://github.com/fenrus75/powertop/commit/523b15bd892f036bb6b777ad6c88f334f0980347 +%patch2 -p1 -b .intel-glk-support +# https://github.com/fenrus75/powertop/commit/0d3a1cda2a95484fa41cc4c35294a4153b3a5e97 +%patch3 -p1 -b .intel-cnluy-support +# sent upstream +%patch4 -p1 -b .intel-cpu-check-aperf +# compatibility patch keeping consistent behavior with powertop-2.3 +%patch5 -p1 -b .powertop-2.3-compat + +%build +%configure +make %{?_smp_mflags} CFLAGS="%{optflags}" + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} +install -Dd %{buildroot}%{_localstatedir}/cache/powertop +touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop} +%find_lang %{name} + +# Systemd +install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/powertop.service + +%preun +%systemd_preun powertop.service + +%postun +%systemd_postun_with_restart powertop.service + +%post +%systemd_post powertop.service +# Hack for powertop not to show warnings on first start +touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop} &> /dev/null || : + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc COPYING README TODO +%dir %{_localstatedir}/cache/powertop +%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop +%ghost %{_localstatedir}/cache/powertop/saved_results.powertop +%{_sbindir}/powertop +%{_mandir}/man8/powertop.8* +%{_unitdir}/powertop.service + +%changelog +* Fri May 4 2018 Jaroslav Škarvada - 2.9-1 +- New version + Resolves: rhbz#1515645 +- Added support for Intel CNL-U/Y + Resolves: rhbz#1464918 + +* Tue Mar 21 2017 Jaroslav Škarvada - 2.3-12 +- Fixed auto-tuning + Resolves: rhbz#1392438 + +* Mon Jul 4 2016 Jaroslav Škarvada - 2.3-11 +- Added missing short options to manual page + Related: rhbz#1333495 + +* Wed May 11 2016 Jaroslav Škarvada - 2.3-10 +- Reintroduced -d, --dump option and added plain report mode, + fixed parameters and manual page + Resolves: rhbz#1333495 + +* Mon May 11 2015 Jaroslav Škarvada - 2.3-9 +- MSR read errors are no more fatal (by msr-check patch) + Resolves: rhbz#1102088 +- Backported --auto-tune feature and added one-shot systemd service + (by auto-tune patch) + Resolves: rhbz#1143014 +- Improved handling of reporting filenames (by improve-reporting patch) + Resolves: rhbz#1039822 + +* Tue Mar 25 2014 Jaroslav Škarvada - 2.3-8 +- Fixed buffer overflow in cpufreq tunables on systems with many CPUs + (by tunable-overflow-fix patch) + Resolves: rhbz#1080191 + +* Fri Jan 24 2014 Daniel Mach - 2.3-7 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 2.3-6 +- Mass rebuild 2013-12-27 + +* Tue Oct 29 2013 Jaroslav Škarvada - 2.3-5 +- Fixed some possible unregistered parameters errors + (by reg-net-param patch) + Resolves: rhbz#1014662 +- Unlimit FDs (by unlimit-fds patch) + Printed friendly error message if the system is running out + of FDs (by fd-limit-err patch) + Resolves: rhbz#1017668 + +* Fri Jun 28 2013 Jaroslav Škarvada - 2.3-4 +- Added check if ondemand governor is applicable (by ondemand-check patch) + Resolves: rhbz#697273 + +* Tue Jun 25 2013 Jaroslav Škarvada - 2.3-3 +- Added workload option to the man page + +* Wed Apr 10 2013 Jaroslav Škarvada - 2.3-2 +- Added post requirements for coreutils + +* Wed Mar 20 2013 Jaroslav Škarvada - 2.3-1 +- New version + Resolves: rhbz#923729 +- Dropped fix-crash-on-readonly-fs, reduce-syscalls, + gpu-wiggle-fix patches (upstreamed) +- Dropped version-fix patch (not needed) + +* Thu Feb 14 2013 Fedora Release Engineering - 2.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jan 20 2013 Dan Horák - 2.2-6 +- rebuilt again for fixed soname in libnl3 + +* Sun Jan 20 2013 Kalev Lember - 2.2-5 +- Rebuilt for libnl3 + +* Mon Jan 14 2013 Jaroslav Škarvada - 2.2-4 +- Reduced number of useless syscalls (reduce-syscalls patch) and + fixed gpu wiggle (gpu-wiggle-fix patch) + Resolves: rhbz#886185 + +* Sun Dec 2 2012 Jaroslav Škarvada - 2.2-3 +- Updated version to show 2.2 (by version-fix patch) + +* Wed Nov 28 2012 Jaroslav Škarvada - 2.2-2 +- Fixed crash when writing report on readonly filesystem + (fix-crash-on-readonly-fs patch) + +* Fri Nov 23 2012 Jaroslav Škarvada - 2.2-1 +- New version + Resolves: rhbz#877373 +- Dropped html-escape patch (not needed) + +* Thu Aug 16 2012 Jaroslav Škarvada - 2.1-2 +- Removed left over object files + +* Thu Aug 16 2012 Jaroslav Škarvada - 2.1-1 +- New version +- Removed patches (all upstreamed): show-watts-only-if-discharging, + valid-html-output, factor-out-powertop-init, catch-fstream-errors + +* Sat Jul 21 2012 Fedora Release Engineering - 2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Jul 4 2012 Jaroslav Škarvada - 2.0-3 +- Catch fstream exceptions + Resolves: rhbz#832497 + +* Mon May 21 2012 Jaroslav Škarvada - 2.0-2 +- Fixed segfault during calibration + Resolves: rhbz#823502 +- Used macro optflags instead of variable RPM_OPT_FLAGS + +* Wed May 16 2012 Jaroslav Škarvada - 2.0-1 +- New version + Resolves: rhbz#821144 +- Dropped patches: unknown-readings-fix (upstreamed), compile-fix (upstreamed), + power-supply-add-power-now-support (upstreamed), + html-print-commands (upstreamed), add-power-supply-class-support (obsoleted), + power-supply-units-fix (obsoleted) +- Updated patches: show-watts-only-if-discharging patch (sent upstream), + html-escape patch +- Added patch: valid-html-output (sent upstream) + +* Tue Apr 17 2012 Jaroslav Škarvada - 1.98-9 +- Show power consumption only if discharging + Resolves: rhbz#811949 + +* Tue Apr 03 2012 Jan Kaluza - 1.98-8 +- Escape scripts in HTML output + +* Mon Mar 26 2012 Jaroslav Škarvada - 1.98-7 +- Print commands which reproduce the tunings into html log (html-print-commands patch) + +* Wed Mar 7 2012 Jaroslav Škarvada - 1.98-6 +- Fixed power_supply units + Resolves: rhbz#800814 + +* Tue Feb 28 2012 Fedora Release Engineering - 1.98-5 +- Rebuilt for c++ ABI breakage + +* Fri Feb 24 2012 Jaroslav Škarvada - 1.98-4 +- Backported support for power_supply class + (add-power-supply-class-support patch) +- Added support for POWER_NOW readings + (power-supply-add-power-now-support patch) + Resolves: rhbz#796068 + +* Tue Jan 10 2012 Jaroslav Škarvada - 1.98-3 +- Fixed 'unknown' readings from ACPI meters + Resolves: rhbz#770289 +- Fixed compilation on f17 + +* Fri Dec 2 2011 Jaroslav Škarvada - 1.98-2 +- Always create params file + Resolves: rhbz#698020 +- Added cache files + +* Wed May 25 2011 Jaroslav Škarvada - 1.98-1 +- New version + +* Wed Mar 23 2011 Dan Horák - 1.97-2 +- csstoh should return 0 + +* Tue Feb 15 2011 Jaroslav Škarvada - 1.97-1 +- New version + +* Wed Feb 09 2011 Fedora Release Engineering - 1.13-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Nov 24 2010 Jaroslav Škarvada - 1.13-2 +- Fixed sigwinch handling (#644800) +- Readded strncpy patch as strncpy is safer than strcpy +- Print all P-states in dump mode +- Added explicit requires for pcituils (#653560) +- Output error in interactive mode if there is no tty (#657212) +- Do not suggest ondemand when p4-clockmod scaling driver is used (#497167) +- Fixed rpmlint warning about mixed tabs and spaces + +* Wed Aug 25 2010 Adam Jackson 1.13-1 +- powertop 1.13 + +* Sun Jul 26 2009 Fedora Release Engineering - 1.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 1.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jan 06 2009 Adam Jackson 1.11-1 +- powertop 1.11 + +* Thu Nov 20 2008 Adam Jackson +- Spec only change, fix URL. + +* Thu Nov 6 2008 Josh Boyer - 1.10-1 +- Update to latest release +- Drop upstreamed patch + +* Wed May 21 2008 Tom "spot" Callaway - 1.9-4 +- fix license tag + +* Mon Feb 18 2008 Fedora Release Engineering - 1.9-3 +- Autorebuild for GCC 4.3 + +* Tue Jan 22 2008 Adam Jackson 1.9-2 +- Use full path when invoking hciconfig. (Ville Skyttä, #426721) + +* Mon Dec 10 2007 Josh Boyer 1.9-1 +- Update to latest release + +* Mon Aug 20 2007 Josh Boyer 1.8-1 +- Update to latest release + +* Mon Jul 23 2007 Bill Nottingham 1.7-4 +- add patch to allow dumping output to stdout + +* Mon Jul 09 2007 Adam Jackson 1.7-3 +- powertop-1.7-strncpy.patch: Use strncpy() to avoid stack smash. Patch from + Till Maas. (#246796) + +* Thu Jul 05 2007 Adam Jackson 1.7-2 +- Don't suggest disabling g-p-m. Any additional power consumption is more + than offset by the ability to suspend. + +* Mon Jun 18 2007 Adam Jackson 1.7-1 +- powertop 1.7. + +* Mon Jun 11 2007 Adam Jackson 1.6-1 +- powertop 1.6. + +* Tue May 29 2007 Adam Jackson 1.5-1 +- powertop 1.5. + +* Mon May 21 2007 Adam Jackson 1.3-1 +- powertop 1.3. + +* Tue May 15 2007 Adam Jackson 1.2-1 +- powertop 1.2. Fixes power reports on machines that report power in Amperes + instead of Watts. + +* Sun May 13 2007 Adam Jackson 1.1-1 +- powertop 1.1. + +* Fri May 11 2007 Adam Jackson 1.0-1 +- Initial revision.