You are not logged in.

#1 2015-03-18 11:13:49

JamesLens
Member
Registered: 2014-04-03
Posts: 17

[REQUEST] nvidia-prime

On Ubuntu and Mint, there's a package called nvidia-prime that supposedly improves on switching between the intel and nvidia video cards and allowing the usage of HDMI, which is not possible with bumblebee. [1] The switch can be done in the terminal, or using a toolbar app, though that seems to be in some ubuntu repository. The switch requires the user to logout and login, but I believe is still an improvement on the current method.
The source code is at [2]. I also managed to find a previous attempt at creating a PKGBUILD at [3], though that is for an older version, and it is not in the AUR.


[1]: http://xmodulo.com/install-configure-nv … buntu.html
[2]: https://launchpad.net/ubuntu/+source/nvidia-prime
[3]: https://gist.github.com/Brainiarc7/03c188cb045253ff7caf

Offline

#2 2015-03-18 12:10:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [REQUEST] nvidia-prime

OT: Would you mind updating / expanding https://wiki.archlinux.org/index.php/PRIME (assuming that's the same thing)?

Offline

#3 2015-03-18 15:23:09

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [REQUEST] nvidia-prime

karol wrote:

OT: Would you mind updating / expanding https://wiki.archlinux.org/index.php/PRIME (assuming that's the same thing)?

I don't think it's the same thing.

Also, a quick search of the forums should have turned up a PKGBUILD and source tarball I knocked together for it. I didn't upload it because the person I wrote it for didn't get back to me about whether the thing worked.

EDIT: Wait, link [3] looks like a carbon copy of what I wrote and put on Github 2 weeks after I did it...

EDIT2: You should just be able to bump the package version and it should build. As with the previous disclaimer, I don't know whether it will work since I don't have an nVidia card.

Scratch that, there's a little more to it than just bumping the pkgver. I'll come back with a new version (though it may not be as elegant as some PKGBUILDs. it should at least build).

Last edited by clfarron4 (2015-03-18 15:41:30)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#4 2015-03-18 15:31:08

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,407
Website

Re: [REQUEST] nvidia-prime

Wrt the PKGBUILD, you don't need mkdir -p if you pass on the -D flag to install.

Last edited by Alad (2015-03-18 15:31:19)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#5 2015-03-18 15:34:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [REQUEST] nvidia-prime

A number of those install commands could be combined, too.

Offline

#6 2015-03-18 15:38:52

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [REQUEST] nvidia-prime

Alad wrote:

Wrt the PKGBUILD, you don't need mkdir -p if you pass on the -D flag to install.

So that's why I capital D's in some of the PKGBUILDs.

Scimmia wrote:

A number of those install commands could be combined, too.

I'm not that far with PKGBUILDs XD I'm only as far as borrowing and modifying bits XD


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#7 2015-03-18 16:33:51

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,407
Website

Re: [REQUEST] nvidia-prime

Well, it's just bash. Which means you can use all the tricks you want. Here's my attempt, uses basic for loops:

# Maintainer: Claire Farron <diesal3[at]googlemail[dot]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')
#install='nvidia-prime.install'
source=("https://launchpad.net/ubuntu/+archive/primary/+files/${pkgname}_${pkgver}.tar.gz")
sha256sums=('fb8216c07b2258113a84caf7fb945edd9694d238f3859deafb804d0df5d19ca4')

package() {
    cd "${pkgname}"

    #Install PRIME
    for i in get-quirk-options prime-{offload,select,supported,switch}; do
	install -Dm755 "$i" "$pkgdir/usr/bin/$i"
    done

    #Add nvidia-prime-quirks
    install -Dm755 prime-quirks $pkgdir/usr/share/nvidia-prime/prime-quirks

    #Add systemd service
    install -Dm644 debian/nvidia-prime.service $pkgdir/usr/lib/systemd/system/nvidia-prime.service

    #Add LightDM
    install -Dm644 90-nvidia.conf $pkgdir/usr/share/lightdm/lightdm.conf.d/90-nvidia.conf

    #Other Information
    for i in changelog copyright; do
	install -Dm644 "debian/$i" "$pkgdir/usr/share/doc/nvidia-prime/$i"
    done
}

# vim:set ts=2 sw=2 et:

Untested. But everything should be extracted properly to $srcdir/$pkgname...

Last edited by Alad (2015-03-18 16:35:42)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#8 2015-03-18 16:38:54

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [REQUEST] nvidia-prime

I just used curly brackets for the Install PRIME part, with no for loop (yes, I'm aware of the 100 characters thing. I just want something that works first).

Currently uploading to here if you want to look up a source tarball and pre-built versions.

Last edited by clfarron4 (2015-03-18 16:39:39)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#9 2015-03-18 16:40:13

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,407
Website

Re: [REQUEST] nvidia-prime

Even better, forgot you could specify multiple folders to install. smile


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#10 2015-03-18 20:01:01

AnAkkk
Member
Registered: 2014-03-03
Posts: 148

Re: [REQUEST] nvidia-prime

clfarron4 wrote:
karol wrote:

OT: Would you mind updating / expanding https://wiki.archlinux.org/index.php/PRIME (assuming that's the same thing)?

I don't think it's the same thing.


It is, more or less. It's already explained here for Nvidia, and it's 100% the same thing as the nvidia-prime package:
https://wiki.archlinux.org/index.php/NV … ing_nvidia

The nvidia-prime package just has scripts that does the same.

Offline

#11 2015-10-08 18:06:52

solazs
Member
Registered: 2015-10-08
Posts: 3

Re: [REQUEST] nvidia-prime

AnAkkk wrote:
clfarron4 wrote:
karol wrote:

OT: Would you mind updating / expanding https://wiki.archlinux.org/index.php/PRIME (assuming that's the same thing)?

I don't think it's the same thing.


It is, more or less. It's already explained here for Nvidia, and it's 100% the same thing as the nvidia-prime package:
https://wiki.archlinux.org/index.php/NV … ing_nvidia

The nvidia-prime package just has scripts that does the same.

No, it's not the same.

The nvidia-prime package provides a script to switch between the intel and the discrete card (basically between using only the intel driver or using the nvidia driver too).
The changes need an X restart to take effect.
To achieve this the scripts can disable the discrete card with bbswitch, load or unload kernel modules, change libgl path and xorg.conf (and maybe some other magic unknown to me).

Such instructions are not given on https://wiki.archlinux.org/index.php/NV … ing_nvidia.

As an Arch novice I can't even get mesa-libgl and nvidia-libgl to install simultaneously as they are conflicting, so either a complete guide would be nice, or the nvidia-prime package with the prime-select script.

Offline

#12 2015-10-08 23:58:59

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [REQUEST] nvidia-prime

So here is the instructions on actually using the Optimus technology with Arch: https://wiki.archlinux.org/index.php/Bumblebee

That tells you how to install, what to install and how to run programs with the nVidia card.

And yes, the Wiki links tells how to do pretty much the same thing as nvidia-prime. You can read the script and make it work on Arch by emulating what it does, or just refer to the Wiki articles linked already.

Last edited by mrunion (2015-10-08 23:59:38)


Matt

"It is very difficult to educate the educated."

Offline

#13 2016-11-21 23:22:17

Mrcoe1989
Member
Registered: 2016-06-23
Posts: 9

Re: [REQUEST] nvidia-prime

Is this still being worked on ?

Offline

#14 2016-11-22 09:52:42

solazs
Member
Registered: 2015-10-08
Posts: 3

Re: [REQUEST] nvidia-prime

If so, I'd like to know, too.
Bumblebee is not an option as it comes with at least ~30% performance penalty, and no HDMI output on my laptop (starting another X server is not acceptable as it defeats the purpose of using a multi-display setup).

Right now I'm using nvidia-beta on my main setup and a seperate install w/ nouveau for trips when power saving is a must.

Offline

Board footer

Powered by FluxBB