Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 692170 - x11-drivers/nvidia-drivers: Add support for media-libs/libglvnd
Summary: x11-drivers/nvidia-drivers: Add support for media-libs/libglvnd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal with 1 vote (vote)
Assignee: Jeroen Roovers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: use-libglvnd
  Show dependency tree
 
Reported: 2019-08-14 21:11 UTC by Maik
Modified: 2019-09-09 17:12 UTC (History)
2 users (show)

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


Attachments
hacky workaround ebuild for USE=libglvnd (nvidia-drivers-435.17.ebuild,15.79 KB, text/plain)
2019-08-14 21:11 UTC, Maik
Details
env file for files dir, needed by hacky ebuild (02nvidiaglvnd,76 bytes, text/plain)
2019-08-14 21:14 UTC, Maik
Details
Patch against nvidia-drivers-435.17.ebuild (nvidia-drivers-435.17-glvnd.patch,3.25 KB, patch)
2019-08-15 20:38 UTC, Maik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maik 2019-08-14 21:11:56 UTC
Created attachment 586800 [details]
hacky workaround ebuild for USE=libglvnd

The new nvidia beta driver finally adds support for render offloading (needs four patches for xorg-server to work) but this relies on fuctional glvnd.
http://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/primerenderoffload.html
Attaching a hacky-whacky workaround ebuild and env file which only works with the old lib32/lib64 locations for people needing this and to point out the rising urgency for Gentoo to have a functional glvnd setup.
Comment 1 Maik 2019-08-14 21:14:24 UTC
Created attachment 586802 [details]
env file for files dir, needed by hacky ebuild

Adds an LD_LIBRARY_PATH set to the current install location of the nvidia libs to avoid reworking the nvidia-drivers ebuild and changing file locations.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-08-14 23:46:04 UTC
Please attach patch for ebuild, not full ebuild, and with "Signed-off-by".
Comment 3 Maik 2019-08-15 20:38:19 UTC
Created attachment 587016 [details, diff]
Patch against nvidia-drivers-435.17.ebuild

Adding a clean solution patch changing file locations to standard, skipping the media-libs/libglvnd provided libraries and eselect-opengl calls in the USE="libglvnd" case.
Comment 4 Larry the Git Cow gentoo-dev 2019-09-02 06:14:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=418d6d42276aa1865217dcba35b1a21ff86c2c51

commit 418d6d42276aa1865217dcba35b1a21ff86c2c51
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2019-09-02 06:12:54 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2019-09-02 06:14:02 +0000

    x11-drivers/nvidia-drivers: Version 435.21
    
    Package-Manager: Portage-2.3.75, Repoman-2.3.17
    Bug: https://bugs.gentoo.org/692170
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 profiles/base/package.use.mask                     |   3 +
 x11-drivers/nvidia-drivers/Manifest                |   3 +
 x11-drivers/nvidia-drivers/metadata.xml            |   3 +-
 .../nvidia-drivers/nvidia-drivers-435.21.ebuild    | 603 +++++++++++++++++++++
 4 files changed, 611 insertions(+), 1 deletion(-)
Comment 5 Maik 2019-09-02 11:31:06 UTC
Tested nvidia-drivers/nvidia-drivers-435.21 with USE="libglvnd" and USE="-libglvnd", both cases work fine so closing this.
Comment 6 Jeroen Roovers gentoo-dev 2019-09-02 18:18:57 UTC
(In reply to Maik from comment #5)
> Tested nvidia-drivers/nvidia-drivers-435.21 with USE="libglvnd" and
> USE="-libglvnd", both cases work fine so closing this.

Thank you for testing. I am surprised it works as is without the original env.d addition.
Comment 7 Maik 2019-09-02 19:07:26 UTC
The env.d addition was just a quick-n-dirty hack to emulate eselect-opengl behaviour. This was replaced by changing the library path to standard:
+	if use libglvnd; then
+	        local GL_ROOT="/usr/$(get_libdir)"
+	else
+		local GL_ROOT="/usr/$(get_libdir)/opengl/nvidia/lib"
+	fi
Comment 8 Ostashevskyi Viktor 2019-09-09 17:04:51 UTC
It would be nice to add libglvnd USE flag to xorg-server as it pulls app-eselect/eselect-opengl unconditionally.
Comment 9 Maik 2019-09-09 17:12:20 UTC
For xorg-server, see bug #692168