summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-12 02:11:25 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-12 02:11:25 +0100
commite2d2360e108ac340994ea1464c684fa96382c3e1 (patch)
treec38a6c2d3239c73ebfe4c056d98bc3c9a1d1e513
parent3c171c04336e3aebae12c218895ae73068b35ac8 (diff)
x11-drivers/nvidia-drivers : version bump, port to EAPI 8, resync with Gentoo
-rw-r--r--metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-390.157-r8 (renamed from metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-390.157-r7)3
-rw-r--r--metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.256.02 (renamed from metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.239.06-r1)5
-rw-r--r--metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02 (renamed from metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-535.171.04-r1)5
-rw-r--r--metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r816
-rw-r--r--metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r917
-rw-r--r--metadata/md5-cache/x11-drivers/nvidia-drivers-470.239.06-r116
-rw-r--r--metadata/md5-cache/x11-drivers/nvidia-drivers-470.256.0217
-rw-r--r--metadata/md5-cache/x11-drivers/nvidia-drivers-535.171.04-r116
-rw-r--r--metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.0217
-rw-r--r--metadata/md5-cache/x11-misc/nvidia-settings-390.157-r7 (renamed from metadata/md5-cache/x11-misc/nvidia-settings-390.157-r6)5
-rw-r--r--metadata/md5-cache/x11-misc/nvidia-settings-470.256.02 (renamed from metadata/md5-cache/x11-misc/nvidia-settings-470.239.06-r1)7
-rw-r--r--metadata/md5-cache/x11-misc/nvidia-settings-550.107.02 (renamed from metadata/md5-cache/x11-misc/nvidia-settings-535.171.04-r1)7
-rw-r--r--metadata/pkg_desc_index6
-rw-r--r--sys-kernel/nvidia-drivers-dkms/Manifest4
-rw-r--r--sys-kernel/nvidia-drivers-dkms/files/dkms470.patch4
-rw-r--r--sys-kernel/nvidia-drivers-dkms/files/dkms550.patch (renamed from sys-kernel/nvidia-drivers-dkms/files/dkms535.patch)8
-rw-r--r--sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.157-r8.ebuild (renamed from sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.157-r7.ebuild)1
-rw-r--r--sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.256.02.ebuild (renamed from sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.239.06-r1.ebuild)1
-rw-r--r--sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02.ebuild (renamed from sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-535.171.04-r1.ebuild)3
-rw-r--r--x11-drivers/nvidia-drivers/Manifest16
-rw-r--r--x11-drivers/nvidia-drivers/files/nouveau.conf3
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-390.conf23
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-470.conf33
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-545.conf38
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-390.154-clang15.patch84
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-470.141.03-clang15.patch110
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drm-outputclass-390.conf7
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-modprobe-390.141-uvm-perms.patch12
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-persistenced.confd7
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd11
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-powerd.initd11
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r8.ebuild254
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r9.ebuild329
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-470.239.06-r1.ebuild259
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02.ebuild304
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-535.171.04-r1.ebuild259
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02.ebuild324
-rw-r--r--x11-misc/nvidia-settings/Manifest4
-rw-r--r--x11-misc/nvidia-settings/nvidia-settings-390.157-r7.ebuild (renamed from x11-misc/nvidia-settings/nvidia-settings-390.157-r6.ebuild)5
-rw-r--r--x11-misc/nvidia-settings/nvidia-settings-470.256.02.ebuild (renamed from x11-misc/nvidia-settings/nvidia-settings-470.239.06-r1.ebuild)5
-rw-r--r--x11-misc/nvidia-settings/nvidia-settings-550.107.02.ebuild (renamed from x11-misc/nvidia-settings/nvidia-settings-535.171.04-r1.ebuild)5
41 files changed, 1400 insertions, 861 deletions
diff --git a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-390.157-r7 b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-390.157-r8
index f511b29f..3c6274ff 100644
--- a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-390.157-r7
+++ b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-390.157-r8
@@ -6,6 +6,7 @@ HOMEPAGE=http://www.nvidia.com/
KEYWORDS=amd64
LICENSE=GPL-2 NVIDIA-r2
RDEPEND=sys-kernel/dkms !!sys-kernel/nvidia-drivers-dkms:4 !!sys-kernel/nvidia-drivers-dkms:5
+RESTRICT=strip
SLOT=3
SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/390.157/NVIDIA-Linux-x86_64-390.157.run )
-_md5_=2c902e5120dca15ea57592cb0ed2588d
+_md5_=d2130eab14f4c23014ad2e290632adeb
diff --git a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.239.06-r1 b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.256.02
index ac3eb7d6..96053f11 100644
--- a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.239.06-r1
+++ b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-470.256.02
@@ -6,6 +6,7 @@ HOMEPAGE=http://www.nvidia.com/
KEYWORDS=amd64
LICENSE=GPL-2 NVIDIA-r2
RDEPEND=sys-kernel/dkms !!sys-kernel/nvidia-drivers-dkms:3 !!sys-kernel/nvidia-drivers-dkms:5
+RESTRICT=strip
SLOT=4
-SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/470.239.06/NVIDIA-Linux-x86_64-470.239.06.run )
-_md5_=4ffc6903f6cd7f258886a3afe0cbd670
+SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/470.256.02/NVIDIA-Linux-x86_64-470.256.02.run )
+_md5_=faf9f9496edc74fb1d6885c1236df128
diff --git a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-535.171.04-r1 b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02
index bade841a..d725484a 100644
--- a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-535.171.04-r1
+++ b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02
@@ -7,6 +7,7 @@ IUSE=kernel-open
KEYWORDS=amd64
LICENSE=GPL-2 NVIDIA-r2
RDEPEND=sys-kernel/dkms !!sys-kernel/nvidia-drivers-dkms:3 !!sys-kernel/nvidia-drivers-dkms:4
+RESTRICT=strip
SLOT=5
-SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/535.171.04/NVIDIA-Linux-x86_64-535.171.04.run )
-_md5_=b57bcb77a6254e03958f5c732493a6e4
+SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/550.107.02/NVIDIA-Linux-x86_64-550.107.02.run )
+_md5_=10129d2f1e2bedd29d9fcecaeaabf620
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r8 b/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r8
deleted file mode 100644
index 4123d29c..00000000
--- a/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r8
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test
-DEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-DESCRIPTION=NVIDIA Accelerated Graphics Driver
-EAPI=6
-HOMEPAGE=http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx
-INHERIT=flag-o-matic multilib-minimal portability toolchain-funcs
-IUSE=acpi +dkms multilib +tools wayland +X abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_s390_32 abi_s390_64
-KEYWORDS=-* ~amd64
-LICENSE=GPL-2 NVIDIA-r2
-PDEPEND=tools? ( x11-misc/nvidia-settings:3 )
-RDEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=virtual/opencl-3 !!x11-drivers/nvidia-drivers:4 !!x11-drivers/nvidia-drivers:5 acpi? ( sys-power/acpid ) dkms? ( ~sys-kernel/nvidia-drivers-dkms-390.157:3 ) wayland? ( dev-libs/wayland[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) X? ( >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXext-1.3.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] sys-libs/zlib[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-RESTRICT=bindist mirror strip
-SLOT=3
-SRC_URI=amd64? ( http://http.download.nvidia.com/XFree86/Linux-x86_64/390.157/NVIDIA-Linux-x86_64-390.157.run )
-_eclasses_=eqawarn 6bd80a2f74f3b59c77b180f76c693256 flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 multibuild 45df57b1877333d70a9e894f6c8fdb3a multilib 7e1347c006a76bb812f3a9f663b79991 multilib-build 8cdc28ee17e24f9f57730a28fe166a21 multilib-minimal b93489cf816ff90770a3c1c61b25db44 portability 01f478fa22185b3606f2d4adea4675ed toolchain-funcs 948855ec7ad9f11351edf9066708dfa9
-_md5_=38c83b3e35189395dca010d06c80fcc7
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r9 b/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r9
new file mode 100644
index 00000000..425c34ab
--- /dev/null
+++ b/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r9
@@ -0,0 +1,17 @@
+BDEPEND=sys-devel/m4 virtual/pkgconfig dev-util/pahole sys-apps/kmod[tools] modules-sign? ( dev-libs/openssl virtual/pkgconfig ) virtual/pkgconfig
+DEFINED_PHASES=compile install postinst preinst prepare setup unpack
+DEPEND=acct-group/video persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) tools? ( x11-misc/nvidia-settings:3 ) x11-base/xorg-proto x11-libs/libX11 x11-libs/libXext tools? ( x11-misc/nvidia-settings:3 ) virtual/linux-sources
+DESCRIPTION=NVIDIA Accelerated Graphics Driver
+EAPI=8
+HOMEPAGE=https://www.nvidia.com/download/index.aspx
+IDEPEND=sys-apps/kmod[tools]
+INHERIT=desktop flag-o-matic linux-mod-r1 multilib readme.gentoo-r1 systemd toolchain-funcs unpacker user-info
+IUSE=abi_x86_32 abi_x86_64 +acpi +dkms +persistenced +tools +X dist-kernel modules-compress modules-sign +strip
+KEYWORDS=-* amd64
+LICENSE=NVIDIA-r2 BSD BSD-2 GPL-2 MIT
+RDEPEND=acct-group/video persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) tools? ( x11-misc/nvidia-settings:3 ) sys-libs/glibc !!x11-drivers/nvidia-drivers:4 !!x11-drivers/nvidia-drivers:5 acpi? ( sys-power/acpid ) dkms? ( ~sys-kernel/nvidia-drivers-dkms-390.157:3 ) X? ( media-libs/libglvnd[X,abi_x86_32(-)?] x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) sys-apps/kmod[tools] dist-kernel? ( virtual/dist-kernel:= )
+RESTRICT=strip
+SLOT=3
+SRC_URI=https://download.nvidia.com/XFree86/Linux-x86_64/390.157/NVIDIA-Linux-x86_64-390.157.run https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.157.tar.bz2 https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.157.tar.bz2 https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.157.tar.bz2 https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.157.tar.bz2
+_eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 dist-kernel-utils 55a979ee597f57f3b478d503f9af23e4 edo 367e103a74bf77e6a8da7894d999fa3c flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 linux-info ea4122ba1d8791a12b78e53f9510a2e3 linux-mod-r1 c3684e27e002b9857ed37bc4e877e47a mount-boot-utils 69218c024651aa10db01df7e8a5b63e0 multilib 7e1347c006a76bb812f3a9f663b79991 multiprocessing e644caa6eb7ce7e5ab0864383ac13ad9 readme.gentoo-r1 32b48460d813533d85f082897cec1b80 systemd 0f241b5c9f3758c3d3423df59a7f655a toolchain-funcs 948855ec7ad9f11351edf9066708dfa9 unpacker fb4b84181244b3b9990fa0bf40232dd2 user-info 9951b1a0e4f026d16c33a001fd2d5cdf
+_md5_=712f27bdba030e797f7f3270aa772cc1
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-470.239.06-r1 b/metadata/md5-cache/x11-drivers/nvidia-drivers-470.239.06-r1
deleted file mode 100644
index 2ba3b2b7..00000000
--- a/metadata/md5-cache/x11-drivers/nvidia-drivers-470.239.06-r1
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test
-DEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-DESCRIPTION=NVIDIA Accelerated Graphics Driver
-EAPI=6
-INHERIT=flag-o-matic multilib-minimal portability toolchain-funcs
-IUSE=acpi +dkms multilib +tools wayland +X abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_s390_32 abi_s390_64
-KEYWORDS=-* ~amd64
-LICENSE=GPL-2 NVIDIA-r2
-PDEPEND=tools? ( x11-misc/nvidia-settings:4 )
-RDEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=virtual/opencl-3 !!x11-drivers/nvidia-drivers:3 !!x11-drivers/nvidia-drivers:5 acpi? ( sys-power/acpid ) dkms? ( ~sys-kernel/nvidia-drivers-dkms-470.239.06:4 ) wayland? ( ~gui-libs/egl-wayland-1.1.7 ) X? ( >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXext-1.3.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] sys-libs/zlib[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-REQUIRED_USE=tools? ( X )
-RESTRICT=bindist mirror strip
-SLOT=4
-SRC_URI=amd64? ( https://us.download.nvidia.com/XFree86/Linux-x86_64/470.239.06/NVIDIA-Linux-x86_64-470.239.06.run )
-_eclasses_=eqawarn 6bd80a2f74f3b59c77b180f76c693256 flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 multibuild 45df57b1877333d70a9e894f6c8fdb3a multilib 7e1347c006a76bb812f3a9f663b79991 multilib-build 8cdc28ee17e24f9f57730a28fe166a21 multilib-minimal b93489cf816ff90770a3c1c61b25db44 portability 01f478fa22185b3606f2d4adea4675ed toolchain-funcs 948855ec7ad9f11351edf9066708dfa9
-_md5_=530a0db51fe3c19b1efca7ea400be7d0
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-470.256.02 b/metadata/md5-cache/x11-drivers/nvidia-drivers-470.256.02
new file mode 100644
index 00000000..46158440
--- /dev/null
+++ b/metadata/md5-cache/x11-drivers/nvidia-drivers-470.256.02
@@ -0,0 +1,17 @@
+BDEPEND=sys-devel/m4 virtual/pkgconfig dev-util/pahole sys-apps/kmod[tools] modules-sign? ( dev-libs/openssl virtual/pkgconfig ) virtual/pkgconfig
+DEFINED_PHASES=compile install postinst preinst prepare setup unpack
+DEPEND=acct-group/video persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) tools? ( x11-misc/nvidia-settings:4 ) x11-base/xorg-proto x11-libs/libX11 x11-libs/libXext tools? ( x11-misc/nvidia-settings:4 ) virtual/linux-sources
+DESCRIPTION=NVIDIA Accelerated Graphics Driver
+EAPI=8
+HOMEPAGE=https://www.nvidia.com/download/index.aspx
+IDEPEND=sys-apps/kmod[tools]
+INHERIT=desktop flag-o-matic linux-mod-r1 multilib readme.gentoo-r1 systemd toolchain-funcs unpacker user-info
+IUSE=abi_x86_32 abi_x86_64 +acpi +dkms +persistenced +tools +X dist-kernel modules-compress modules-sign +strip
+KEYWORDS=-* amd64
+LICENSE=NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl
+RDEPEND=acct-group/video persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) tools? ( x11-misc/nvidia-settings:4 ) sys-libs/glibc !!x11-drivers/nvidia-drivers:3 !!x11-drivers/nvidia-drivers:5 acpi? ( sys-power/acpid ) dkms? ( ~sys-kernel/nvidia-drivers-dkms-470.256.02:4 ) X? ( media-libs/libglvnd[X,abi_x86_32(-)?] x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) sys-apps/kmod[tools] dist-kernel? ( virtual/dist-kernel:= )
+RESTRICT=strip
+SLOT=4
+SRC_URI=https://download.nvidia.com/XFree86/Linux-x86_64/470.256.02/NVIDIA-Linux-x86_64-470.256.02.run https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-470.256.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-470.256.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-470.256.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-470.256.02.tar.bz2
+_eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 dist-kernel-utils 55a979ee597f57f3b478d503f9af23e4 edo 367e103a74bf77e6a8da7894d999fa3c flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 linux-info ea4122ba1d8791a12b78e53f9510a2e3 linux-mod-r1 c3684e27e002b9857ed37bc4e877e47a mount-boot-utils 69218c024651aa10db01df7e8a5b63e0 multilib 7e1347c006a76bb812f3a9f663b79991 multiprocessing e644caa6eb7ce7e5ab0864383ac13ad9 readme.gentoo-r1 32b48460d813533d85f082897cec1b80 systemd 0f241b5c9f3758c3d3423df59a7f655a toolchain-funcs 948855ec7ad9f11351edf9066708dfa9 unpacker fb4b84181244b3b9990fa0bf40232dd2 user-info 9951b1a0e4f026d16c33a001fd2d5cdf
+_md5_=3befca3eaadc7434083fdefa7e8e818e
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-535.171.04-r1 b/metadata/md5-cache/x11-drivers/nvidia-drivers-535.171.04-r1
deleted file mode 100644
index 572f2712..00000000
--- a/metadata/md5-cache/x11-drivers/nvidia-drivers-535.171.04-r1
+++ /dev/null
@@ -1,16 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test
-DEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-DESCRIPTION=NVIDIA Accelerated Graphics Driver
-EAPI=6
-INHERIT=flag-o-matic multilib-minimal portability toolchain-funcs
-IUSE=acpi +dkms multilib +tools wayland +X abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_s390_32 abi_s390_64
-KEYWORDS=-* ~amd64
-LICENSE=GPL-2 NVIDIA-r2
-PDEPEND=tools? ( x11-misc/nvidia-settings:5 )
-RDEPEND=acct-group/video acct-user/nvpd net-libs/libtirpc X? ( >=x11-libs/libvdpau-1.0[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] media-libs/libglvnd[X,abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) >=virtual/opencl-3 !!x11-drivers/nvidia-drivers:3 !!x11-drivers/nvidia-drivers:4 acpi? ( sys-power/acpid ) dkms? ( ~sys-kernel/nvidia-drivers-dkms-535.171.04:5 ) wayland? ( gui-libs/egl-gbm >=gui-libs/egl-wayland-1.1.10 ) X? ( >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXext-1.3.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] sys-libs/zlib[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-REQUIRED_USE=tools? ( X )
-RESTRICT=bindist mirror strip
-SLOT=5
-SRC_URI=amd64? ( https://us.download.nvidia.com/XFree86/Linux-x86_64/535.171.04/NVIDIA-Linux-x86_64-535.171.04.run )
-_eclasses_=eqawarn 6bd80a2f74f3b59c77b180f76c693256 flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 multibuild 45df57b1877333d70a9e894f6c8fdb3a multilib 7e1347c006a76bb812f3a9f663b79991 multilib-build 8cdc28ee17e24f9f57730a28fe166a21 multilib-minimal b93489cf816ff90770a3c1c61b25db44 portability 01f478fa22185b3606f2d4adea4675ed toolchain-funcs 948855ec7ad9f11351edf9066708dfa9
-_md5_=b055e246d730064a4481094355107e25
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02 b/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02
new file mode 100644
index 00000000..63358f03
--- /dev/null
+++ b/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02
@@ -0,0 +1,17 @@
+BDEPEND=sys-devel/m4 virtual/pkgconfig dev-util/pahole sys-apps/kmod[tools] modules-sign? ( dev-libs/openssl virtual/pkgconfig ) virtual/pkgconfig
+DEFINED_PHASES=compile install postinst preinst prepare setup unpack
+DEPEND=acct-group/video X? ( x11-libs/libpciaccess ) persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) tools? ( x11-misc/nvidia-settings:5 ) x11-base/xorg-proto x11-libs/libX11 x11-libs/libXext tools? ( x11-misc/nvidia-settings:5 ) virtual/linux-sources
+DESCRIPTION=NVIDIA Accelerated Graphics Driver
+EAPI=8
+HOMEPAGE=https://www.nvidia.com/download/index.aspx
+IDEPEND=sys-apps/kmod[tools]
+INHERIT=desktop flag-o-matic linux-mod-r1 readme.gentoo-r1 systemd toolchain-funcs unpacker user-info
+IUSE=abi_x86_32 abi_x86_64 +acpi +dkms +persistenced +powerd +tools +wayland +X dist-kernel modules-compress modules-sign +strip
+KEYWORDS=-* amd64
+LICENSE=NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl
+RDEPEND=acct-group/video X? ( x11-libs/libpciaccess ) persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) tools? ( x11-misc/nvidia-settings:5 ) dev-libs/openssl:0/3 sys-libs/glibc !!x11-drivers/nvidia-drivers:3 !!x11-drivers/nvidia-drivers:4 acpi? ( sys-power/acpid ) dkms? ( ~sys-kernel/nvidia-drivers-dkms-550.107.02:5 ) X? ( media-libs/libglvnd[X,abi_x86_32(-)?] x11-libs/libX11[abi_x86_32(-)?] x11-libs/libXext[abi_x86_32(-)?] ) powerd? ( sys-apps/dbus[abi_x86_32(-)?] ) wayland? ( gui-libs/egl-gbm >=gui-libs/egl-wayland-1.1.10 ) sys-apps/kmod[tools] dist-kernel? ( virtual/dist-kernel:= )
+RESTRICT=strip
+SLOT=5
+SRC_URI=https://download.nvidia.com/XFree86/Linux-x86_64/550.107.02/NVIDIA-Linux-x86_64-550.107.02.run https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-550.107.02.tar.bz2
+_eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 dist-kernel-utils 55a979ee597f57f3b478d503f9af23e4 edo 367e103a74bf77e6a8da7894d999fa3c flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 linux-info ea4122ba1d8791a12b78e53f9510a2e3 linux-mod-r1 c3684e27e002b9857ed37bc4e877e47a mount-boot-utils 69218c024651aa10db01df7e8a5b63e0 multilib 7e1347c006a76bb812f3a9f663b79991 multiprocessing e644caa6eb7ce7e5ab0864383ac13ad9 readme.gentoo-r1 32b48460d813533d85f082897cec1b80 systemd 0f241b5c9f3758c3d3423df59a7f655a toolchain-funcs 948855ec7ad9f11351edf9066708dfa9 unpacker fb4b84181244b3b9990fa0bf40232dd2 user-info 9951b1a0e4f026d16c33a001fd2d5cdf
+_md5_=2fac562d64e7307936878520e0cccdfd
diff --git a/metadata/md5-cache/x11-misc/nvidia-settings-390.157-r6 b/metadata/md5-cache/x11-misc/nvidia-settings-390.157-r7
index cb99b9f2..1dd623bd 100644
--- a/metadata/md5-cache/x11-misc/nvidia-settings-390.157-r6
+++ b/metadata/md5-cache/x11-misc/nvidia-settings-390.157-r7
@@ -1,13 +1,14 @@
DEFINED_PHASES=compile install prepare
DEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings:4 !!x11-misc/nvidia-settings:5 x11-drivers/nvidia-drivers:3 virtual/pkgconfig x11-base/xorg-proto
DESCRIPTION=NVIDIA Linux X11 Settings Utility
-EAPI=6
+EAPI=8
HOMEPAGE=http://www.nvidia.com/
INHERIT=desktop multilib toolchain-funcs
KEYWORDS=-* amd64
LICENSE=GPL-2
RDEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings:4 !!x11-misc/nvidia-settings:5 x11-drivers/nvidia-drivers:3
+RESTRICT=strip
SLOT=3
SRC_URI=https://github.com/NVIDIA/nvidia-settings/archive/refs/tags/390.157.tar.gz -> nvidia-settings-390.157.tar.gz
_eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 multilib 7e1347c006a76bb812f3a9f663b79991 toolchain-funcs 948855ec7ad9f11351edf9066708dfa9
-_md5_=f45bed1e3bdbb7675e8afdb7d9df3a62
+_md5_=e7a128fba637672f8ead6d9a9715ccf8
diff --git a/metadata/md5-cache/x11-misc/nvidia-settings-470.239.06-r1 b/metadata/md5-cache/x11-misc/nvidia-settings-470.256.02
index 6b07bd59..45a96d9c 100644
--- a/metadata/md5-cache/x11-misc/nvidia-settings-470.239.06-r1
+++ b/metadata/md5-cache/x11-misc/nvidia-settings-470.256.02
@@ -1,13 +1,14 @@
DEFINED_PHASES=compile install prepare
DEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings:3 !!x11-misc/nvidia-settings:5 x11-drivers/nvidia-drivers:4 virtual/pkgconfig x11-base/xorg-proto
DESCRIPTION=NVIDIA Linux X11 Settings Utility
-EAPI=6
+EAPI=8
HOMEPAGE=http://www.nvidia.com/
INHERIT=desktop multilib toolchain-funcs
KEYWORDS=-* amd64
LICENSE=GPL-2
RDEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings:3 !!x11-misc/nvidia-settings:5 x11-drivers/nvidia-drivers:4
+RESTRICT=strip
SLOT=4
-SRC_URI=https://github.com/NVIDIA/nvidia-settings/archive/refs/tags/470.239.06.tar.gz -> nvidia-settings-470.239.06.tar.gz
+SRC_URI=https://github.com/NVIDIA/nvidia-settings/archive/refs/tags/470.256.02.tar.gz -> nvidia-settings-470.256.02.tar.gz
_eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 multilib 7e1347c006a76bb812f3a9f663b79991 toolchain-funcs 948855ec7ad9f11351edf9066708dfa9
-_md5_=9bb5a19ab097357b69d9c0d35fb11351
+_md5_=bc991da2d4e110c8278dc4997d785765
diff --git a/metadata/md5-cache/x11-misc/nvidia-settings-535.171.04-r1 b/metadata/md5-cache/x11-misc/nvidia-settings-550.107.02
index e3d90eaa..9b9ed396 100644
--- a/metadata/md5-cache/x11-misc/nvidia-settings-535.171.04-r1
+++ b/metadata/md5-cache/x11-misc/nvidia-settings-550.107.02
@@ -1,13 +1,14 @@
DEFINED_PHASES=compile install prepare
DEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings:3 !!x11-misc/nvidia-settings:4 x11-drivers/nvidia-drivers:5 virtual/pkgconfig x11-base/xorg-proto
DESCRIPTION=NVIDIA Linux X11 Settings Utility
-EAPI=6
+EAPI=8
HOMEPAGE=http://www.nvidia.com/
INHERIT=desktop multilib toolchain-funcs
KEYWORDS=-* amd64
LICENSE=GPL-2
RDEPEND=x11-libs/gtk+:2 x11-libs/gtk+:3 x11-libs/libX11 x11-libs/libXext x11-libs/libXxf86vm x11-libs/gdk-pixbuf-xlib media-libs/mesa x11-libs/pango[X] x11-libs/libXv x11-libs/libXrandr dev-libs/glib:2 dev-libs/jansson x11-libs/cairo >=x11-libs/libvdpau-1.0 !!x11-misc/nvidia-settings:3 !!x11-misc/nvidia-settings:4 x11-drivers/nvidia-drivers:5
+RESTRICT=strip
SLOT=5
-SRC_URI=https://github.com/NVIDIA/nvidia-settings/archive/refs/tags/535.171.04.tar.gz -> nvidia-settings-535.171.04.tar.gz
+SRC_URI=https://github.com/NVIDIA/nvidia-settings/archive/refs/tags/550.107.02.tar.gz -> nvidia-settings-550.107.02.tar.gz
_eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 multilib 7e1347c006a76bb812f3a9f663b79991 toolchain-funcs 948855ec7ad9f11351edf9066708dfa9
-_md5_=5f20722a7f061dcd41b55e224e62d2ea
+_md5_=3d5d6aede0deaaed90caf197ad403dcb
diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index
index 1c22eec8..d55f754d 100644
--- a/metadata/pkg_desc_index
+++ b/metadata/pkg_desc_index
@@ -68,7 +68,7 @@ sys-kernel/linux-image-redcore 6.8.12-r1 6.10.9: Redcore Linux Kernel Image
sys-kernel/linux-image-redcore-lts 5.15.166 6.1.109 6.6.50: Redcore Linux LTS Kernel Image
sys-kernel/linux-sources-redcore 6.8.12-r1 6.10.9: Redcore Linux Kernel Sources
sys-kernel/linux-sources-redcore-lts 5.15.166 6.1.109 6.6.50: Redcore Linux LTS Kernel Sources
-sys-kernel/nvidia-drivers-dkms 390.157-r7 470.239.06-r1 535.171.04-r1: NVIDIA driver sources for linux
+sys-kernel/nvidia-drivers-dkms 390.157-r8 470.256.02 550.107.02: NVIDIA driver sources for linux
sys-kernel/tp_smapi-dkms 0.44-r2: IBM ThinkPad SMAPI BIOS driver sources
sys-kernel/vhba-dkms 20240202-r2: Virtual (SCSI) Host Bus Adapter kernel module for the CDEmu suite sources
sys-kernel/virtualbox-modules-dkms 7.0.20-r1: Kernel Modules source for Virtualbox
@@ -82,10 +82,10 @@ virtual/tmpfiles 1.314.1337-r1: Virtual to select between different tmpfiles.d h
virtual/udev 314.1337-r1: Virtual to select between different udev daemon providers
www-client/ungoogled-chromium 128.0.6613.84: Modifications to Chromium for removing Google integration and enhancing privacy
x11-base/xorg-drivers 21.1-r100: Meta package containing deps on all xorg drivers (dummy package)
-x11-drivers/nvidia-drivers 390.157-r8 470.239.06-r1 535.171.04-r1: NVIDIA Accelerated Graphics Driver
+x11-drivers/nvidia-drivers 390.157-r9 470.256.02 550.107.02: NVIDIA Accelerated Graphics Driver
x11-libs/gtk+ 2.24.33-r5 3.24.41-r5: Gimp ToolKit +
x11-misc/nvidia-prime 314: NVIDIA Prime Render Offload configuration and utilities
-x11-misc/nvidia-settings 390.157-r6 470.239.06-r1 535.171.04-r1: NVIDIA Linux X11 Settings Utility
+x11-misc/nvidia-settings 390.157-r7 470.256.02 550.107.02: NVIDIA Linux X11 Settings Utility
x11-misc/pcmanfm-qt-share 1337-r1: PCManFM-QT custom action to share folder using Samba
x11-themes/material-icon-theme 1.314.1337-r2: Icon theme following the Google's material design specifications
x11-themes/redcore-artwork-calamares 1.314.1337-r6: Redcore Linux branding component for Calamares
diff --git a/sys-kernel/nvidia-drivers-dkms/Manifest b/sys-kernel/nvidia-drivers-dkms/Manifest
index 33271e77..420ba133 100644
--- a/sys-kernel/nvidia-drivers-dkms/Manifest
+++ b/sys-kernel/nvidia-drivers-dkms/Manifest
@@ -1,3 +1,3 @@
DIST NVIDIA-Linux-x86_64-390.157.run 85835541 BLAKE2B 44b855cd11f3b2f231f9fb90492ae2e67a67ea3ea83c413e7c90956d38c9730a8bd0321281ae03c6afce633d102f5b499aed25622b9bfd31bdd2c98f0717e95b SHA512 4780503a4cff0180b1b1f37d20a6ba3438dd78b51fa7f69b98d35521835e5d61099129746929d51d63afa2d47b672b3e145e1e1897584dc3799e7f822c5b3a0a
-DIST NVIDIA-Linux-x86_64-470.239.06.run 272849102 BLAKE2B 556c8f7058b83d8c4c7ccb2f62619ac001f7c3868b80ee091e2949fb7b35e136fec83c15efcf4dd4c99d312f8c36f83c76e250d18d091e053355396b8347af11 SHA512 92bdfb11db405071cd58deed2a0853448932657e256258e0a0bda5069f00485e2b6e49b4a0eeff499a4991be4f884273f3564c164110b1ed1f5d924506f13e2d
-DIST NVIDIA-Linux-x86_64-535.171.04.run 341705434 BLAKE2B 2d5dc19e8f80710a3a4324555ccabbf262552ebd71454a60541d9a726ace74697f37d112f8c38999bd5eb577dbf96cbd8c6c835a17c72140ad8deb96036a8a0a SHA512 5db0f8bedb0667d08beb56592cb1f1d3510906dd9b931899dabac289a73f26ff35d68ede8523af4e3226421fb5c18b86106c8f1cb4ad635a53cd037c46e8762f
+DIST NVIDIA-Linux-x86_64-470.256.02.run 272850014 BLAKE2B 0fdc867f92b82b2a60810c3b43751cad7ac2c39928c92c6c343c0c6044f4d7d923d93b8599db3f7c999c0ee7d16940e65d991a61cbb30e1d9e49c5639ac6bdc8 SHA512 a837946dd24d7945c1962a695f1f31965f3ceb6927f52cd08fd51b8db138b7a888bbeab69243f5c8468a7bd7ccd47f5dbdb48a1ca81264866c1ebb7d88628f88
+DIST NVIDIA-Linux-x86_64-550.107.02.run 307251605 BLAKE2B 767300982ac4b28fc731b250141cd0f5e9531424dcecd816e995c6fe63a8e2c15c0a42f9324f93c19da12868fd48abbaa15a1de752b675b88fa45a3c4385f40a SHA512 da0a15f87a4e6562f9a5e087a76b92de873db4849c8fdbf57d7dfe9d524e55dfbd578aef38d8818b9cb712a905a31fd0b97e399c74613943810545c92cf30f9d
diff --git a/sys-kernel/nvidia-drivers-dkms/files/dkms470.patch b/sys-kernel/nvidia-drivers-dkms/files/dkms470.patch
index 7d8c4eaf..6e1f0450 100644
--- a/sys-kernel/nvidia-drivers-dkms/files/dkms470.patch
+++ b/sys-kernel/nvidia-drivers-dkms/files/dkms470.patch
@@ -5,8 +5,8 @@ diff -Nur a/kernel/dkms.conf b/kernel/dkms.conf
-PACKAGE_NAME="nvidia"
-PACKAGE_VERSION="__VERSION_STRING"
+PACKAGE_NAME="nvidia-drivers-dkms"
-+PACKAGE_VERSION="470.239.06"
-+BUILD_EXCLUSIVE_KERNEL="^(5\.[0-9]+\.|6\.[0-8]\.)" # only build for kernels v5.x.x up to and including v6.8.x
++PACKAGE_VERSION="470.256.02"
++BUILD_EXCLUSIVE_KERNEL="^(5\.[0-9]+\.|6\.[0-9]\.)" # only build for kernels v5.x.x up to and including v6.9.x
AUTOINSTALL="yes"
# By default, DKMS will add KERNELRELEASE to the make command line; however,
diff --git a/sys-kernel/nvidia-drivers-dkms/files/dkms535.patch b/sys-kernel/nvidia-drivers-dkms/files/dkms550.patch
index f7ac9a7d..0d782858 100644
--- a/sys-kernel/nvidia-drivers-dkms/files/dkms535.patch
+++ b/sys-kernel/nvidia-drivers-dkms/files/dkms550.patch
@@ -5,8 +5,8 @@ diff -Nur a/kernel/dkms.conf b/kernel/dkms.conf
-PACKAGE_NAME="nvidia"
-PACKAGE_VERSION="__VERSION_STRING"
+PACKAGE_NAME="nvidia-drivers-dkms"
-+PACKAGE_VERSION="535.171.04"
-+BUILD_EXCLUSIVE_KERNEL="^(5\.[0-9]+\.|6\.[0-8]\.)" # only build for kernels v5.x.x up to and including v6.8.x
++PACKAGE_VERSION="550.107.02"
++BUILD_EXCLUSIVE_KERNEL="^(5\.[0-9]+\.|6\.[0-9]\.|\.|6\.1[0-0]\.)" # only build for kernels v5.x.x up to and including v6.10.x
AUTOINSTALL="yes"
# By default, DKMS will add KERNELRELEASE to the make command line; however,
@@ -35,8 +35,8 @@ diff -Nur a/kernel-open/dkms.conf b/kernel-open/dkms.conf
-PACKAGE_NAME="nvidia"
-PACKAGE_VERSION="__VERSION_STRING"
+PACKAGE_NAME="nvidia-drivers-dkms"
-+PACKAGE_VERSION="535.171.04"
-+BUILD_EXCLUSIVE_KERNEL="^(5\.[0-9]+\.|6\.[0-8]\.)" # only build for kernels v5.x.x up to and including v6.8.x
++PACKAGE_VERSION="550.107.02"
++BUILD_EXCLUSIVE_KERNEL="^(5\.[0-9]+\.|6\.[0-9]\.|\.|6\.1[0-0]\.)" # only build for kernels v5.x.x up to and including v6.10.x
AUTOINSTALL="yes"
# By default, DKMS will add KERNELRELEASE to the make command line; however,
diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.157-r7.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.157-r8.ebuild
index b73198e0..d96a4392 100644
--- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.157-r7.ebuild
+++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-390.157-r8.ebuild
@@ -15,6 +15,7 @@ LICENSE="GPL-2 NVIDIA-r2"
SLOT="3"
KEYWORDS="amd64"
IUSE=""
+RESTRICT="strip"
DEPEND="sys-kernel/dkms"
RDEPEND="${DEPEND}
diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.239.06-r1.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.256.02.ebuild
index fc69ba78..651e3ef6 100644
--- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.239.06-r1.ebuild
+++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-470.256.02.ebuild
@@ -15,6 +15,7 @@ LICENSE="GPL-2 NVIDIA-r2"
SLOT="4"
KEYWORDS="amd64"
IUSE=""
+RESTRICT="strip"
DEPEND="sys-kernel/dkms"
RDEPEND="${DEPEND}
diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-535.171.04-r1.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02.ebuild
index 55ebfe5e..1bc82c27 100644
--- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-535.171.04-r1.ebuild
+++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02.ebuild
@@ -15,6 +15,7 @@ LICENSE="GPL-2 NVIDIA-r2"
SLOT="5"
KEYWORDS="amd64"
IUSE="kernel-open"
+RESTRICT="strip"
DEPEND="sys-kernel/dkms"
RDEPEND="${DEPEND}
@@ -22,7 +23,7 @@ RDEPEND="${DEPEND}
!!sys-kernel/nvidia-drivers-dkms:4"
PATCHES=(
- "${FILESDIR}"/dkms535.patch
+ "${FILESDIR}"/dkms550.patch
)
S="${WORKDIR}/${AMD64_NV_PACKAGE}"
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 33271e77..5af3f879 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -1,3 +1,15 @@
DIST NVIDIA-Linux-x86_64-390.157.run 85835541 BLAKE2B 44b855cd11f3b2f231f9fb90492ae2e67a67ea3ea83c413e7c90956d38c9730a8bd0321281ae03c6afce633d102f5b499aed25622b9bfd31bdd2c98f0717e95b SHA512 4780503a4cff0180b1b1f37d20a6ba3438dd78b51fa7f69b98d35521835e5d61099129746929d51d63afa2d47b672b3e145e1e1897584dc3799e7f822c5b3a0a
-DIST NVIDIA-Linux-x86_64-470.239.06.run 272849102 BLAKE2B 556c8f7058b83d8c4c7ccb2f62619ac001f7c3868b80ee091e2949fb7b35e136fec83c15efcf4dd4c99d312f8c36f83c76e250d18d091e053355396b8347af11 SHA512 92bdfb11db405071cd58deed2a0853448932657e256258e0a0bda5069f00485e2b6e49b4a0eeff499a4991be4f884273f3564c164110b1ed1f5d924506f13e2d
-DIST NVIDIA-Linux-x86_64-535.171.04.run 341705434 BLAKE2B 2d5dc19e8f80710a3a4324555ccabbf262552ebd71454a60541d9a726ace74697f37d112f8c38999bd5eb577dbf96cbd8c6c835a17c72140ad8deb96036a8a0a SHA512 5db0f8bedb0667d08beb56592cb1f1d3510906dd9b931899dabac289a73f26ff35d68ede8523af4e3226421fb5c18b86106c8f1cb4ad635a53cd037c46e8762f
+DIST NVIDIA-Linux-x86_64-470.256.02.run 272850014 BLAKE2B 0fdc867f92b82b2a60810c3b43751cad7ac2c39928c92c6c343c0c6044f4d7d923d93b8599db3f7c999c0ee7d16940e65d991a61cbb30e1d9e49c5639ac6bdc8 SHA512 a837946dd24d7945c1962a695f1f31965f3ceb6927f52cd08fd51b8db138b7a888bbeab69243f5c8468a7bd7ccd47f5dbdb48a1ca81264866c1ebb7d88628f88
+DIST NVIDIA-Linux-x86_64-550.107.02.run 307251605 BLAKE2B 767300982ac4b28fc731b250141cd0f5e9531424dcecd816e995c6fe63a8e2c15c0a42f9324f93c19da12868fd48abbaa15a1de752b675b88fa45a3c4385f40a SHA512 da0a15f87a4e6562f9a5e087a76b92de873db4849c8fdbf57d7dfe9d524e55dfbd578aef38d8818b9cb712a905a31fd0b97e399c74613943810545c92cf30f9d
+DIST nvidia-installer-390.157.tar.bz2 150323 BLAKE2B 8058ca87a6dea956d564af9f7eab9b1fc82b1f2382bd5cb2f6d97cbe2e19292533522d5f8f2eacbeb16520372715fcb72f8f9b0998962af5d4e75522c8d74524 SHA512 93a7ece648602157496c8e27a88864ede341a100f5328a4c1a25faf8f0b94d252060e5e2f71d0c302fd0566c10773c30b76b3b5f431d8039b71c90a7969f7d7e
+DIST nvidia-installer-470.256.02.tar.bz2 146269 BLAKE2B 4402e725c8fd0157eb84d4ec140a33f97e873014577487ef1e32fb8921cabe79c60ff46532e5bfaabb2b6ac894f7c80086dbab19e61906e2e27346fb85f98829 SHA512 c962dc17d9696256d1ebedcaeb3010994f2ce3895aedc47987599ebfec132a9b9a249d2ece6502b15bd4a93f9b0106aa13487a7da5f64199c274ce11eba27cfd
+DIST nvidia-installer-550.107.02.tar.bz2 155423 BLAKE2B 5bd3d57dfd9ca70c38908f5b397d71802bd78ca1de4c6d9b32de147e39adac61028ca56848b2cb10f13717046204b690c86c880034d1f386df9298e7f15c4b65 SHA512 2120f31f9ab92bb3a8da6991c4d5df6cf50ed81e5c6eadcf23f6af98f08ef674e137ac2bf62f1bf76d94f005d0fc9ef2a130d2e606fca929229f358ac51377d1
+DIST nvidia-modprobe-390.157.tar.bz2 35306 BLAKE2B 80d202b39c2f95ec0f909712c2e101483af50124092c32efb33bd98ff58ddfb97b737ff07f1ddc941f688c1b4c26a15f392566d522e18506771f10422fcd571c SHA512 109bbe24a3758b568ea65fe1e9d78f69fae6108ec0497b796c885a3912825fe04ffd7389a3e22987f1a10a2926bf6eaa384faabc59478aa3ee244dd3ac91c6d3
+DIST nvidia-modprobe-470.256.02.tar.bz2 38769 BLAKE2B 0db444b09b0b6d24c04877fae95249e781d82b3141f90eb05d869b64d2b6e65ad00bf44c4e427c64dbd4765fa99a8699f80a1d95b00c66137a54dc878d7ea298 SHA512 c1cbfa6c8e188e5a5eb5d390b9a903406cbff103d212fc30e611e4023be3fde896ad84e8bb45b030beb5d1bcd8155c9e55a8f9636c45ce1e2a5c03f672989a31
+DIST nvidia-modprobe-550.107.02.tar.bz2 41486 BLAKE2B 4c74caa2f91bda9ad96e6366986e2934776cc31ae3b0dd596fe5d0392cf023a766e2fb2fc765d5886e872935028fda0836df1826fdeea2e2a76701420021778e SHA512 6fc755b50f6ccf25812ed6936560784a7ea5766152f04631829b192a070b47ba68296bc215b60d1f7a9773f2db6388214d55e115794db8cf944a6f64d19ce34f
+DIST nvidia-persistenced-390.157.tar.bz2 48654 BLAKE2B 2cf6c92da90acff55e8c180a06b0c6a29d48be9fd8ca3c541202fd14f0697220fba6b66452942aa7ae7cc8821f5c5eb9fa8f7a31d2248624e5f9141d83a176b8 SHA512 70f0707ed6f2b877e69ef90cf782f66cbc9d2071db53ca09ceb7b89427b0fe176708517340621fa251539b7d481b238adeeb60261674eed74de1f62db6dbb72e
+DIST nvidia-persistenced-470.256.02.tar.bz2 46567 BLAKE2B 8f837322a3b88412fd2f6acf38721b49a6cb444fbd842d652519e5596f2e545d8f06bbdf017f46a22301ce87455f96147fab2829ca5fbf26131ec3e4a772e282 SHA512 4fd19258649b7d39945fb5c8578bf11ab118617dd14f3d11cdf15cb3fe77daf7b4719e4ae57af59031b1b809d02f4e8e8afed0ec60b9d0aed4d2488bd3013cd9
+DIST nvidia-persistenced-550.107.02.tar.bz2 49661 BLAKE2B 695bcf0211194263b38444305c5b6bd6a13331ab57c05bd85d9ea5e007af37e34b96bc450fbcb92bb12050d75c3885d51563fdc2a827f25a433283b067e204ee SHA512 6b398f53a3670d73c13be364d1c7acd563878ebe1162ff5fd0f1f3749c20284a8dd9d98cadccf1fc0b354f353006a3dd2acfd066f98601e6fe1577f0dc59631f
+DIST nvidia-xconfig-390.157.tar.bz2 107399 BLAKE2B 0cbb3b1ba508ddc3ba4a161c290b31bf7a67f67880bdbd01171a962c5fa97ca945b1ef17932403f8589309380743f1da632c728d8accb6d4e56dbd895e7486bb SHA512 50b390811c9bf091b14add41f886925b17496b41006b7d3981d2398caa65cf5db8a579c8cebed78278384bf3acc629befb07b54339c61abcc75852c0dcb8b8ca
+DIST nvidia-xconfig-470.256.02.tar.bz2 108698 BLAKE2B e468574e4bc57e7279d4120e2b08a201671b50d408be0c530eabe5da7d45daaf21cbf5c7fa31410d0d732fe8ea1551cbfb21d1ae193c1b3f5b5c50c764c9e236 SHA512 9dcec1e0c2b56b4d38a5f2c76086302f8bc0860cc15012cce29c3a5062f801a48b6a2bb78344361b07a2717b58502783441a2daf402d9973a17526175b1f15ca
+DIST nvidia-xconfig-550.107.02.tar.bz2 111170 BLAKE2B dbf2b0b7f7b71f17ce5a0b6ae1c5346a573ea11163b24c4bce1b18281d4af70f38458bc122c39ad948242a8cfc37b68e696141b8dd3ce16f9ae7fb3fb61af735 SHA512 a7b9ba8d542041b273deaeb354c398fba4241dfdcf68be71e1c1138c925206db0f7ce2945c5ec92eddbcdbf240c5340802b3989e6140593828d1eb79854730e3
diff --git a/x11-drivers/nvidia-drivers/files/nouveau.conf b/x11-drivers/nvidia-drivers/files/nouveau.conf
deleted file mode 100644
index 00c6f588..00000000
--- a/x11-drivers/nvidia-drivers/files/nouveau.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-blacklist nouveau
-options nouveau modeset=0
-alias nouveau off
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-390.conf b/x11-drivers/nvidia-drivers/files/nvidia-390.conf
new file mode 100644
index 00000000..6cfc0e6a
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-390.conf
@@ -0,0 +1,23 @@
+# NVIDIA drivers options
+# See /usr/share/doc/nvidia-drivers-*/README.txt* for more information.
+
+# nvidia-drivers and nouveau cannot be used at same time.
+# Comment out the following line if you wish to allow nouveau.
+blacklist nouveau
+options nouveau modeset=0
+alias nouveau off
+
+# !!! Security Warning !!!
+# Do not change the DeviceFile options unless you know what you are doing.
+# Only add trusted users to the 'video' group, these users may be able to
+# crash, compromise, or irreparably damage the machine.
+options nvidia \
+ NVreg_DeviceFileGID=@VIDEOGID@ \
+ NVreg_DeviceFileMode=432 \
+ NVreg_DeviceFileUID=0 \
+ NVreg_ModifyDeviceFiles=1
+
+# Should be no need to touch anything below.
+alias char-major-195 nvidia
+alias /dev/nvidiactl char-major-195
+remove nvidia modprobe -r --ignore-remove nvidia-drm nvidia-modeset nvidia-uvm nvidia
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-470.conf b/x11-drivers/nvidia-drivers/files/nvidia-470.conf
new file mode 100644
index 00000000..a20f2a19
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-470.conf
@@ -0,0 +1,33 @@
+# NVIDIA drivers options
+# See /usr/share/doc/nvidia-drivers-*/README.txt* for more information.
+
+# nvidia-drivers and nouveau cannot be used at same time.
+# Comment out the following line if you wish to allow nouveau.
+blacklist nouveau
+options nouveau modeset=0
+alias nouveau off
+
+# Kernel Mode Setting (needed for wayland but is hardly usable with legacy 470)
+# Enabling may possibly cause issues with SLI and Reverse PRIME.
+#options nvidia-drm modeset=1
+
+# Suspend options. Allocations=0 recommended over =1 unless enable nvidia's
+# systemd sleep services (nvidia-hibernate, nvidia-resume, nvidia-suspend).
+options nvidia \
+ NVreg_PreserveVideoMemoryAllocations=0 \
+ NVreg_TemporaryFilePath=/var/tmp
+
+# !!! Security Warning !!!
+# Do not change the DeviceFile options unless you know what you are doing.
+# Only add trusted users to the 'video' group, these users may be able to
+# crash, compromise, or irreparably damage the machine.
+options nvidia \
+ NVreg_DeviceFileGID=@VIDEOGID@ \
+ NVreg_DeviceFileMode=432 \
+ NVreg_DeviceFileUID=0 \
+ NVreg_ModifyDeviceFiles=1
+
+# Should be no need to touch anything below.
+alias char-major-195 nvidia
+alias /dev/nvidiactl char-major-195
+remove nvidia modprobe -r --ignore-remove nvidia-drm nvidia-modeset nvidia-uvm nvidia
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-545.conf b/x11-drivers/nvidia-drivers/files/nvidia-545.conf
new file mode 100644
index 00000000..ecb549e1
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-545.conf
@@ -0,0 +1,38 @@
+# NVIDIA drivers options
+# See /usr/share/doc/nvidia-drivers-*/README.txt* for more information.
+
+# nvidia-drivers and nouveau cannot be used at same time.
+# Comment out the following line if you wish to allow nouveau.
+blacklist nouveau
+options nouveau modeset=0
+alias nouveau off
+
+# Kernel Mode Setting (notably needed for fbdev and wayland).
+# Enabling may possibly cause issues with SLI and Reverse PRIME.
+#options nvidia-drm modeset=1
+
+# Enable experimental framebuffer console support (requires modeset=1 above).
+# Replaces efifb, simpledrm, or similar once loaded (emphasis on being
+# experimental, "may" cause issues X mode switching, sleep, or more).
+#options nvidia-drm fbdev=1
+
+# Suspend options. Allocations=0 recommended over =1 unless enable nvidia's
+# systemd sleep services (nvidia-hibernate, nvidia-resume, nvidia-suspend).
+options nvidia \
+ NVreg_PreserveVideoMemoryAllocations=0 \
+ NVreg_TemporaryFilePath=/var/tmp
+
+# !!! Security Warning !!!
+# Do not change the DeviceFile options unless you know what you are doing.
+# Only add trusted users to the 'video' group, these users may be able to
+# crash, compromise, or irreparably damage the machine.
+options nvidia \
+ NVreg_DeviceFileGID=@VIDEOGID@ \
+ NVreg_DeviceFileMode=432 \
+ NVreg_DeviceFileUID=0 \
+ NVreg_ModifyDeviceFiles=1
+
+# Should be no need to touch anything below.
+alias char-major-195 nvidia
+alias /dev/nvidiactl char-major-195
+remove nvidia modprobe -r --ignore-remove nvidia-drm nvidia-modeset nvidia-uvm nvidia
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.154-clang15.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.154-clang15.patch
new file mode 100644
index 00000000..b08f3589
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-390.154-clang15.patch
@@ -0,0 +1,84 @@
+Kernel's makefiles pass -Werror=strict-prototypes which
+can trigger errors depending on compiler defaults.
+https://bugs.gentoo.org/870238
+https://github.com/NVIDIA/open-gpu-kernel-modules/issues/377
+--- a/kernel/nvidia/nvlink_linux.c
++++ b/kernel/nvidia/nvlink_linux.c
+@@ -639 +639 @@
+-void * NVLINK_API_CALL nvlink_allocLock()
++void * NVLINK_API_CALL nvlink_allocLock(void)
+--- a/kernel/nvidia/os-interface.c
++++ b/kernel/nvidia/os-interface.c
+@@ -879 +879 @@
+-NV_STATUS NV_API_CALL os_flush_cpu_cache()
++NV_STATUS NV_API_CALL os_flush_cpu_cache(void)
+@@ -886 +886 @@
+-NV_STATUS NV_API_CALL os_flush_cpu_cache_all()
++NV_STATUS NV_API_CALL os_flush_cpu_cache_all(void)
+@@ -944 +944 @@
+-void NV_API_CALL os_flush_cpu_write_combine_buffer()
++void NV_API_CALL os_flush_cpu_write_combine_buffer(void)
+@@ -1073 +1073 @@
+-NvU32 NV_API_CALL os_get_cpu_number()
++NvU32 NV_API_CALL os_get_cpu_number(void)
+@@ -1080 +1080 @@
+-NvU32 NV_API_CALL os_get_cpu_count()
++NvU32 NV_API_CALL os_get_cpu_count(void)
+@@ -1155 +1155 @@
+-void NV_API_CALL os_dump_stack()
++void NV_API_CALL os_dump_stack(void)
+--- a/kernel/nvidia-uvm/uvm8_lock.c
++++ b/kernel/nvidia-uvm/uvm8_lock.c
+@@ -312 +312 @@
+-bool __uvm_thread_check_all_unlocked()
++bool __uvm_thread_check_all_unlocked(void)
+--- a/kernel/nvidia-uvm/uvm8_perf_heuristics.c
++++ b/kernel/nvidia-uvm/uvm8_perf_heuristics.c
+@@ -29 +29 @@
+-NV_STATUS uvm_perf_heuristics_init()
++NV_STATUS uvm_perf_heuristics_init(void)
+@@ -44 +44 @@
+-void uvm_perf_heuristics_exit()
++void uvm_perf_heuristics_exit(void)
+--- a/kernel/nvidia-uvm/uvm8_perf_prefetch.c
++++ b/kernel/nvidia-uvm/uvm8_perf_prefetch.c
+@@ -462 +462 @@
+-NV_STATUS uvm_perf_prefetch_init()
++NV_STATUS uvm_perf_prefetch_init(void)
+@@ -500 +500 @@
+-void uvm_perf_prefetch_exit()
++void uvm_perf_prefetch_exit(void)
+--- a/kernel/nvidia-uvm/uvm8_perf_thrashing.c
++++ b/kernel/nvidia-uvm/uvm8_perf_thrashing.c
+@@ -1324 +1324 @@
+-NV_STATUS uvm_perf_thrashing_init()
++NV_STATUS uvm_perf_thrashing_init(void)
+@@ -1401 +1401 @@
+-void uvm_perf_thrashing_exit()
++void uvm_perf_thrashing_exit(void)
+--- a/kernel/nvidia-uvm/uvm8_procfs.c
++++ b/kernel/nvidia-uvm/uvm8_procfs.c
+@@ -61 +61 @@
+-NV_STATUS uvm_procfs_init()
++NV_STATUS uvm_procfs_init(void)
+@@ -77 +77 @@
+-void uvm_procfs_exit()
++void uvm_procfs_exit(void)
+@@ -106 +106 @@
+-struct proc_dir_entry *uvm_procfs_get_gpu_base_dir()
++struct proc_dir_entry *uvm_procfs_get_gpu_base_dir(void)
+--- a/kernel/nvidia-uvm/uvm8_push.c
++++ b/kernel/nvidia-uvm/uvm8_push.c
+@@ -103 +103 @@
+-bool uvm_push_info_is_tracking_descriptions()
++bool uvm_push_info_is_tracking_descriptions(void)
+--- a/kernel/nvidia-uvm/uvm8_tools.c
++++ b/kernel/nvidia-uvm/uvm8_tools.c
+@@ -2041 +2041 @@
+-void uvm_tools_flush_events()
++void uvm_tools_flush_events(void)
+--- a/kernel/nvidia-uvm/uvm_common.c
++++ b/kernel/nvidia-uvm/uvm_common.c
+@@ -63 +63 @@
+-bool uvm_debug_prints_enabled()
++bool uvm_debug_prints_enabled(void)
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.141.03-clang15.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.141.03-clang15.patch
new file mode 100644
index 00000000..334f0d1c
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.141.03-clang15.patch
@@ -0,0 +1,110 @@
+Kernel's makefiles pass -Werror=strict-prototypes which
+can trigger errors depending on compiler defaults.
+https://bugs.gentoo.org/870238
+https://github.com/NVIDIA/open-gpu-kernel-modules/issues/377
+--- a/kernel/nvidia/nvlink_linux.c
++++ b/kernel/nvidia/nvlink_linux.c
+@@ -571 +571 @@
+-void * nvlink_allocLock()
++void * nvlink_allocLock(void)
+--- a/kernel/nvidia/os-interface.c
++++ b/kernel/nvidia/os-interface.c
+@@ -1076 +1076 @@
+-NvU32 NV_API_CALL os_get_cpu_number()
++NvU32 NV_API_CALL os_get_cpu_number(void)
+@@ -1083 +1083 @@
+-NvU32 NV_API_CALL os_get_cpu_count()
++NvU32 NV_API_CALL os_get_cpu_count(void)
+@@ -1136 +1136 @@
+-void NV_API_CALL os_dump_stack()
++void NV_API_CALL os_dump_stack(void)
+--- a/kernel/nvidia-uvm/uvm_common.c
++++ b/kernel/nvidia-uvm/uvm_common.c
+@@ -37 +37 @@
+-bool uvm_debug_prints_enabled()
++bool uvm_debug_prints_enabled(void)
+--- a/kernel/nvidia-uvm/uvm_gpu_access_counters.c
++++ b/kernel/nvidia-uvm/uvm_gpu_access_counters.c
+@@ -1527 +1527 @@
+-NV_STATUS uvm_perf_access_counters_init()
++NV_STATUS uvm_perf_access_counters_init(void)
+@@ -1538 +1538 @@
+-void uvm_perf_access_counters_exit()
++void uvm_perf_access_counters_exit(void)
+--- a/kernel/nvidia-uvm/uvm_lock.c
++++ b/kernel/nvidia-uvm/uvm_lock.c
+@@ -337 +337 @@
+-bool __uvm_thread_check_all_unlocked()
++bool __uvm_thread_check_all_unlocked(void)
+--- a/kernel/nvidia-uvm/uvm_migrate.c
++++ b/kernel/nvidia-uvm/uvm_migrate.c
+@@ -795 +795 @@
+-NV_STATUS uvm_migrate_init()
++NV_STATUS uvm_migrate_init(void)
+@@ -821 +821 @@
+-void uvm_migrate_exit()
++void uvm_migrate_exit(void)
+--- a/kernel/nvidia-uvm/uvm_migrate_pageable.c
++++ b/kernel/nvidia-uvm/uvm_migrate_pageable.c
+@@ -979 +979 @@
+-NV_STATUS uvm_migrate_pageable_init()
++NV_STATUS uvm_migrate_pageable_init(void)
+@@ -988 +988 @@
+-void uvm_migrate_pageable_exit()
++void uvm_migrate_pageable_exit(void)
+--- a/kernel/nvidia-uvm/uvm_perf_heuristics.c
++++ b/kernel/nvidia-uvm/uvm_perf_heuristics.c
+@@ -31 +31 @@
+-NV_STATUS uvm_perf_heuristics_init()
++NV_STATUS uvm_perf_heuristics_init(void)
+@@ -50 +50 @@
+-void uvm_perf_heuristics_exit()
++void uvm_perf_heuristics_exit(void)
+--- a/kernel/nvidia-uvm/uvm_perf_prefetch.c
++++ b/kernel/nvidia-uvm/uvm_perf_prefetch.c
+@@ -463 +463 @@
+-NV_STATUS uvm_perf_prefetch_init()
++NV_STATUS uvm_perf_prefetch_init(void)
+@@ -501 +501 @@
+-void uvm_perf_prefetch_exit()
++void uvm_perf_prefetch_exit(void)
+--- a/kernel/nvidia-uvm/uvm_perf_thrashing.c
++++ b/kernel/nvidia-uvm/uvm_perf_thrashing.c
+@@ -1955 +1955 @@
+-NV_STATUS uvm_perf_thrashing_init()
++NV_STATUS uvm_perf_thrashing_init(void)
+@@ -2014 +2014 @@
+-void uvm_perf_thrashing_exit()
++void uvm_perf_thrashing_exit(void)
+--- a/kernel/nvidia-uvm/uvm_procfs.c
++++ b/kernel/nvidia-uvm/uvm_procfs.c
+@@ -49 +49 @@
+-NV_STATUS uvm_procfs_init()
++NV_STATUS uvm_procfs_init(void)
+@@ -69 +69 @@
+-void uvm_procfs_exit()
++void uvm_procfs_exit(void)
+@@ -98 +98 @@
+-struct proc_dir_entry *uvm_procfs_get_gpu_base_dir()
++struct proc_dir_entry *uvm_procfs_get_gpu_base_dir(void)
+@@ -103 +103 @@
+-struct proc_dir_entry *uvm_procfs_get_cpu_base_dir()
++struct proc_dir_entry *uvm_procfs_get_cpu_base_dir(void)
+--- a/kernel/nvidia-uvm/uvm_push.c
++++ b/kernel/nvidia-uvm/uvm_push.c
+@@ -245 +245 @@
+-bool uvm_push_info_is_tracking_descriptions()
++bool uvm_push_info_is_tracking_descriptions(void)
+@@ -250 +250 @@
+-bool uvm_push_info_is_tracking_acquires()
++bool uvm_push_info_is_tracking_acquires(void)
+--- a/kernel/nvidia-uvm/uvm_thread_context.c
++++ b/kernel/nvidia-uvm/uvm_thread_context.c
+@@ -104 +104 @@
+-bool uvm_thread_context_wrapper_is_used()
++bool uvm_thread_context_wrapper_is_used(void)
+--- a/kernel/nvidia-uvm/uvm_tools.c
++++ b/kernel/nvidia-uvm/uvm_tools.c
+@@ -2144 +2144 @@
+-void uvm_tools_flush_events()
++void uvm_tools_flush_events(void)
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drm-outputclass-390.conf b/x11-drivers/nvidia-drivers/files/nvidia-drm-outputclass-390.conf
new file mode 100644
index 00000000..f459c69d
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drm-outputclass-390.conf
@@ -0,0 +1,7 @@
+Section "OutputClass"
+ Identifier "nvidia"
+ MatchDriver "nvidia-drm"
+ Driver "nvidia"
+ Option "AllowEmptyInitialConfiguration"
+ ModulePath "@LIBDIR@/extensions/nvidia"
+EndSection
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-modprobe-390.141-uvm-perms.patch b/x11-drivers/nvidia-drivers/files/nvidia-modprobe-390.141-uvm-perms.patch
new file mode 100644
index 00000000..6ffd42ff
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-modprobe-390.141-uvm-perms.patch
@@ -0,0 +1,12 @@
+Create /dev/nvidia-uvm* by respecting nvidia.conf's permissions.
+--- a/nvidia-modprobe/modprobe-utils/nvidia-modprobe-utils.c
++++ b/nvidia-modprobe/modprobe-utils/nvidia-modprobe-utils.c
+@@ -742,6 +742,6 @@
+ }
+
+- return mknod_helper(major, base_minor, NV_UVM_DEVICE_NAME, NULL) &&
+- mknod_helper(major, base_minor + 1, NV_UVM_TOOLS_DEVICE_NAME, NULL);
++ return mknod_helper(major, base_minor, NV_UVM_DEVICE_NAME, NV_PROC_REGISTRY_PATH) &&
++ mknod_helper(major, base_minor + 1, NV_UVM_TOOLS_DEVICE_NAME, NV_PROC_REGISTRY_PATH);
+ }
+
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.confd b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.confd
new file mode 100644
index 00000000..e06d53c0
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.confd
@@ -0,0 +1,7 @@
+# configuration file for /etc/init.d/nvidia-persistenced
+
+# NVPD_USER: user to run as, needs access to /dev/nvidia* (video group)
+NVPD_USER="nvpd"
+
+# ARGS: additional arguments, see nvidia-persistenced(1)
+ARGS=""
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd
new file mode 100644
index 00000000..27d8bb37
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# SPDX-License-Identifier: MIT
+
+description="Maintain persistent software state in the NVIDIA driver"
+command="nvidia-persistenced"
+command_args="${NVPD_USER:+--user ${NVPD_USER}} ${ARGS}"
+pidfile="/var/run/nvidia-persistenced/nvidia-persistenced.pid"
+
+stop_post() {
+ rmdir "${pidfile%/*}" 2>/dev/null || true
+}
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-powerd.initd b/x11-drivers/nvidia-drivers/files/nvidia-powerd.initd
new file mode 100644
index 00000000..5132a20c
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-powerd.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# SPDX-License-Identifier: MIT
+
+description="Support for NVIDIA Dynamic Boost (only for use with specific laptops)"
+command="nvidia-powerd"
+command_background=true
+pidfile="/var/run/nvidia-powerd.pid"
+
+depend() {
+ need dbus
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r8.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r8.ebuild
deleted file mode 100644
index 1124cfd1..00000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r8.ebuild
+++ /dev/null
@@ -1,254 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit flag-o-matic multilib-minimal portability toolchain-funcs
-
-NV_URI="http://http.download.nvidia.com/XFree86/"
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-HOMEPAGE="http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx"
-SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )"
-
-LICENSE="GPL-2 NVIDIA-r2"
-SLOT="3"
-KEYWORDS="-* ~amd64"
-RESTRICT="bindist mirror strip"
-EMULTILIB_PKG="true"
-
-IUSE="acpi +dkms multilib +tools wayland +X"
-
-COMMON="
- acct-group/video
- acct-user/nvpd
- net-libs/libtirpc
- X? (
- >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
- media-libs/libglvnd[X,${MULTILIB_USEDEP}]
- )"
-DEPEND="${COMMON}"
-PDEPEND="
- tools? ( x11-misc/nvidia-settings:${SLOT} )
-"
-RDEPEND="
- ${COMMON}
- >=virtual/opencl-3
- !!x11-drivers/nvidia-drivers:4
- !!x11-drivers/nvidia-drivers:5
- acpi? ( sys-power/acpid )
- dkms? ( ~sys-kernel/${PN}-dkms-${PV}:${SLOT} )
- wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
- X? (
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- sys-libs/zlib[${MULTILIB_USEDEP}]
- )
-"
-
-QA_PREBUILT="opt/* usr/lib*"
-
-S=${WORKDIR}/
-
-pkg_setup() {
- export DISTCC_DISABLE=1
- export CCACHE_DISABLE=1
-
- NV_DOC="${S}"
- NV_OBJ="${S}"
- NV_SRC="${S}/kernel"
- NV_MAN="${S}"
- NV_X11="${S}"
- NV_SOVER=${PV}
-}
-
-src_prepare() {
- default
- local man_file
- for man_file in "${NV_MAN}"/*1.gz; do
- gunzip $man_file || die
- done
-
- if ! [ -f nvidia_icd.json ]; then
- cp nvidia_icd.json.template nvidia_icd.json || die
- sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
- fi
-}
-
-donvidia() {
- nv_LIB="${1}"
- nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
- nv_DEST="${2}"
- nv_LIBNAME=$(basename "${nv_LIB}")
-
- if [[ "${nv_DEST}" ]]; then
- exeinto ${nv_DEST}
- action="doexe"
- else
- nv_DEST="/usr/$(get_libdir)"
- action="dolib.so"
- fi
-
- ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
-
- if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER}
- fi
-
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so}
-}
-
-src_install-libs() {
- local inslibdir=$(get_libdir)
- local GL_ROOT="/usr/$(get_libdir)"
- local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
- local nv_libdir="${NV_OBJ}"
-
- if has_multilib_profile && [[ ${ABI} == "x86" ]]; then
- nv_libdir="${NV_OBJ}"/32
- fi
-
- if use X; then
- NV_GLX_LIBRARIES=(
- "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libOpenCL.so.1.0.0 ${CL_ROOT}"
- "libcuda.so.${NV_SOVER}"
- "libnvcuvid.so.${NV_SOVER}"
- "libnvidia-compiler.so.${NV_SOVER}"
- "libnvidia-eglcore.so.${NV_SOVER}"
- "libnvidia-encode.so.${NV_SOVER}"
- "libnvidia-fatbinaryloader.so.${NV_SOVER}"
- "libnvidia-fbc.so.${NV_SOVER}"
- "libnvidia-glcore.so.${NV_SOVER}"
- "libnvidia-glsi.so.${NV_SOVER}"
- "libnvidia-ifr.so.${NV_SOVER}"
- "libnvidia-opencl.so.${NV_SOVER}"
- "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
- "libvdpau_nvidia.so.${NV_SOVER}"
- "libnvidia-ml.so.${NV_SOVER}"
- "tls/libnvidia-tls.so.${NV_SOVER}"
- )
-
- if use wayland && has_multilib_profile && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-egl-wayland.so.1.0.2"
- )
- fi
-
- if has_multilib_profile && [[ ${ABI} == "amd64" ]];
- then
- NV_GLX_LIBRARIES+=(
- "libnvidia-wfb.so.${NV_SOVER}"
- )
- fi
-
- for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
- donvidia "${nv_libdir}"/${NV_LIB}
- done
- fi
-}
-
-src_install() {
- donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
-
- if has_multilib_profile && use multilib; then
- local OABI=${ABI}
- for ABI in $(get_install_abis); do
- src_install-libs
- done
- ABI=${OABI}
- unset OABI
- else
- src_install-libs
- fi
-
- is_final_abi || die "failed to iterate through all ABIs"
-
- if use X; then
- insinto /usr/$(get_libdir)/xorg/modules/drivers
- doins ${NV_X11}/nvidia_drv.so
-
- donvidia ${NV_X11}/libglx.so.${NV_SOVER} /usr/$(get_libdir)/nvidia/xorg
-
- insinto /usr/share/X11/xorg.conf.d
- newins "${FILESDIR}"/nvidia-drm-outputclass.conf 50-nvidia-drm-outputclass.conf
-
- insinto /usr/share/glvnd/egl_vendor.d
- doins ${NV_X11}/10_nvidia.json
-
- insinto /etc/vulkan/icd.d
- doins ${NV_X11}/nvidia_icd.json
-
- exeinto /opt/bin
- doexe ${NV_OBJ}/nvidia-xconfig
-
- doman "${NV_MAN}"/nvidia-xconfig.1
- fi
-
- if use wayland; then
- insinto /usr/share/egl/egl_external_platform.d
- doins ${NV_X11}/10_nvidia_wayland.json
- fi
-
- insinto /etc/modprobe.d
- doins "${FILESDIR}"/nouveau.conf
-
- insinto /etc/OpenCL/vendors
- doins ${NV_OBJ}/nvidia.icd
-
- exeinto /opt/bin/
- doexe ${NV_OBJ}/nvidia-cuda-mps-control
- doexe ${NV_OBJ}/nvidia-cuda-mps-server
- doexe ${NV_OBJ}/nvidia-debugdump
- doexe ${NV_OBJ}/nvidia-persistenced
- doexe ${NV_OBJ}/nvidia-smi
- doexe ${NV_OBJ}/nvidia-modprobe
-
- fowners root:video /opt/bin/nvidia-modprobe
- fperms 4710 /opt/bin/nvidia-modprobe
- dosym /{opt,usr}/bin/nvidia-modprobe
-
- newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
- newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
- newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
-
- doman "${NV_MAN}"/nvidia-smi.1
- doman "${NV_MAN}"/nvidia-cuda-mps-control.1
- doman "${NV_MAN}"/nvidia-modprobe.1
- doman "${NV_MAN}"/nvidia-persistenced.1
-}
-
-_dracut_initramfs_regen() {
- if [ -x $(which dracut) ]; then
- dracut -N -f --no-hostonly-cmdline
- fi
-}
-
-pkg_preinst() {
- if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
- rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
- fi
-
- if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
- rm -f "${ROOT}"/etc/env.d/09nvidia
- fi
-}
-
-pkg_postinst() {
- if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
- _dracut_initramfs_regen
- fi
-}
-
-pkg_postrm() {
- if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
- _dracut_initramfs_regen
- fi
-}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r9.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r9.ebuild
new file mode 100644
index 00000000..8bc1497d
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r9.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop flag-o-matic linux-mod-r1 multilib readme.gentoo-r1
+inherit systemd toolchain-funcs unpacker user-info
+
+NV_URI="https://download.nvidia.com/XFree86/"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx"
+SRC_URI="
+ ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run
+ $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \
+ nvidia-{installer,modprobe,persistenced,xconfig}{,})
+"
+# nvidia-installer is unused but here for GPL-2's "distribute sources"
+S=${WORKDIR}
+
+LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT"
+SLOT="3"
+KEYWORDS="-* amd64"
+IUSE="abi_x86_32 abi_x86_64 +acpi +dkms +persistenced +tools +X"
+RESTRICT="strip"
+
+COMMON_DEPEND="
+ acct-group/video
+ persistenced? (
+ acct-user/nvpd
+ net-libs/libtirpc:=
+ )
+ tools? ( x11-misc/nvidia-settings:${SLOT} )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ sys-libs/glibc
+ !!x11-drivers/nvidia-drivers:4
+ !!x11-drivers/nvidia-drivers:5
+ acpi? ( sys-power/acpid )
+ dkms? ( ~sys-kernel/${PN}-dkms-${PV}:${SLOT} )
+ X? (
+ media-libs/libglvnd[X,abi_x86_32(-)?]
+ x11-libs/libX11[abi_x86_32(-)?]
+ x11-libs/libXext[abi_x86_32(-)?]
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ tools? ( x11-misc/nvidia-settings:${SLOT} )
+"
+BDEPEND="
+ sys-devel/m4
+ virtual/pkgconfig
+"
+
+QA_PREBUILT="opt/bin/* usr/lib*"
+
+PATCHES=(
+ # note: no plans to add patches for newer kernels here, when the last
+ # working 6.1.x LTS is EOL then 390 will simply be removed from the tree
+ "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="
+ PROC_FS
+ ~DRM_KMS_HELPER
+ ~SYSVIPC
+ ~!AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT
+ ~!LOCKDEP
+ ~!X86_KERNEL_IBT
+ !DEBUG_MUTEXES
+ "
+
+ local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
+ of drivers (no custom config), and optional nvidia-drm.modeset=1.
+ With 390.xx drivers, also used by a GLX workaround needed for OpenGL.
+ Cannot be directly selected in the kernel's menuconfig, and may need
+ selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or
+ DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in."
+
+ local ERROR_X86_KERNEL_IBT="CONFIG_X86_KERNEL_IBT: is set and, if the CPU supports the feature,
+ this will likely lead to modules load failure with ENDBR errors.
+ Please ignore if not having issues, but otherwise try to unset or
+ pass ibt=off to the kernel's command line." #911142
+
+ kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
+}
+
+src_prepare() {
+ # make patches usable across versions
+ rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
+ rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
+ rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
+
+ eapply "${FILESDIR}"/nvidia-drivers-390.154-clang15.patch
+
+ default
+
+ # prevent detection of incomplete kernel DRM support (bug #603818)
+ sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
+ -i kernel/conftest.sh || die
+
+ sed 's/__USER__/nvpd/' \
+ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
+ > "${T}"/nvidia-persistenced.service || die
+
+ # use alternative vulkan icd option if USE=-X (bug #909181)
+ sed "s/__NV_VK_ICD__/lib$(usex X GLX EGL)_nvidia.so.0/" \
+ nvidia_icd.json.template > nvidia_icd.json || die
+
+ # 390 has legacy glx needing a modified .conf (bug #713546)
+ # directory is not quite right, but kept for any existing custom xorg.conf
+ sed "s|@LIBDIR@|${EPREFIX}/usr/$(get_libdir)|" \
+ "${FILESDIR}"/nvidia-drm-outputclass-390.conf > nvidia-drm-outputclass.conf || die
+}
+
+src_compile() {
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP PKG_CONFIG
+ local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch
+
+ # latest branches has proper fixes, but legacy have more issues and are
+ # not worth the trouble, so doing the lame "fix" for gcc14 (bug #921370)
+ local noerr=(
+ -Wno-error=implicit-function-declaration
+ -Wno-error=incompatible-pointer-types
+ )
+ # not *FLAGS to ensure it's used everywhere including conftest.sh
+ CC+=" $(test-flags-CC "${noerr[@]}")"
+
+ NV_ARGS=(
+ PREFIX="${EPREFIX}"/usr
+ HOST_CC="$(tc-getBUILD_CC)"
+ HOST_LD="$(tc-getBUILD_LD)"
+ NV_USE_BUNDLED_LIBJANSSON=0
+ NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
+ )
+
+ if use persistenced; then
+ # 390.xx persistenced does not auto-detect libtirpc
+ LIBS=$(${PKG_CONFIG} --libs libtirpc || die) \
+ common_cflags=$(${PKG_CONFIG} --cflags libtirpc || die) \
+ emake "${NV_ARGS[@]}" -C nvidia-persistenced
+ fi
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig
+}
+
+src_install() {
+ local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir)
+
+ NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} )
+
+ local -A paths=(
+ [APPLICATION_PROFILE]=/usr/share/nvidia
+ [CUDA_ICD]=/etc/OpenCL/vendors
+ [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d
+ [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d
+ [VULKAN_ICD_JSON]=/usr/share/vulkan/icd.d
+ [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d
+
+ [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions
+ [GLX_MODULE_SYMLINK]=/usr/${libdir}/extensions/nvidia
+ [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules
+ [XMODULE_SYMLINK]=/usr/${libdir}/xorg/modules
+ )
+
+ local skip_files=(
+ $(usev !X "libGLX_nvidia libglx libnvidia-ifr")
+ libGLX_indirect # non-glvnd unused fallback
+ libnvidia-gtk nvidia-{settings,xconfig} # built from source
+ libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland
+ )
+ local skip_modules=(
+ $(usev !X "nvfbc vdpau xdriver")
+ installer nvpd # handled separately / built from source
+ )
+ local skip_types=(
+ GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd
+ OPENCL_WRAPPER.\* # virtual/opencl
+ DOCUMENTATION DOT_DESKTOP # handled separately
+ XMODULE_NEWSYM # use xorg's libwfb.so, nvidia also keeps it if it exists
+ .\*_SRC DKMS_CONF LIBGL_LA OPENGL_HEADER # unused
+ )
+
+ local DOCS=(
+ README.txt NVIDIA_Changelog
+ )
+ local HTML_DOCS=( html/. )
+ einstalldocs
+
+ local DISABLE_AUTOFORMATTING=yes
+ local DOC_CONTENTS="\
+Trusted users should be in the 'video' group to use NVIDIA devices.
+You can add yourself by using: gpasswd -a my-user video\
+
+390.xx libglvnd support is partial and requires different Xorg modules
+for working OpenGL/GLX. If using the default Xorg configuration these
+should be used automatically, otherwise manually add the ModulePath
+from: '${EPREFIX}/${paths[XORG_OUTPUTCLASS_CONFIG]#/}/nvidia-drm-outputclass.conf'\
+
+Note that NVIDIA is no longer offering support for the unified memory
+module (nvidia-uvm) on x86 (32bit), as such the module is missing.
+This means OpenCL/CUDA (and related, like nvenc) cannot be used.
+Other functions, like OpenGL, will continue to work.
+
+Support from NVIDIA for 390.xx will end in December 2022, how long
+Gentoo will be able to reasonably support it beyond that is unknown.
+If wish to continue using this hardware, should consider switching
+to the Nouveau open source driver.
+https://nvidia.custhelp.com/app/answers/detail/a_id/3142/
+
+For additional information or for troubleshooting issues, please see
+https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers and NVIDIA's own
+documentation that is installed alongside this README."
+ readme.gentoo_create_doc
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/nvidia-390.conf nvidia.conf
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe install
+ fowners :video /usr/bin/nvidia-modprobe #505092
+ fperms 4710 /usr/bin/nvidia-modprobe
+
+ if use persistenced; then
+ emake "${NV_ARGS[@]}" -C nvidia-persistenced install
+ newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced
+ newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced
+ systemd_dounit "${T}"/nvidia-persistenced.service
+ fi
+
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install
+
+ # mimic nvidia-installer by reading .manifest to install files
+ # 0:file 1:perms 2:type 3+:subtype/arguments -:module
+ local m into
+ while IFS=' ' read -ra m; do
+ ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
+ has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
+
+ case ${m[2]} in
+ MANPAGE)
+ gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert
+ continue
+ ;;
+ GLX_MODULE_SYMLINK|XMODULE_NEWSYM)
+ # messy symlinks for non-glvnd xorg modules overrides put
+ # in a different directory to avoid collisions (390-only)
+ m[4]=../../xorg/modules/${m[3]#/}${m[4]}
+ m[3]=/
+ ;;
+ TLS_LIB) [[ ${m[4]} == CLASSIC ]] && continue;; # segfaults (bug #785289)
+ VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/
+ VULKAN_ICD_JSON) m[0]=${m[0]%.template};;
+ esac
+
+ if [[ -v 'paths[${m[2]}]' ]]; then
+ into=${paths[${m[2]}]}
+ elif [[ ${m[2]} == *_BINARY ]]; then
+ into=/opt/bin
+ elif [[ ${m[3]} == COMPAT32 ]]; then
+ use abi_x86_32 || continue
+ into=/usr/${libdir32}
+ elif [[ ${m[2]} == *_@(LIB|SYMLINK) ]]; then
+ into=/usr/${libdir}
+ else
+ die "No known installation path for ${m[0]}"
+ fi
+ [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/}
+ [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/}
+
+ if [[ ${m[2]} =~ _SYMLINK$|_NEWSYM$ ]]; then
+ [[ ${m[4]: -1} == / ]] && m[4]=${m[5]}
+ dosym ${m[4]} ${into}/${m[0]}
+ continue
+ fi
+
+ printf -v m[1] %o $((m[1] | 0200)) # 444->644
+ insopts -m${m[1]}
+ insinto ${into}
+ doins ${m[0]}
+ done < .manifest || die
+ insopts -m0644 # reset
+
+ # MODULE:installer non-skipped extras
+ dolib.so libnvidia-cfg.so.${PV}
+ dosym libnvidia-cfg.so.${PV} /usr/${libdir}/libnvidia-cfg.so.1
+ dosym libnvidia-cfg.so.${PV} /usr/${libdir}/libnvidia-cfg.so
+
+ dobin nvidia-bug-report.sh
+
+ # symlink non-versioned so nvidia-settings can use it even if misdetected
+ dosym nvidia-application-profiles-${PV}-key-documentation \
+ ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
+
+ # sandbox issues with /dev/nvidiactl are widespread and sometime
+ # affect revdeps of packages built with USE=opencl/cuda making it
+ # hard to manage in ebuilds (minimal set, ebuilds should handle
+ # manually if need others or addwrite)
+ insinto /etc/sandbox.d
+ newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl"'
+}
+
+pkg_preinst() {
+ # set video group id based on live system (bug #491414)
+ local g=$(egetent group video | cut -d: -f3)
+ [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')"
+ sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+ ewarn
+ ewarn "Be warned/reminded that the 390.xx branch reached end-of-life and"
+ ewarn "NVIDIA is no longer fixing issues (including security). Free to keep"
+ ewarn "using (for now) but it is recommended to either switch to nouveau or"
+ ewarn "replace hardware. Will be kept in-tree while possible, but expect it"
+ ewarn "to be removed likely in early 2027 or earlier if major issues arise."
+ ewarn
+ ewarn "Note that there is no plans to patch in support for kernels branches"
+ ewarn "newer than 6.1.x which will be supported upstream until December 2026."
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.239.06-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.239.06-r1.ebuild
deleted file mode 100644
index 8b3ae7f7..00000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.239.06-r1.ebuild
+++ /dev/null
@@ -1,259 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit flag-o-matic multilib-minimal portability toolchain-funcs
-
-NV_URI="https://us.download.nvidia.com/XFree86/"
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-
-SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )"
-
-EMULTILIB_PKG="true"
-RESTRICT="bindist mirror strip"
-KEYWORDS="-* ~amd64"
-LICENSE="GPL-2 NVIDIA-r2"
-SLOT="4"
-
-IUSE="acpi +dkms multilib +tools wayland +X"
-REQUIRED_USE="tools? ( X )"
-
-COMMON="
- acct-group/video
- acct-user/nvpd
- net-libs/libtirpc
- X? (
- >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
- media-libs/libglvnd[X,${MULTILIB_USEDEP}]
- )
-"
-
-DEPEND="${COMMON}"
-
-RDEPEND="
- ${COMMON}
- >=virtual/opencl-3
- !!x11-drivers/nvidia-drivers:3
- !!x11-drivers/nvidia-drivers:5
- acpi? ( sys-power/acpid )
- dkms? ( ~sys-kernel/${PN}-dkms-${PV}:${SLOT} )
- wayland? (
- ~gui-libs/egl-wayland-1.1.7
- )
- X? (
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- sys-libs/zlib[${MULTILIB_USEDEP}]
- )
-"
-PDEPEND="tools? ( x11-misc/nvidia-settings:${SLOT} )
-"
-
-QA_PREBUILT="opt/* usr/lib*"
-S=${WORKDIR}/
-PATCHES=(
- "${FILESDIR}"/locale.patch
-)
-
-pkg_setup() {
- export DISTCC_DISABLE=1
- export CCACHE_DISABLE=1
-
- NV_DOC="${S}"
- NV_OBJ="${S}"
- NV_SRC="${S}/kernel"
- NV_MAN="${S}"
- NV_X11="${S}"
- NV_SOVER=${PV}
-}
-
-src_prepare() {
- default
- local man_file
- for man_file in "${NV_MAN}"/*1.gz; do
- gunzip $man_file || die
- done
-
- if ! [ -f nvidia_icd.json ]; then
- cp nvidia_icd.json.template nvidia_icd.json || die
- sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
- fi
-}
-
-donvidia() {
- nv_LIB="${1}"
- nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
- nv_DEST="${2}"
- nv_LIBNAME=$(basename "${nv_LIB}")
-
- if [[ "${nv_DEST}" ]]; then
- exeinto ${nv_DEST}
- action="doexe"
- else
- nv_DEST="/usr/$(get_libdir)"
- action="dolib.so"
- fi
-
- ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
-
- if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER}
- fi
-
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so}
-}
-
-src_install-libs() {
- local inslibdir=$(get_libdir)
- local GL_ROOT="/usr/$(get_libdir)"
- local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
- local nv_libdir="${NV_OBJ}"
-
- if has_multilib_profile && [[ ${ABI} == "x86" ]]; then
- nv_libdir="${NV_OBJ}"/32
- fi
-
- if use X; then
- NV_GLX_LIBRARIES=(
- "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libOpenCL.so.1.0.0 ${CL_ROOT}"
- "libcuda.so.${NV_SOVER}"
- "libnvcuvid.so.${NV_SOVER}"
- "libnvidia-compiler.so.${NV_SOVER}"
- "libnvidia-allocator.so.${NV_SOVER}"
- "libnvidia-eglcore.so.${NV_SOVER}"
- "libnvidia-encode.so.${NV_SOVER}"
- "libnvidia-glcore.so.${NV_SOVER}"
- "libnvidia-glsi.so.${NV_SOVER}"
- "libnvidia-glvkspirv.so.${NV_SOVER}"
- "libnvidia-ifr.so.${NV_SOVER}"
- "libnvidia-opencl.so.${NV_SOVER}"
- "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
- "libnvidia-opticalflow.so.${NV_SOVER}"
- "libvdpau_nvidia.so.${NV_SOVER}"
- "libnvidia-ml.so.${NV_SOVER}"
- "libnvidia-tls.so.${NV_SOVER}"
- )
-
- if has_multilib_profile && [[ ${ABI} == "amd64" ]]; then
- NV_GLX_LIBRARIES+=(
- "libnvidia-cbl.so.${NV_SOVER}"
- "libnvidia-ngx.so.${NV_SOVER}"
- "libnvidia-rtcore.so.${NV_SOVER}"
- "libnvoptix.so.${NV_SOVER}"
- )
- fi
-
- for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
- donvidia "${nv_libdir}"/${NV_LIB}
- done
- fi
-}
-
-src_install() {
- donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
-
- if has_multilib_profile && use multilib; then
- local OABI=${ABI}
- for ABI in $(multilib_get_enabled_abis); do
- src_install-libs
- done
- ABI=${OABI}
- unset OABI
- else
- src_install-libs
- fi
-
- is_final_abi || die "failed to iterate through all ABIs"
-
- if use X; then
- donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} /usr/$(get_libdir)/nvidia/xorg
-
- insinto /usr/$(get_libdir)/xorg/modules/drivers
- doins ${NV_X11}/nvidia_drv.so
-
- insinto /usr/share/X11/xorg.conf.d
- newins ${FILESDIR}/nvidia-drm-outputclass.conf 50-nvidia-drm-outputclass.conf
-
- insinto /usr/share/glvnd/egl_vendor.d
- doins ${NV_X11}/10_nvidia.json
-
- exeinto /opt/bin
- doexe ${NV_OBJ}/nvidia-xconfig
-
- doman "${NV_MAN}"/nvidia-xconfig.1
- fi
-
- insinto /etc/modprobe.d
- doins "${FILESDIR}"/nouveau.conf
-
- insinto /etc/vulkan/icd.d
- doins nvidia_icd.json
-
- insinto /etc/vulkan/implicit_layer.d
- doins nvidia_layers.json
-
- insinto /etc/OpenCL/vendors
- doins ${NV_OBJ}/nvidia.icd
-
- exeinto /opt/bin/
- doexe ${NV_OBJ}/nvidia-cuda-mps-control
- doexe ${NV_OBJ}/nvidia-cuda-mps-server
- doexe ${NV_OBJ}/nvidia-debugdump
- doexe ${NV_OBJ}/nvidia-persistenced
- doexe ${NV_OBJ}/nvidia-smi
- doexe ${NV_OBJ}/nvidia-modprobe
-
- fowners root:video /opt/bin/nvidia-modprobe
- fperms 4710 /opt/bin/nvidia-modprobe
- dosym /{opt,usr}/bin/nvidia-modprobe
-
- newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
- newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
- newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
-
- newdoc "${NV_DOC}/README.txt" README
- dodoc "${NV_DOC}/NVIDIA_Changelog"
- doman "${NV_MAN}"/nvidia-smi.1
- doman "${NV_MAN}"/nvidia-cuda-mps-control.1
- doman "${NV_MAN}"/nvidia-modprobe.1
- doman "${NV_MAN}"/nvidia-persistenced.1
-
- docinto html
- dodoc -r ${NV_DOC}/html/*
-}
-
-_dracut_initramfs_regen() {
- if [ -x $(which dracut) ]; then
- dracut -N -f --no-hostonly-cmdline
- fi
-}
-
-pkg_preinst() {
- if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
- rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
- fi
-
- if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
- rm -f "${ROOT}"/etc/env.d/09nvidia
- fi
-}
-
-pkg_postinst() {
- if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
- _dracut_initramfs_regen
- fi
-}
-
-pkg_postrm() {
- if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
- _dracut_initramfs_regen
- fi
-}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02.ebuild
new file mode 100644
index 00000000..20ee3656
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02.ebuild
@@ -0,0 +1,304 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop flag-o-matic linux-mod-r1 multilib readme.gentoo-r1
+inherit systemd toolchain-funcs unpacker user-info
+
+NV_URI="https://download.nvidia.com/XFree86/"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx"
+SRC_URI="
+ ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run
+ $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \
+ nvidia-{installer,modprobe,persistenced,xconfig}{,})
+"
+# nvidia-installer is unused but here for GPL-2's "distribute sources"
+S=${WORKDIR}
+
+LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
+SLOT="4"
+KEYWORDS="-* amd64"
+IUSE="abi_x86_32 abi_x86_64 +acpi +dkms +persistenced +tools +X"
+RESTRICT="strip"
+
+COMMON_DEPEND="
+ acct-group/video
+ persistenced? (
+ acct-user/nvpd
+ net-libs/libtirpc:=
+ )
+ tools? ( x11-misc/nvidia-settings:${SLOT} )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ sys-libs/glibc
+ !!x11-drivers/nvidia-drivers:3
+ !!x11-drivers/nvidia-drivers:5
+ acpi? ( sys-power/acpid )
+ dkms? ( ~sys-kernel/${PN}-dkms-${PV}:${SLOT} )
+ X? (
+ media-libs/libglvnd[X,abi_x86_32(-)?]
+ x11-libs/libX11[abi_x86_32(-)?]
+ x11-libs/libXext[abi_x86_32(-)?]
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ tools? ( x11-misc/nvidia-settings:${SLOT} )
+"
+BDEPEND="
+ sys-devel/m4
+ virtual/pkgconfig
+"
+
+QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
+
+PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
+ "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="
+ PROC_FS
+ ~DRM_KMS_HELPER
+ ~SYSVIPC
+ ~!AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT
+ ~!LOCKDEP
+ ~!SLUB_DEBUG_ON
+ ~!X86_KERNEL_IBT
+ !DEBUG_MUTEXES
+ "
+
+ local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
+ of drivers (no custom config), and for nvidia-drm.modeset=1 if used.
+ Cannot be directly selected in the kernel's menuconfig, and may need
+ selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or
+ DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in."
+
+ local ERROR_X86_KERNEL_IBT="CONFIG_X86_KERNEL_IBT: is set and, if the CPU supports the feature,
+ this *could* lead to modules load failure with ENDBR errors, or to
+ broken CUDA/NVENC. Please ignore if not having issues, but otherwise
+ try to unset or pass ibt=off to the kernel's command line." #911142
+
+ kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
+}
+
+src_prepare() {
+ # make patches usable across versions
+ rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
+ rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
+ rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
+
+ default
+
+ # prevent detection of incomplete kernel DRM support (bug #603818)
+ sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
+ -i kernel/conftest.sh || die
+
+ sed 's/__USER__/nvpd/' \
+ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
+ > "${T}"/nvidia-persistenced.service || die
+}
+
+src_compile() {
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP PKG_CONFIG
+ local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch
+
+ # latest branches has proper fixes, but legacy have more issues and are
+ # not worth the trouble, so doing the lame "fix" for gcc14 (bug #921370)
+ # TODO: check if still needed on bumps given this branch is supported,
+ # and reminder to cleanup the CC="${KERNEL_CC}" in modargs if removing
+ local noerr=(
+ -Wno-error=implicit-function-declaration
+ -Wno-error=incompatible-pointer-types
+ )
+ # not *FLAGS to ensure it's used everywhere including conftest.sh
+ CC+=" $(test-flags-CC "${noerr[@]}")"
+
+ local xnvflags=-fPIC #840389
+ # lto static libraries tend to cause problems without fat objects
+ tc-is-lto && xnvflags+=" $(test-flags-CC -ffat-lto-objects)"
+
+ NV_ARGS=(
+ PREFIX="${EPREFIX}"/usr
+ HOST_CC="$(tc-getBUILD_CC)"
+ HOST_LD="$(tc-getBUILD_LD)"
+ NV_USE_BUNDLED_LIBJANSSON=0
+ NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
+ XNVCTRL_CFLAGS="${xnvflags}"
+ )
+
+ use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig
+}
+
+src_install() {
+ local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir)
+
+ NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} )
+
+ local -A paths=(
+ [APPLICATION_PROFILE]=/usr/share/nvidia
+ [CUDA_ICD]=/etc/OpenCL/vendors
+ [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d
+ [FIRMWARE]=/lib/firmware/nvidia/${PV}
+ [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d
+ [VULKAN_ICD_JSON]=/usr/share/vulkan
+ [WINE_LIB]=/usr/${libdir}/nvidia/wine
+ [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d
+
+ [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions
+ [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules
+ [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules
+ )
+
+ local skip_files=(
+ $(usev !X "libGLX_nvidia libglxserver_nvidia libnvidia-ifr")
+ libGLX_indirect # non-glvnd unused fallback
+ libnvidia-gtk nvidia-{settings,xconfig} # built from source
+ # skip wayland-related files, largely broken with 470 at this point
+ libnvidia-egl-wayland 10_nvidia_wayland libnvidia-vulkan-producer
+ )
+ local skip_modules=(
+ $(usev !X "nvfbc vdpau xdriver")
+ installer gsp nvpd # handled separately / built from source
+ )
+ local skip_types=(
+ GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd
+ OPENCL_WRAPPER.\* # virtual/opencl
+ DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF # handled separately / unused
+ )
+
+ local DOCS=(
+ README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json
+ )
+ local HTML_DOCS=( html/. )
+ einstalldocs
+
+ local DISABLE_AUTOFORMATTING=yes
+ local DOC_CONTENTS="\
+Trusted users should be in the 'video' group to use NVIDIA devices.
+You can add yourself by using: gpasswd -a my-user video\
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+
+Note that without USE=abi_x86_32 on ${PN}, 32bit applications
+(typically using wine / steam) will not be able to use GPU acceleration.\
+
+For additional information or for troubleshooting issues, please see
+https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers and NVIDIA's own
+documentation that is installed alongside this README."
+ readme.gentoo_create_doc
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/nvidia-470.conf nvidia.conf
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe install
+ fowners :video /usr/bin/nvidia-modprobe #505092
+ fperms 4710 /usr/bin/nvidia-modprobe
+
+ if use persistenced; then
+ emake "${NV_ARGS[@]}" -C nvidia-persistenced install
+ newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced
+ newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced
+ systemd_dounit "${T}"/nvidia-persistenced.service
+ fi
+
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install
+
+ # mimic nvidia-installer by reading .manifest to install files
+ # 0:file 1:perms 2:type 3+:subtype/arguments -:module
+ local m into
+ while IFS=' ' read -ra m; do
+ ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
+ has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
+
+ case ${m[2]} in
+ MANPAGE)
+ gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert
+ continue
+ ;;
+ VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/
+ esac
+
+ if [[ -v 'paths[${m[2]}]' ]]; then
+ into=${paths[${m[2]}]}
+ elif [[ ${m[2]} == *_BINARY ]]; then
+ into=/opt/bin
+ elif [[ ${m[3]} == COMPAT32 ]]; then
+ use abi_x86_32 || continue
+ into=/usr/${libdir32}
+ elif [[ ${m[2]} == *_@(LIB|SYMLINK) ]]; then
+ into=/usr/${libdir}
+ else
+ die "No known installation path for ${m[0]}"
+ fi
+ [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/}
+ [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/}
+
+ if [[ ${m[2]} =~ _SYMLINK$ ]]; then
+ [[ ${m[4]: -1} == / ]] && m[4]=${m[5]}
+ dosym ${m[4]} ${into}/${m[0]}
+ continue
+ fi
+ [[ ${m[0]} =~ ^libnvidia-ngx.so ]] &&
+ dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest
+
+ printf -v m[1] %o $((m[1] | 0200)) # 444->644
+ insopts -m${m[1]}
+ insinto ${into}
+ doins ${m[0]}
+ done < .manifest || die
+ insopts -m0644 # reset
+
+ # MODULE:installer non-skipped extras
+ : "$(systemd_get_sleepdir)"
+ exeinto "${_#"${EPREFIX}"}"
+ doexe systemd/system-sleep/nvidia
+ dobin systemd/nvidia-sleep.sh
+ systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
+
+ dobin nvidia-bug-report.sh
+
+ # symlink non-versioned so nvidia-settings can use it even if misdetected
+ dosym nvidia-application-profiles-${PV}-key-documentation \
+ ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
+
+ # don't attempt to strip firmware files (silences errors)
+ dostrip -x ${paths[FIRMWARE]}
+
+ # sandbox issues with /dev/nvidiactl (and /dev/char wrt bug #904292)
+ # are widespread and sometime affect revdeps of packages built with
+ # USE=opencl/cuda making it hard to manage in ebuilds (minimal set,
+ # ebuilds should handle manually if need others or addwrite)
+ insinto /etc/sandbox.d
+ newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/char"'
+}
+
+pkg_preinst() {
+ # set video group id based on live system (bug #491414)
+ local g=$(egetent group video | cut -d: -f3)
+ [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')"
+ sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+ ewarn "Detected that the current kernel command line is using 'slub_debug=',"
+ ewarn "this may lead to system instability/freezes with this version of"
+ ewarn "${PN}. Bug: https://bugs.gentoo.org/796329"
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-535.171.04-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-535.171.04-r1.ebuild
deleted file mode 100644
index 8b1db030..00000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-535.171.04-r1.ebuild
+++ /dev/null
@@ -1,259 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit flag-o-matic multilib-minimal portability toolchain-funcs
-
-NV_URI="https://us.download.nvidia.com/XFree86/"
-AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${PV}"
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-
-SRC_URI="amd64? ( ${NV_URI}Linux-x86_64/${PV}/${AMD64_NV_PACKAGE}.run )"
-
-EMULTILIB_PKG="true"
-KEYWORDS="-* ~amd64"
-RESTRICT="bindist mirror strip"
-LICENSE="GPL-2 NVIDIA-r2"
-SLOT="5"
-
-IUSE="acpi +dkms multilib +tools wayland +X"
-REQUIRED_USE="tools? ( X )"
-
-COMMON="
- acct-group/video
- acct-user/nvpd
- net-libs/libtirpc
- X? (
- >=x11-libs/libvdpau-1.0[${MULTILIB_USEDEP}]
- media-libs/libglvnd[X,${MULTILIB_USEDEP}]
- )
-"
-
-DEPEND="${COMMON}"
-
-RDEPEND="
- ${COMMON}
- >=virtual/opencl-3
- !!x11-drivers/nvidia-drivers:3
- !!x11-drivers/nvidia-drivers:4
- acpi? ( sys-power/acpid )
- dkms? ( ~sys-kernel/${PN}-dkms-${PV}:${SLOT} )
- wayland? (
- gui-libs/egl-gbm
- >=gui-libs/egl-wayland-1.1.10
- )
- X? (
- >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
- >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
- sys-libs/zlib[${MULTILIB_USEDEP}]
- )
-"
-PDEPEND="tools? ( x11-misc/nvidia-settings:${SLOT} )
-"
-
-QA_PREBUILT="opt/* usr/lib*"
-S=${WORKDIR}/
-PATCHES=(
- "${FILESDIR}"/locale.patch
-)
-
-pkg_setup() {
- export DISTCC_DISABLE=1
- export CCACHE_DISABLE=1
-
- NV_DOC="${S}"
- NV_OBJ="${S}"
- NV_SRC="${S}/kernel"
- NV_MAN="${S}"
- NV_X11="${S}"
- NV_SOVER=${PV}
-}
-
-src_prepare() {
- default
- local man_file
- for man_file in "${NV_MAN}"/*1.gz; do
- gunzip $man_file || die
- done
-
- if ! [ -f nvidia_icd.json ]; then
- cp nvidia_icd.json.template nvidia_icd.json || die
- sed -i -e 's:__NV_VK_ICD__:libGLX_nvidia.so.0:g' nvidia_icd.json || die
- fi
-}
-
-donvidia() {
- nv_LIB="${1}"
- nv_SOVER="$(scanelf -qF'%S#F' ${nv_LIB})"
- nv_DEST="${2}"
- nv_LIBNAME=$(basename "${nv_LIB}")
-
- if [[ "${nv_DEST}" ]]; then
- exeinto ${nv_DEST}
- action="doexe"
- else
- nv_DEST="/usr/$(get_libdir)"
- action="dolib.so"
- fi
-
- ${action} ${nv_LIB} || die "failed to install ${nv_LIBNAME}"
-
- if [[ ${nv_SOVER} ]] && ! [[ "${nv_SOVER}" = "${nv_LIBNAME}" ]]; then
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_SOVER}
- fi
-
- dosym ${nv_LIBNAME} ${nv_DEST}/${nv_LIBNAME/.so*/.so}
-}
-
-src_install-libs() {
- local inslibdir=$(get_libdir)
- local GL_ROOT="/usr/$(get_libdir)"
- local CL_ROOT="/usr/$(get_libdir)/OpenCL/vendors/nvidia"
- local nv_libdir="${NV_OBJ}"
-
- if has_multilib_profile && [[ ${ABI} == "x86" ]]; then
- nv_libdir="${NV_OBJ}"/32
- fi
-
- if use X; then
- NV_GLX_LIBRARIES=(
- "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
- "libOpenCL.so.1.0.0 ${CL_ROOT}"
- "libcuda.so.${NV_SOVER}"
- "libnvcuvid.so.${NV_SOVER}"
- "libnvidia-allocator.so.${NV_SOVER}"
- "libnvidia-eglcore.so.${NV_SOVER}"
- "libnvidia-encode.so.${NV_SOVER}"
- "libnvidia-glcore.so.${NV_SOVER}"
- "libnvidia-glsi.so.${NV_SOVER}"
- "libnvidia-glvkspirv.so.${NV_SOVER}"
- "libnvidia-opencl.so.${NV_SOVER}"
- "libnvidia-ptxjitcompiler.so.${NV_SOVER}"
- "libnvidia-opticalflow.so.${NV_SOVER}"
- "libvdpau_nvidia.so.${NV_SOVER}"
- "libnvidia-ml.so.${NV_SOVER}"
- "libnvidia-tls.so.${NV_SOVER}"
- )
-
- if has_multilib_profile && [[ ${ABI} == "amd64" ]]; then
- NV_GLX_LIBRARIES+=(
- "libnvidia-ngx.so.${NV_SOVER}"
- "libnvidia-rtcore.so.${NV_SOVER}"
- "libnvoptix.so.${NV_SOVER}"
- )
- fi
-
- for NV_LIB in "${NV_GLX_LIBRARIES[@]}"; do
- donvidia "${nv_libdir}"/${NV_LIB}
- done
- fi
-}
-
-src_install() {
- donvidia ${NV_OBJ}/libnvidia-cfg.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-fbc.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-nvvm.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-vulkan-producer.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvcuvid.so.${NV_SOVER}
- donvidia ${NV_OBJ}/libnvidia-encode.so.${NV_SOVER}
-
- if has_multilib_profile && use multilib; then
- local OABI=${ABI}
- for ABI in $(multilib_get_enabled_abis); do
- src_install-libs
- done
- ABI=${OABI}
- unset OABI
- else
- src_install-libs
- fi
-
- is_final_abi || die "failed to iterate through all ABIs"
-
- if use X; then
- donvidia ${NV_X11}/libglxserver_nvidia.so.${NV_SOVER} /usr/$(get_libdir)/nvidia/xorg
-
- insinto /usr/$(get_libdir)/xorg/modules/drivers
- doins ${NV_X11}/nvidia_drv.so
-
- insinto /usr/share/X11/xorg.conf.d
- newins ${FILESDIR}/nvidia-drm-outputclass.conf 50-nvidia-drm-outputclass.conf
-
- insinto /usr/share/glvnd/egl_vendor.d
- doins ${NV_X11}/10_nvidia.json
-
- exeinto /opt/bin
- doexe ${NV_OBJ}/nvidia-xconfig
-
- doman "${NV_MAN}"/nvidia-xconfig.1
- fi
-
- insinto /etc/modprobe.d
- doins "${FILESDIR}"/nouveau.conf
-
- insinto /etc/vulkan/icd.d
- doins nvidia_icd.json
-
- insinto /etc/vulkan/implicit_layer.d
- doins nvidia_layers.json
-
- insinto /etc/OpenCL/vendors
- doins ${NV_OBJ}/nvidia.icd
-
- exeinto /opt/bin/
- doexe ${NV_OBJ}/nvidia-cuda-mps-control
- doexe ${NV_OBJ}/nvidia-cuda-mps-server
- doexe ${NV_OBJ}/nvidia-debugdump
- doexe ${NV_OBJ}/nvidia-persistenced
- doexe ${NV_OBJ}/nvidia-smi
- doexe ${NV_OBJ}/nvidia-modprobe
-
- fowners root:video /opt/bin/nvidia-modprobe
- fperms 4710 /opt/bin/nvidia-modprobe
- dosym /{opt,usr}/bin/nvidia-modprobe
-
- newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi
- newconfd "${FILESDIR}/nvidia-persistenced.conf" nvidia-persistenced
- newinitd "${FILESDIR}/nvidia-persistenced.init" nvidia-persistenced
-
- newdoc "${NV_DOC}/README.txt" README
- dodoc "${NV_DOC}/NVIDIA_Changelog"
- doman "${NV_MAN}"/nvidia-smi.1
- doman "${NV_MAN}"/nvidia-cuda-mps-control.1
- doman "${NV_MAN}"/nvidia-modprobe.1
- doman "${NV_MAN}"/nvidia-persistenced.1
-
- docinto html
- dodoc -r ${NV_DOC}/html/*
-}
-
-_dracut_initramfs_regen() {
- if [ -x $(which dracut) ]; then
- dracut -N -f --no-hostonly-cmdline
- fi
-}
-
-pkg_preinst() {
- if [ -d "${ROOT}"/usr/lib/opengl/nvidia ]; then
- rm -rf "${ROOT}"/usr/lib/opengl/nvidia/*
- fi
-
- if [ -e "${ROOT}"/etc/env.d/09nvidia ]; then
- rm -f "${ROOT}"/etc/env.d/09nvidia
- fi
-}
-
-pkg_postinst() {
- if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
- _dracut_initramfs_regen
- fi
-}
-
-pkg_postrm() {
- if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then
- _dracut_initramfs_regen
- fi
-}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02.ebuild
new file mode 100644
index 00000000..180c5bee
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02.ebuild
@@ -0,0 +1,324 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop flag-o-matic linux-mod-r1 readme.gentoo-r1
+inherit systemd toolchain-funcs unpacker user-info
+
+NV_URI="https://download.nvidia.com/XFree86/"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx"
+SRC_URI="
+ ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run
+ $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \
+ nvidia-{installer,modprobe,persistenced,xconfig}{,})
+"
+# nvidia-installer is unused but here for GPL-2's "distribute sources"
+S=${WORKDIR}
+
+LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
+SLOT="5"
+KEYWORDS="-* amd64"
+IUSE="abi_x86_32 abi_x86_64 +acpi +dkms +persistenced +powerd +tools +wayland +X"
+RESTRICT="strip"
+
+COMMON_DEPEND="
+ acct-group/video
+ X? ( x11-libs/libpciaccess )
+ persistenced? (
+ acct-user/nvpd
+ net-libs/libtirpc:=
+ )
+ tools? ( x11-misc/nvidia-settings:${SLOT} )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-libs/openssl:0/3
+ sys-libs/glibc
+ !!x11-drivers/nvidia-drivers:3
+ !!x11-drivers/nvidia-drivers:4
+ acpi? ( sys-power/acpid )
+ dkms? ( ~sys-kernel/${PN}-dkms-${PV}:${SLOT} )
+ X? (
+ media-libs/libglvnd[X,abi_x86_32(-)?]
+ x11-libs/libX11[abi_x86_32(-)?]
+ x11-libs/libXext[abi_x86_32(-)?]
+ )
+ powerd? ( sys-apps/dbus[abi_x86_32(-)?] )
+ wayland? (
+ gui-libs/egl-gbm
+ >=gui-libs/egl-wayland-1.1.10
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ tools? ( x11-misc/nvidia-settings:${SLOT} )
+"
+BDEPEND="
+ sys-devel/m4
+ virtual/pkgconfig
+"
+
+QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
+
+PATCHES=(
+ "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
+)
+
+pkg_setup() {
+ local CONFIG_CHECK="
+ PROC_FS
+ ~DRM_KMS_HELPER
+ ~SYSVIPC
+ ~!LOCKDEP
+ ~!SLUB_DEBUG_ON
+ !DEBUG_MUTEXES
+ $(usev powerd '~CPU_FREQ')
+ "
+
+ local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but required
+ for drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
+ Cannot be directly selected in the kernel's menuconfig, and may need
+ selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or
+ DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in."
+
+ kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
+
+ CONFIG_CHECK+=" MMU_NOTIFIER" #843827
+ local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but required.
+ Cannot be directly selected in the kernel's menuconfig, and may need
+ selection of another option that requires it such as CONFIG_KVM."
+}
+
+src_prepare() {
+ # make patches usable across versions
+ rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
+ rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
+ rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
+
+ default
+
+ # prevent detection of incomplete kernel DRM support (bug #603818)
+ sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
+ -i kernel/conftest.sh || die
+
+ # adjust service files
+ sed 's/__USER__/nvpd/' \
+ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
+ > "${T}"/nvidia-persistenced.service || die
+ sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die
+
+ # use alternative vulkan icd option if USE=-X (bug #909181)
+ use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die
+
+ # enable nvidia-drm.modeset=1 by default with USE=wayland
+ cp "${FILESDIR}"/nvidia-545.conf "${T}"/nvidia.conf || die
+ use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die
+}
+
+src_compile() {
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP PKG_CONFIG
+
+ local xnvflags=-fPIC #840389
+ # lto static libraries tend to cause problems without fat objects
+ tc-is-lto && xnvflags+=" $(test-flags-CC -ffat-lto-objects)"
+
+ NV_ARGS=(
+ PREFIX="${EPREFIX}"/usr
+ HOST_CC="$(tc-getBUILD_CC)"
+ HOST_LD="$(tc-getBUILD_LD)"
+ BUILD_GTK2LIB=
+ NV_USE_BUNDLED_LIBJANSSON=0
+ NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
+ WAYLAND_AVAILABLE=$(usex wayland 1 0)
+ XNVCTRL_CFLAGS="${xnvflags}"
+ )
+
+ use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig
+}
+
+src_install() {
+ local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir)
+
+ NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} )
+
+ local -A paths=(
+ [APPLICATION_PROFILE]=/usr/share/nvidia
+ [CUDA_ICD]=/etc/OpenCL/vendors
+ [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d
+ [FIRMWARE]=/lib/firmware/nvidia/${PV}
+ [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm
+ [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d
+ [OPENGL_DATA]=/usr/share/nvidia
+ [VULKAN_ICD_JSON]=/usr/share/vulkan
+ [WINE_LIB]=/usr/${libdir}/nvidia/wine
+ [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d
+
+ [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions
+ [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules
+ [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules
+ )
+
+ local skip_files=(
+ $(usev !X "libGLX_nvidia libglxserver_nvidia")
+ libGLX_indirect # non-glvnd unused fallback
+ libnvidia-{gtk,wayland-client} nvidia-{settings,xconfig} # from source
+ libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm
+ libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland
+ libnvidia-pkcs11.so # using the openssl3 version instead
+ )
+ local skip_modules=(
+ $(usev !X "nvfbc vdpau xdriver")
+ $(usev !powerd powerd)
+ installer gsp nvpd # handled separately / built from source
+ )
+ local skip_types=(
+ GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd
+ OPENCL_WRAPPER.\* # virtual/opencl
+ DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused
+ )
+
+ local DOCS=(
+ README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json
+ )
+ local HTML_DOCS=( html/. )
+ einstalldocs
+
+ local DISABLE_AUTOFORMATTING=yes
+ local DOC_CONTENTS="\
+Trusted users should be in the 'video' group to use NVIDIA devices.
+You can add yourself by using: gpasswd -a my-user video\
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+
+Note that without USE=abi_x86_32 on ${PN}, 32bit applications
+(typically using wine / steam) will not be able to use GPU acceleration.\
+
+For additional information or for troubleshooting issues, please see
+https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers and NVIDIA's own
+documentation that is installed alongside this README."
+ readme.gentoo_create_doc
+
+ insinto /etc/modprobe.d
+ doins "${T}"/nvidia.conf
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe install
+ fowners :video /usr/bin/nvidia-modprobe #505092
+ fperms 4710 /usr/bin/nvidia-modprobe
+
+ if use persistenced; then
+ emake "${NV_ARGS[@]}" -C nvidia-persistenced install
+ newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced
+ newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced
+ systemd_dounit "${T}"/nvidia-persistenced.service
+ fi
+
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install
+
+ # mimic nvidia-installer by reading .manifest to install files
+ # 0:file 1:perms 2:type 3+:subtype/arguments -:module
+ local m into
+ while IFS=' ' read -ra m; do
+ ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
+ has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
+
+ case ${m[2]} in
+ MANPAGE)
+ gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert
+ continue
+ ;;
+ GBM_BACKEND_LIB_SYMLINK) m[4]=../${m[4]};; # missing ../
+ VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/
+ esac
+
+ if [[ -v 'paths[${m[2]}]' ]]; then
+ into=${paths[${m[2]}]}
+ elif [[ ${m[2]} == EXPLICIT_PATH ]]; then
+ into=${m[3]}
+ elif [[ ${m[2]} == *_BINARY ]]; then
+ into=/opt/bin
+ elif [[ ${m[3]} == COMPAT32 ]]; then
+ use abi_x86_32 || continue
+ into=/usr/${libdir32}
+ elif [[ ${m[2]} == *_@(LIB|SYMLINK) ]]; then
+ into=/usr/${libdir}
+ else
+ die "No known installation path for ${m[0]}"
+ fi
+ [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/}
+ [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/}
+
+ if [[ ${m[2]} =~ _SYMLINK$ ]]; then
+ [[ ${m[4]: -1} == / ]] && m[4]=${m[5]}
+ dosym ${m[4]} ${into}/${m[0]}
+ continue
+ fi
+ [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] &&
+ dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest
+
+ printf -v m[1] %o $((m[1] | 0200)) # 444->644
+ insopts -m${m[1]}
+ insinto ${into}
+ doins ${m[0]}
+ done < .manifest || die
+ insopts -m0644 # reset
+
+ # MODULE:installer non-skipped extras
+ : "$(systemd_get_sleepdir)"
+ exeinto "${_#"${EPREFIX}"}"
+ doexe systemd/system-sleep/nvidia
+ dobin systemd/nvidia-sleep.sh
+ systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
+
+ dobin nvidia-bug-report.sh
+
+ # MODULE:powerd extras
+ if use powerd; then
+ newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117
+ systemd_dounit systemd/system/nvidia-powerd.service
+
+ insinto /usr/share/dbus-1/system.d
+ doins nvidia-dbus.conf
+ fi
+
+ # symlink non-versioned so nvidia-settings can use it even if misdetected
+ dosym nvidia-application-profiles-${PV}-key-documentation \
+ ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
+
+ # don't attempt to strip firmware files (silences errors)
+ dostrip -x ${paths[FIRMWARE]}
+
+ # sandbox issues with /dev/nvidiactl others (bug #904292,#921578)
+ # are widespread and sometime affect revdeps of packages built with
+ # USE=opencl/cuda making it hard to manage in ebuilds (minimal set,
+ # ebuilds should handle manually if need others or addwrite)
+ insinto /etc/sandbox.d
+ newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"'
+}
+
+pkg_preinst() {
+ # set video group id based on live system (bug #491414)
+ local g=$(egetent group video | cut -d: -f3)
+ [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')"
+ sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+ ewarn "Detected that the current kernel command line is using 'slub_debug=',"
+ ewarn "this may lead to system instability/freezes with this version of"
+ ewarn "${PN}. Bug: https://bugs.gentoo.org/796329"
+ fi
+}
diff --git a/x11-misc/nvidia-settings/Manifest b/x11-misc/nvidia-settings/Manifest
index 2159108d..9bf1b960 100644
--- a/x11-misc/nvidia-settings/Manifest
+++ b/x11-misc/nvidia-settings/Manifest
@@ -1,3 +1,3 @@
DIST nvidia-settings-390.157.tar.gz 1297247 BLAKE2B 3a2791f8b35131f2036333d31117f5315b4b79720bfbd7724f893caa9daabb5a813bda580f1f4c1df25260393e9c315b1aa362c489e9462ce395a8d58a695bc0 SHA512 03b8cfa287612eaa1699845136283fe1ec4a43212fb0b9d3d0682ce6dd51702fbdfc53c29ea9ebe914034d2c20abb35af7667e0314948842152efd746773771a
-DIST nvidia-settings-470.239.06.tar.gz 1235230 BLAKE2B 2e296ddd04b59d834cac4eaf591b381fc94464f5fab41bcd9a48969d29328f4c27ad84dc2e4aa0273b76e370a96ffeb3e4b7ea95ca545880f5e353e4402a57df SHA512 50640b790e96c4e76cb91983b23d7be8d906f96ebd517b2b7f24445e164c6444b3c686c914b86a3a6198b23082a02165b9e87eba238dfbbd2c74b949e1355c13
-DIST nvidia-settings-535.171.04.tar.gz 1273280 BLAKE2B 25b999fc8590d3536ea99d2bcb20519803dd188c7ea1df72a96a05c7078c37793c8224c4c6dfc38a12184f6e06364f9f53d7d4e6ed8eadb7dd462bf5f052c040 SHA512 d2fb6680dd64bdcc28fcb49555ca9f17bf8b19347e545215c23a3ab3f37e9405229874630645cf1f5d52f71eaa0361665d94c36e9742a255088bc94f4b727dd4
+DIST nvidia-settings-470.256.02.tar.gz 1235206 BLAKE2B 8df813bef9382b08cc36db5be798c7d63fecdea5714d780721516d16106be3751121fbd136f927807d8eb3f5aacafb006a6c58265b7d0a727164aa1a9a2a8f26 SHA512 ffcae8ff5d525aff43a83c919b663ba125e055fe6506bb26bc2d41a2127a2721a199242fe83f74705a1f532047286be498ae18e8f01c9091d5e9edf95f94b76f
+DIST nvidia-settings-550.107.02.tar.gz 1279611 BLAKE2B 696d3e4a646e4a8d3cc0d3dc0ef83d10151cb1858f531ad5fae7c4175ea2fc204dd26ff5bd5f30292dd0935c52dbc47f6dcd41397a7dee03ca5e0272e4b7fc43 SHA512 048bdfb633b16f19338b98d7c251311ea30bae3b008f118c58465155adeef04ec5ab5a6186bd9530c32ae4884a397124478544c14f063bdf7c23020414a56b9e
diff --git a/x11-misc/nvidia-settings/nvidia-settings-390.157-r6.ebuild b/x11-misc/nvidia-settings/nvidia-settings-390.157-r7.ebuild
index fa9f6d6d..87b722de 100644
--- a/x11-misc/nvidia-settings/nvidia-settings-390.157-r6.ebuild
+++ b/x11-misc/nvidia-settings/nvidia-settings-390.157-r7.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit desktop multilib toolchain-funcs
@@ -13,6 +13,7 @@ LICENSE="GPL-2"
SLOT="3"
KEYWORDS="-* amd64"
IUSE=""
+RESTRICT="strip"
QA_PREBUILT=
@@ -93,6 +94,4 @@ src_install() {
domenu ${FILESDIR}/${PN}.desktop || die
dodoc doc/*.txt
-
- rm -rvf ${D}usr/$(get_libdir)/libnvidia-gtk2.so.${PV}
}
diff --git a/x11-misc/nvidia-settings/nvidia-settings-470.239.06-r1.ebuild b/x11-misc/nvidia-settings/nvidia-settings-470.256.02.ebuild
index d660e08b..bb28c4ea 100644
--- a/x11-misc/nvidia-settings/nvidia-settings-470.239.06-r1.ebuild
+++ b/x11-misc/nvidia-settings/nvidia-settings-470.256.02.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit desktop multilib toolchain-funcs
@@ -13,6 +13,7 @@ LICENSE="GPL-2"
SLOT="4"
KEYWORDS="-* amd64"
IUSE=""
+RESTRICT="strip"
QA_PREBUILT=
@@ -90,6 +91,4 @@ src_install() {
domenu ${FILESDIR}/${PN}.desktop || die
dodoc doc/*.txt
-
- rm -rvf ${D}usr/$(get_libdir)/libnvidia-gtk2.so.${PV}
}
diff --git a/x11-misc/nvidia-settings/nvidia-settings-535.171.04-r1.ebuild b/x11-misc/nvidia-settings/nvidia-settings-550.107.02.ebuild
index dc26c6ca..c60069c5 100644
--- a/x11-misc/nvidia-settings/nvidia-settings-535.171.04-r1.ebuild
+++ b/x11-misc/nvidia-settings/nvidia-settings-550.107.02.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
inherit desktop multilib toolchain-funcs
@@ -13,6 +13,7 @@ LICENSE="GPL-2"
SLOT="5"
KEYWORDS="-* amd64"
IUSE=""
+RESTRICT="strip"
QA_PREBUILT=
@@ -90,6 +91,4 @@ src_install() {
domenu ${FILESDIR}/${PN}.desktop || die
dodoc doc/*.txt
-
- rm -rvf ${D}usr/$(get_libdir)/libnvidia-gtk2.so.${PV}
}