diff options
author | nikatar | 2020-04-21 15:04:09 +0300 |
---|---|---|
committer | nikatar | 2020-04-21 15:04:09 +0300 |
commit | ceb878b440f76f95d1ef1fa0e7a86033a318f67c (patch) | |
tree | 26812a36fac36c6f95e2c195834c480d4bd73614 | |
download | aur-ceb878b440f76f95d1ef1fa0e7a86033a318f67c.tar.gz |
release 1.0
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | i915-pwm.conf | 1 | ||||
-rwxr-xr-x | intelpwm | 16 | ||||
-rw-r--r-- | intelpwm.conf | 6 | ||||
-rw-r--r-- | intelpwm.install | 8 |
6 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cf6c0b560a61 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = intelpwm + pkgdesc = PWM frequency setting on Intel HD Graphics with modprobe.d + pkgver = 1.0 + pkgrel = 1 + url = http://devbraindom.blogspot.com/2013/03/eliminate-led-screen-flicker-with-intel.html + install = intelpwm.install + arch = x86_64 + license = GPL + depends = intel-gpu-tools + backup = etc/intelpwm.conf + source = i915-pwm.conf + source = intelpwm + source = intelpwm.conf + sha256sums = f25b883744dbe177d0ec7efaca17ffb288f4a7994e819883f299c90c27295f85 + sha256sums = 51f14a522767ff4c803ac1149980715714966356e36ed1e92cf61110a35bf784 + sha256sums = 7fefe55b66278e97eaca2fdf0aad125720cd00c95069dc38ef02ae1ee4e846b0 + +pkgname = intelpwm + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..71be233eeb22 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +#Maintainer: Nikita Tarasov <nikatar@disroot.org> + +pkgname=intelpwm +pkgver=1.0 +pkgrel=1 +pkgdesc="PWM frequency setting on Intel HD Graphics with modprobe.d" +arch=(x86_64) +depends=(intel-gpu-tools) +url="http://devbraindom.blogspot.com/2013/03/eliminate-led-screen-flicker-with-intel.html" +license=(GPL) +conflicts=() +install='intelpwm.install' +backup=('etc/intelpwm.conf') +source=(i915-pwm.conf intelpwm intelpwm.conf) + +sha256sums=('f25b883744dbe177d0ec7efaca17ffb288f4a7994e819883f299c90c27295f85' + '51f14a522767ff4c803ac1149980715714966356e36ed1e92cf61110a35bf784' + '7fefe55b66278e97eaca2fdf0aad125720cd00c95069dc38ef02ae1ee4e846b0') + +build() { + true +} + +package() { + msg "Installing..." + install -D -m644 "${srcdir}/i915-pwm.conf" "${pkgdir}/etc/modprobe.d/i915-pwm.conf" + install -D -m644 "${srcdir}/intelpwm.conf" "${pkgdir}/etc/intelpwm.conf" + install -D -m744 "${srcdir}/intelpwm" "${pkgdir}/usr/bin/intelpwm" +} + + diff --git a/i915-pwm.conf b/i915-pwm.conf new file mode 100644 index 000000000000..0c012b49b73b --- /dev/null +++ b/i915-pwm.conf @@ -0,0 +1 @@ +install i915 /usr/bin/intelpwm; /sbin/modprobe i915 --ignore-install diff --git a/intelpwm b/intelpwm new file mode 100755 index 000000000000..35fc6ac16f63 --- /dev/null +++ b/intelpwm @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +CONFIG=/etc/intelpwm.conf +if [ ! -f "$CONFIG" ]; then + echo "$CONFIG not found" + exit 1 +fi + +source $CONFIG + +RAW_DATA="$(intel_reg read ${REGISTER})" +CYCLE="${RAW_DATA:56:4}" +HEX=$(printf "0x%08x" $((1000000*0x7d/128/FREQ))) +PERIOD="${HEX:6:9}" + +intel_reg write "${REGISTER}" "0x${PERIOD}${CYCLE}" + diff --git a/intelpwm.conf b/intelpwm.conf new file mode 100644 index 000000000000..49ac300f45c3 --- /dev/null +++ b/intelpwm.conf @@ -0,0 +1,6 @@ +# FREQ is the PWM frequency in Hz. In most cases 1000Hz is the maximum. Be careful and see the documentation for your hardware! Tested on Thinkpad X230 +# For other details see http://devbraindom.blogspot.com/2013/03/eliminate-led-screen-flicker-with-intel.html + +REGISTER=0xc8254 +FREQ=860 + diff --git a/intelpwm.install b/intelpwm.install new file mode 100644 index 000000000000..1620ab8e3c0a --- /dev/null +++ b/intelpwm.install @@ -0,0 +1,8 @@ +post_install() { + echo "PWM frequency settings on Intel HD Graphics with modprobe.d" + echo "Default PWM frequency is 860Hz. In most cases 1000Hz is the maximum. Be careful and see the documentation for your hardware! Tested on Thinkapd X230" + echo "Edit /etc/intelpwm.conf to suit your needs" + echo "Visit http://devbraindom.blogspot.com/2013/03/eliminate-led-screen-flicker-with-intel.html for more details" +} + + |