diff options
author | AJ | 2015-12-20 18:34:25 -0600 |
---|---|---|
committer | AJ | 2015-12-20 18:34:25 -0600 |
commit | 707876d1ee9ce1c28445af55b13b50afd29f8631 (patch) | |
tree | 7c40cec424f3544694364a8db1162fc7ad15d65e | |
parent | a64c4f39f7d646c4d9df3dc9de8d736eba568f48 (diff) | |
download | aur-707876d1ee9ce1c28445af55b13b50afd29f8631.tar.gz |
Add new script
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rwxr-xr-x | check_active_gpu.sh | 14 |
3 files changed, 30 insertions, 10 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Wed Dec 9 18:00:23 UTC 2015 +# Mon Dec 21 00:34:06 UTC 2015 pkgbase = systemd-vgaswitcheroo-units pkgdesc = Disable discrete GPU at boot for AMD/NVIDIA & Intel dual stuff. This is based on the old AUR package that was not migrated to AUR4. - pkgver = 1.2 - pkgrel = 3 + pkgver = 1.3 + pkgrel = 1 url = https://github.com/astrohckr/systemd-vgaswitcheroo-units install = systemd-vgaswitcheroo-units.install arch = any @@ -12,9 +12,11 @@ pkgbase = systemd-vgaswitcheroo-units source = vgaswitcheroo.service source = vgaswitcheroo_start.sh source = vgaswitcheroo_stop.sh + source = check_active_gpu.sh md5sums = a01b63dacaa632b03cd2bfe1832f4d31 md5sums = 4919673009c0a5c54322a1a9624801e9 md5sums = fcbb48340873f67f4ad493a96ef951a4 + md5sums = 1f105cbe6dc07c4e76862944b9086596 pkgname = systemd-vgaswitcheroo-units @@ -2,8 +2,8 @@ # Maintainer: Adam Kürthy <adikurthy at gmail dot com> # Maintainer: Michael Bentlage <Mi.Bentlage at gmail dot com> pkgname=systemd-vgaswitcheroo-units -pkgver=1.2 -pkgrel=3 +pkgver=1.3 +pkgrel=1 pkgdesc="Disable discrete GPU at boot for AMD/NVIDIA & Intel dual stuff. This is based on the old AUR package that was not migrated to AUR4." arch=('any') # Based on https://github.com/fredoche/vgaswitcheroo_systemd @@ -12,15 +12,19 @@ license=('GPL') depends=('systemd') install=systemd-vgaswitcheroo-units.install source=('vgaswitcheroo.service' - 'vgaswitcheroo_start.sh' - 'vgaswitcheroo_stop.sh') + 'vgaswitcheroo_start.sh' + 'vgaswitcheroo_stop.sh' + 'check_active_gpu.sh') +md5sums=('a01b63dacaa632b03cd2bfe1832f4d31' + '4919673009c0a5c54322a1a9624801e9' + 'fcbb48340873f67f4ad493a96ef951a4' + '1f105cbe6dc07c4e76862944b9086596') + package() { install -Dm644 "${srcdir}/vgaswitcheroo.service" "${pkgdir}/usr/lib/systemd/system/vgaswitcheroo.service" install -Dm755 "${srcdir}/vgaswitcheroo_start.sh" "${pkgdir}/usr/bin/vgaswitcheroo_start.sh" install -Dm755 "${srcdir}/vgaswitcheroo_stop.sh" "${pkgdir}/usr/bin/vgaswitcheroo_stop.sh" + install -Dm755 "${srcdir}/check_active_gpu.sh" "${pkgdir}/usr/bin/check_active_gpu.sh" } -md5sums=('a01b63dacaa632b03cd2bfe1832f4d31' - '4919673009c0a5c54322a1a9624801e9' - 'fcbb48340873f67f4ad493a96ef951a4') diff --git a/check_active_gpu.sh b/check_active_gpu.sh new file mode 100755 index 000000000000..a130b04e6cbe --- /dev/null +++ b/check_active_gpu.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +vgaswitcheroo_path='/sys/kernel/debug/vgaswitcheroo/switch' +active_card=`grep '+' $vgaswitcheroo_path|awk '{split($0,a,":"); print a[2]}'` + +if [ "$active_card" == "IGD" ]; +then + echo "Integrated" +elif [ "$active_card" == "DIS" ]; +then + echo "Discrete" +fi + + |