-
-
Save Brainiarc7/03c188cb045253ff7caf to your computer and use it in GitHub Desktop.
| # Maintainer: Dennis E. Mungai <dmngaie@gmail.com> | |
| pkgname=nvidia-prime | |
| pkgver=0.7 | |
| pkgrel=1 | |
| pkgdesc="Tools to enable NVIDIA's Prime." | |
| url="https://launchpad.net/ubuntu/+source/nvidia-prime" | |
| arch=('x86_64' 'i686') | |
| license=('GPLv3') | |
| depends=('lightdm' 'bbswitch' 'python' 'bash') | |
| optdepends=('nvidia' 'lightdm-gtk3-greeter') | |
| makedepends=() | |
| conflicts=() | |
| replaces=() | |
| backup=() | |
| #install='nvidia-prime.install' | |
| source=("https://launchpad.net/ubuntu/+archive/primary/+files/${pkgname}_${pkgver}.tar.gz") | |
| sha256sums=('SKIP') | |
| package() { | |
| cd "${srcdir}/${pkgname}" | |
| mkdir -p "${pkgdir}"/usr/{bin,lib/systemd/system} | |
| mkdir -p "${pkgdir}"/usr/share/{doc/nvidia-prime,nvidia-prime,lightdm/lightdm.conf.d} | |
| #Install PRIME | |
| install -m755 $srcdir/nvidia-prime/get-quirk-options $pkgdir/usr/bin/get-quirk-options | |
| install -m755 $srcdir/nvidia-prime/prime-offload $pkgdir/usr/bin/prime-offload | |
| install -m755 $srcdir/nvidia-prime/prime-select $pkgdir/usr/bin/prime-select | |
| install -m755 $srcdir/nvidia-prime/prime-supported $pkgdir/usr/bin/prime-supported | |
| install -m755 $srcdir/nvidia-prime/prime-switch $pkgdir/usr/bin/prime-switch | |
| #Add nvidia-prime-quirks | |
| install -m755 $srcdir/nvidia-prime/prime-quirks $pkgdir/usr/share/nvidia-prime/prime-quirks | |
| #Add systemD service | |
| install -m644 $srcdir/nvidia-prime/debian/nvidia-prime.service $pkgdir/usr/lib/systemd/system/nvidia-prime.service | |
| #Add LightDM | |
| install -m644 $srcdir/nvidia-prime/90-nvidia.conf $pkgdir/usr/share/lightdm/lightdm.conf.d/90-nvidia.conf | |
| #Other Information | |
| install -m644 $srcdir/nvidia-prime/debian/changelog $pkgdir/usr/share/doc/nvidia-prime/changelog.gz | |
| install -m644 $srcdir/nvidia-prime/debian/copyright $pkgdir/usr/share/doc/nvidia-prime/copyright | |
| } | |
| # vim:set ts=2 sw=2 et: |
Ok. Fixed now using python2, seems to be working:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nvidia-prime
Hello there, i'm also using arch on a Optimus laptop and i've try many solution but none of theme fully work (some applications works fine some other don't). I've installed a ubuntu on a different HDD to test the nvidia-prime proprietary and it works just fine, all applications use the nvidia card. So I'm happy to see that some of you are porting this to arch. But when I test it it doesn't work:
$ sudo prime-select nvidia
Info: the current GL alternatives in use are: [None, None]
Info: the current EGL alternatives in use are: [None, None]
Error: the installed packages do not support PRIME
Error: nvidia mode can't be enable
If anyone have an idea on how to get ride of this I would be really thanksfull!
You can try there https://github.com/wildtruc/nvidia-prime-select
Fork from Fedora-prime to be multi-distros. Works nicely... now. :s
Gives
I wonder if the reason is simply that we are not using the same python version as Ubuntu ...
Ideas anyone?