Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480832 - sys-firmware/nvidia-firmware - required to do video acceleration with nouveau
Summary: sys-firmware/nvidia-firmware - required to do video acceleration with nouveau
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 4 votes (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2013-08-13 03:08 UTC by Ilia Mirkin
Modified: 2014-08-17 16:02 UTC (History)
16 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sys-firmware/nouveau-firmware ebuild (nouveau-firmware-1.ebuild,809 bytes, text/plain)
2013-08-13 03:08 UTC, Ilia Mirkin
Details
sys-firmware/nvidia-firmware ebuild (nvidia-firmware-1.ebuild,852 bytes, text/plain)
2014-02-04 19:10 UTC, Ilia Mirkin
Details
nvidia-firmware/nvidia-firmware-325.15.ebuild (nvidia-firmware-325.15.ebuild,1003 bytes, text/plain)
2014-04-05 06:38 UTC, Martin Dummer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilia Mirkin 2013-08-13 03:08:51 UTC
Created attachment 355832 [details]
sys-firmware/nouveau-firmware ebuild

This is an ebuild for extracting firmware from the nvidia-drivers blob and making it available at the paths expected by the linux kernel and mesa. More details available at http://nouveau.freedesktop.org/wiki/VideoAcceleration/ . Basically all newer (geforce 8+) series require firmware to operate the video decoding hw. There's varying quantities of software support for it in various kernels/mesa versions. But the *very* bleeding edge can run all the (useful) revisions of the video decoding hw to at least some extent, and that's making its way slowly into released versions.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-14 13:38:00 UTC
Ah, you mailed me about that. Sorry I didn't respond quicker.

I guess it should be called "nvidia-firmware" since it relates closely to nvidia-drivers and not at all to the open source nouveau drivers...
Comment 2 Andrey Ovcharov 2013-09-23 14:39:21 UTC
latest extract_firmware.py support 325.08 nvidia-drivers so there is fxd version https://github.com/init6/init_6/blob/master/x11-drivers/nouveau-firmware/nouveau-firmware-0.0.1.ebuild
Comment 3 Ilia Mirkin 2013-09-23 16:01:41 UTC
Andrey: The firmware is arch-independent, and the x86 files are the smallest ones. Also the exact version of the nvidia blob doesn't really matter -- the extracted fw should be identical for all supported versions. (I had to hard-code the lengths of the fws in the extractor.)

Ideally there'd be a way of saying "use one of these files if already downloaded, otherwise grab the first one", but there isn't.
Comment 4 Andrey Ovcharov 2013-09-23 17:17:27 UTC
Ilia: "The firmware is arch-independent" sure. I'm on x86_64. Why do I need to download x86? Especially since in view of that many are moving from nvidia to nouveau. And usually nvidia drivers at them already downloaded.
Comment 5 Ilia Mirkin 2013-09-27 17:58:59 UTC
So by that logic, every time that nvidia releases new firmware, this package should also be updated, in order to match the version that the user has most likely downloaded. I don't think that's desired or sustainable. Given that portage can't support || in SRC_URI, I still think that just picking a known-good version is the simplest way forward.
Comment 6 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-18 01:32:52 UTC
Hello Licenses team

The attached ebuild by Ilia extracts the firmware from the binaries provided in the SOFTWARE by NVIDIA Corporation (the same SOFTWARE the nvidia-drivers package fetches); is this legally conform to the LICENSE /usr/portage/licenses/NVIDIA-r1?

Relevant sections are 2.1.2 and 2.1.3; in 2.1.2 it is mentioned that it "may be copied and redistributed, provided that the binary files thereof are not modified in any way (except for unzipping of compressed files)" which depends on how redistributed is to be interpreted (we don't copy or redistribute hosting wise, but what about what we do on the client?), whereas in 2.1.3 there is stated that one may not disassemble the SOFTWARE or separate it (does attachment do this?).

Can you review this and let us know if this package is fit for the Portage tree licensing wise?

Thank you very much in advance.
Comment 7 Ulrich Müller gentoo-dev 2013-11-18 11:59:32 UTC
(In reply to Tom Wijsman (TomWij) from comment #6)
> The attached ebuild by Ilia extracts the firmware from the binaries provided
> in the SOFTWARE by NVIDIA Corporation (the same SOFTWARE the nvidia-drivers
> package fetches); is this legally conform to the LICENSE
> /usr/portage/licenses/NVIDIA-r1?
> 
> Relevant sections are 2.1.2 and 2.1.3; in 2.1.2 it is mentioned that it "may
> be copied and redistributed, provided that the binary files thereof are not
> modified in any way (except for unzipping of compressed files)" which
> depends on how redistributed is to be interpreted (we don't copy or
> redistribute hosting wise, but what about what we do on the client?),
> whereas in 2.1.3 there is stated that one may not disassemble the SOFTWARE
> or separate it (does attachment do this?).

For Gentoo this should be fine, because we don't distribute any separate components of Nvidia's driver.

However, the situation on the user's site is less clear. Section 2.1.3 would apply there, which forbids separation of components. The question is if such a clause is enforcable: The user who has acquired a video card from Nvidia certainly has the right to use it, which is not possible without their firmware.

As always: IANAL, TINLA.
Comment 8 Luca Barbato gentoo-dev 2014-02-04 18:49:47 UTC
Adding a -bindist constraint is enough to get it in portage.
Comment 9 Ilia Mirkin 2014-02-04 19:10:46 UTC
Created attachment 369552 [details]
sys-firmware/nvidia-firmware ebuild

Updated to new version of script (and fresher firmware) so that it can also extract pgraph fw, which is generally not needed, but sometimes the nouveau fw doesn't work right.
Comment 11 Boney McCracker 2014-03-22 04:02:12 UTC
Meant to say works for me (NVE7).  Wondering if firmware has changed with release I posted link to above.  Sorry for extra post.
Comment 12 Martin Dummer 2014-04-05 06:38:49 UTC
Created attachment 374278 [details]
nvidia-firmware/nvidia-firmware-325.15.ebuild
Comment 13 Martin Dummer 2014-04-05 06:48:40 UTC
I edited the ebuild to make it more appetizingly to the gentoo developers

Changes:
    add header
    changed filename of python script to a more specific one to avoid a
    possible file name clash in $DISTDIR
    change hardcoded firmware source filename to a variable
    reduce usage of ${S}


Note that it is not possible to use *any* version of the nvidia driver, the extraction script as an internal list of known-good versions.
As of today 325.15 is the most recent one.
Comment 14 Ilia Mirkin 2014-04-05 14:49:31 UTC
(In reply to Martin Dummer from comment #13)
> I edited the ebuild to make it more appetizingly to the gentoo developers
> 
> Changes:
>     add header
>     changed filename of python script to a more specific one to avoid a
>     possible file name clash in $DISTDIR
>     change hardcoded firmware source filename to a variable

Ooh, nice, didn't know you could do that. Perhaps the script name should be changed to be versioned too, since the contents may change at some point (I might make an effort and do like 334.x, as that has Maxwell firmware). I did run into annoying issues where I had to manually clear it out from /usr/portage/distfiles when I wanted to update it, but perhaps only because I was actually making the ebuild.

> Note that it is not possible to use *any* version of the nvidia driver, the
> extraction script as an internal list of known-good versions.
> As of today 325.15 is the most recent one.

That's right -- more recent drivers have updated some of the firmware enough that the script doesn't latch onto it (and besides, the lengths are all hardcoded and need to be updated), and have added more pgraph archives that we need to figure out what they're for.
Comment 15 Matthew Schultz 2014-08-04 13:38:35 UTC
(In reply to Martin Dummer from comment #13)
> I edited the ebuild to make it more appetizingly to the gentoo developers
> 
> Changes:
>     add header
>     changed filename of python script to a more specific one to avoid a
>     possible file name clash in $DISTDIR
>     change hardcoded firmware source filename to a variable
>     reduce usage of ${S}
> 
> 
> Note that it is not possible to use *any* version of the nvidia driver, the
> extraction script as an internal list of known-good versions.
> As of today 325.15 is the most recent one.

When is support going to be added for more recent versions?
Comment 16 Ilia Mirkin 2014-08-04 14:02:57 UTC
(In reply to Matthew Schultz from comment #15)
> (In reply to Martin Dummer from comment #13)
> > Note that it is not possible to use *any* version of the nvidia driver, the
> > extraction script as an internal list of known-good versions.
> > As of today 325.15 is the most recent one.
> 
> When is support going to be added for more recent versions?

Eventually... but it doesn't really matter for the ebuild. It's unlikely that it will support exactly the version that you have installed, so it'll still try to download one. There's no way to do a conditional in SRC_URI.
Comment 17 Matthew Schultz 2014-08-04 14:50:31 UTC
> (In reply to Martin Dummer from comment #13)
There's no way to do a conditional in SRC_URI.

So the ebuild version would mirror the nvidia driver version it supports then?
Comment 18 Christian Ruppert (idl0r) gentoo-dev 2014-08-17 16:02:53 UTC
sys-firmware/nvidia-firmware-325.15 has just been added. Thanks guys!