[Frugalware-git] frugalware-current: tpc-0.43-1-x86_64 * new package
James Buren
ryuo at frugalware.org
Mon Jun 4 07:07:29 CEST 2012
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=8fc0c32f489d2e71676bd50ca52f244b824ba4d0
commit 8fc0c32f489d2e71676bd50ca52f244b824ba4d0
Author: James Buren <ryuo at frugalware.org>
Date: Sat Jun 2 13:39:15 2012 -0500
tpc-0.43-1-x86_64
* new package
diff --git a/source/apps-extra/tpc/README.Frugalware b/source/apps-extra/tpc/README.Frugalware
new file mode 100644
index 0000000..b2b4f8b
--- /dev/null
+++ b/source/apps-extra/tpc/README.Frugalware
@@ -0,0 +1,18 @@
+Before using this package, it is recommended that you setup the `cpupower`
+package so that you can get the maximum benefit from this package. After
+you have done this, come back to this documentation.
+
+Read the documentation included for this package under `/usr/share/doc`. Now,
+edit `/etc/sysconfig/tpc`. It should include any arguments you wish to pass
+to tpc at startup.
+
+Now, you will want to enable the systemd service so tpc will be run at startup.
+Use this command to do this and start it now.
+
+----
+systemctl enable tpc.service
+systemctl start tpc.service
+----
+
+And you're done. In the event of system instability, you will want to modify the
+settings you have given to tpc.
diff --git a/source/apps-extra/tpc/tpc b/source/apps-extra/tpc/tpc
new file mode 100644
index 0000000..afede3b
--- /dev/null
+++ b/source/apps-extra/tpc/tpc
@@ -0,0 +1,10 @@
+#add_argument "-set"
+#add_argument "pstate 0 voltage 1.1875"
+#add_argument "pstate 1 voltage 1.1500"
+#add_argument "pstate 2 voltage 1.1000"
+#add_argument "pstate 3 voltage 1.0500"
+#add_argument "pstate 4 voltage 1.0000"
+#add_argument "pstate 5 voltage 0.9375"
+#add_argument "pstate 6 voltage 0.8750"
+#add_argument "pstate 7 voltage 0.8000"
+#add_argument "-altvid 60"
diff --git a/source/apps-extra/tpc/tpc.service b/source/apps-extra/tpc/tpc.service
new file mode 100644
index 0000000..9127a3c
--- /dev/null
+++ b/source/apps-extra/tpc/tpc.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Apply tpc configuration
+After=cpupower.service
+
+[Service]
+ExecStart=/usr/sbin/tpc.sh
+Type=oneshot
+StandardOutput=syslog
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/source/apps-extra/tpc/tpc.sh b/source/apps-extra/tpc/tpc.sh
new file mode 100644
index 0000000..37f502d
--- /dev/null
+++ b/source/apps-extra/tpc/tpc.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+add_argument()
+{
+ if [ -z "$ARGS" ]; then
+ ARGS="$1"
+ else
+ ARGS="$ARGS $1"
+ fi
+}
+
+modprobe cpuid
+modprobe msr
+
+source /etc/sysconfig/tpc
+
+exec tpc $ARGS
diff --git a/source/apps-extra/tpc/tpc.sleep b/source/apps-extra/tpc/tpc.sleep
new file mode 100644
index 0000000..cdd1e4f
--- /dev/null
+++ b/source/apps-extra/tpc/tpc.sleep
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+case $1 in
+ resume|thaw)
+ /usr/sbin/tpc.sh
+ ;;
+ *)
+ ;;
+esac
More information about the Frugalware-git
mailing list