diff --git a/cpu_thermal_control/PKGBUILD b/cpu_thermal_control/PKGBUILD new file mode 100644 index 0000000..9bbbe36 --- /dev/null +++ b/cpu_thermal_control/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Bruno Pagani (a.k.a. ArchangeGabriel) +# Contributor: hadrons123 +# Contributor: WonderWoofy ,wallnuss +# Contributor: Pekka Helenius (~ Fincer) + +pkgname=thermald +_pkgname=thermal_daemon +pkgver=1.7.1 +pkgrel=1 +pkgdesc="The Linux Thermal Daemon program from 01.org" +arch=('i686' 'x86_64') +url="https://01.org/linux-thermal-daemon" +license=('GPL2') +makedepends=('systemd') +depends=('dbus-glib' 'libxml2') +backup=('etc/thermald/thermal-conf.xml') +source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/01org/${_pkgname}/archive/v${pkgver}.tar.gz" + 'modules-load-thermald.conf' + 'thermald-temp.service' + 'thermal-conf.xml' + 'thermal-cpu-cdev-order.xml') +sha256sums=('c4465d9312304b879908289e2e9da7417e88151c1529dff42acb8e3fb6aa4f47' + '0155e1eb459306d251a5a049ffc6c11e144fa8caa75901ac5fa20bd52e05d515' + 'aa5f8df79088e7f4821635f28f285bad33d470397b9c65f2ae7873c25aa0d33f' + 'a567109439e3652942d42dfa38e42af50d5eab8a7c5a2d46905b5c2d6445bf06' + 'e8fe16460d5003f2b91382d90d72a87082b57f48e9f73d660fec3ba0f4532d02') + +build() { + cd ${_pkgname}-${pkgver} + ./autogen.sh + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --sbindir=/usr/bin + make +} + +package() { + cd ${_pkgname}-${pkgver} + + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}"/modules-load-thermald.conf "${pkgdir}"/usr/lib/modules-load.d/thermald.conf + + cd "${pkgdir}"/etc/thermald/ + rm thermal-cpu-cdev-order.xml + rm thermal-conf.xml + + install -Dm644 "${srcdir}"/thermal-conf.xml "${pkgdir}"/etc/thermald/thermal-conf.xml + install -Dm644 "${srcdir}"/thermal-cpu-cdev-order.xml "${pkgdir}"/etc/thermald/thermal-cpu-cdev-order.xml + + install -Dm644 "${srcdir}"/thermald-temp.service "${pkgdir}"/usr/lib/systemd/system/thermald-temp.service + + + # Remove Upstart related files + rm -r "${pkgdir}/etc/init" +} diff --git a/cpu_thermal_control/thermal-conf.xml b/cpu_thermal_control/thermal-conf.xml new file mode 100644 index 0000000..548a9c4 --- /dev/null +++ b/cpu_thermal_control/thermal-conf.xml @@ -0,0 +1,27 @@ + + + + Intel Powered Laptop + * + QUIET + + + cpu + + + x86_pkg_temp + 75000 + passive + SEQUENTIAL + + 1 + intel_pstate + 100 + 6 + + + + + + + diff --git a/cpu_thermal_control/thermal-cpu-cdev-order.xml b/cpu_thermal_control/thermal-cpu-cdev-order.xml new file mode 100644 index 0000000..5152e87 --- /dev/null +++ b/cpu_thermal_control/thermal-cpu-cdev-order.xml @@ -0,0 +1,8 @@ + + intel_pstate + rapl_controller + intel_powerclamp + cpufreq + Processor + + diff --git a/cpu_thermal_control/thermald-temp.service b/cpu_thermal_control/thermald-temp.service new file mode 100644 index 0000000..f9845a8 --- /dev/null +++ b/cpu_thermal_control/thermald-temp.service @@ -0,0 +1,10 @@ +[Unit] +Description=Set temperature limit for Thermal Daemon +Wants=thermald.service +After=thermald.service + +[Service] +ExecStart=/usr/bin/dbus-send --system --dest=org.freedesktop.thermald /org/freedesktop/thermald org.freedesktop.thermald.SetUserMaxTemperature string:cpu uint32:72000 + +[Install] +WantedBy=multi-user.target