commit:     3eb7f332eacc92f97e75c1c80a8379898888601a
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  5 00:43:10 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Jun  5 01:05:02 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3eb7f332

x11-drivers/nvidia-drivers: lessen warnings a bit in latest versions

Most GSP issues should be either resolved or have a low impact
(not counting the 575 bit, but that has its own warning), and
it's difficult to call modeset=1 experimental anymore given the
widespread use (nvidia also plans to enable it by default in the
near future, at which point will likely make it unconditional
here too).

Leaving old branches as-is given state of fixes is unclear.

Also note a TODO for kernel-open, flipping by default soon'ish
would make sense given blackwell cards may increase in use -- but
do not want to do this without a check to avoid breaking things
for users of old cards. Also would prefer if the 575 kernel-open
laptop issue was reported fixed first.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../nvidia-drivers-570.153.02.ebuild               | 24 +++++++---------------
 .../nvidia-drivers/nvidia-drivers-575.57.08.ebuild | 22 ++++++--------------
 2 files changed, 13 insertions(+), 33 deletions(-)

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-570.153.02.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-570.153.02.ebuild
index 1ee6f4fcdca9..c85e71b95f9e 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-570.153.02.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-570.153.02.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 MODULES_OPTIONAL_IUSE=+modules
-inherit desktop dot-a eapi9-pipestatus eapi9-ver flag-o-matic linux-mod-r1
+inherit desktop dot-a eapi9-pipestatus flag-o-matic linux-mod-r1
 inherit readme.gentoo-r1 systemd toolchain-funcs unpacker user-info
 
 MODULES_KERNEL_MAX=6.15
@@ -25,8 +25,9 @@ S=${WORKDIR}
 LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
 SLOT="0/${PV%%.*}"
 KEYWORDS="-* amd64 ~arm64"
-# note: kernel-open is an upstream default in >=560 if all GPUs on the system
-# support it but, since no automagic here, keeping it off for the wider support
+# TODO: enable kernel-open by default to match nvidia upstream, but should
+# first setup a supported-gpus.json "kernelopen" check to abort and avoid bad
+# surprises (should abort for legacy cards too, and have a bypass variable)
 IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs 
+tools wayland"
 REQUIRED_USE="kernel-open? ( modules )"
 
@@ -516,7 +517,6 @@ pkg_preinst() {
        sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
 
        # try to find driver mismatches using temporary supported-gpus.json
-       # TODO?: automatically check "kernelopen" bit for USE=kernel-open compat
        for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do
                g=$(grep -io 
"\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \
                        "${ED}"/usr/share/nvidia/supported-gpus.json 
2>/dev/null)
@@ -580,18 +580,8 @@ pkg_postinst() {
 
        if use wayland && use modules && [[ ! -v NV_HAD_WAYLAND ]]; then
                elog
-               elog "With USE=wayland, this version of ${PN} sets 
nvidia-drm.modeset=1"
-               elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is 
considered"
-               elog "experimental but is required for wayland."
-               elog
-               elog "If you experience issues, either disable wayland or edit 
nvidia.conf."
-               elog "Of note, may possibly cause issues with SLI and Reverse 
PRIME."
-       fi
-
-       if use !kernel-open && ver_replacing -lt 555; then
-               elog
-               elog "If using a Turing/Ampere+ GPU (aka GTX 1650+), note that 
>=nvidia-drivers-555"
-               elog "enables the use of the GSP firmware by default. *If* 
experience regressions,"
-               elog "please see '${EROOT}/etc/modprobe.d/nvidia.conf' to 
optionally disable."
+               elog "Note that with USE=wayland, nvidia-drm.modeset=1 will be 
enabled"
+               elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. *If* experience 
issues,"
+               elog "either disable wayland or edit nvidia.conf."
        fi
 }

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-575.57.08.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-575.57.08.ebuild
index 0f65ededddbe..8d5d58f772a0 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-575.57.08.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-575.57.08.ebuild
@@ -28,8 +28,9 @@ LICENSE="
 "
 SLOT="0/${PV%%.*}"
 KEYWORDS="-* ~amd64 ~arm64"
-# note: kernel-open is an upstream default in >=560 if all GPUs on the system
-# support it but, since no automagic here, keeping it off for the wider support
+# TODO: enable kernel-open by default to match nvidia upstream, but should
+# first setup a supported-gpus.json "kernelopen" check to abort and avoid bad
+# surprises (should abort for legacy cards too, and have a bypass variable)
 IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs 
+tools wayland"
 REQUIRED_USE="kernel-open? ( modules )"
 
@@ -520,7 +521,6 @@ pkg_preinst() {
        sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
 
        # try to find driver mismatches using temporary supported-gpus.json
-       # TODO?: automatically check "kernelopen" bit for USE=kernel-open compat
        for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do
                g=$(grep -io 
"\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \
                        "${ED}"/usr/share/nvidia/supported-gpus.json 
2>/dev/null)
@@ -584,19 +584,9 @@ pkg_postinst() {
 
        if use wayland && use modules && [[ ! -v NV_HAD_WAYLAND ]]; then
                elog
-               elog "With USE=wayland, this version of ${PN} sets 
nvidia-drm.modeset=1"
-               elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is 
considered"
-               elog "experimental but is required for wayland."
-               elog
-               elog "If you experience issues, either disable wayland or edit 
nvidia.conf."
-               elog "Of note, may possibly cause issues with SLI and Reverse 
PRIME."
-       fi
-
-       if use !kernel-open && ver_replacing -lt 555; then
-               elog
-               elog "If using a Turing/Ampere+ GPU (aka GTX 1650+), note that 
>=nvidia-drivers-555"
-               elog "enables the use of the GSP firmware by default. *If* 
experience regressions,"
-               elog "please see '${EROOT}/etc/modprobe.d/nvidia.conf' to 
optionally disable."
+               elog "Note that with USE=wayland, nvidia-drm.modeset=1 will be 
enabled"
+               elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. *If* experience 
issues,"
+               elog "either disable wayland or edit nvidia.conf."
        fi
 
        [[ ${PV} == 575.57.08 ]] || die "TODO: recheck intel+nvidia status & 
cleanup"

Reply via email to