commit: eb38d2c9cde3969b1be79cf4ba143041ef589be3 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Fri Jan 16 11:31:04 2026 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Fri Jan 16 12:50:24 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb38d2c9
x11-drivers/nvidia-drivers: re-allow disabling USE=kernel-open ... but keep it enabled by default unlike 580.x, as it should work just fine for most and is hard-required for recent cards. Would have preferred to not go there now that all GPUs supported by this version can use the open variant -- but odds are that the Runtime D3 limitation for Turing GPUs wrt bug #968500 will never be fixed, and this gives a way for users to keep using the latest drivers rather than stick to 580.x (note that still need to disable the GSP firmware in /etc/modprobe.d/nvidia.conf, assuming that it still work as I cannot test this). There is also some regressions like bug #968840 which seems(?) to be related to the open variant, albeit these should be fixed sooner than later. In the future NVIDIA will likely remove support for non-GSP and the closed variant entirely, and this will have to be removed again. Also quite possible that non-GSP will be less tested and become buggier over time, so I would not recommend this unless really needed, or at least not long term. Hopefully haven't overlooked anything, cannot really test changes with my current hardware beside checking that it installs properly. Bug: https://bugs.gentoo.org/968840 Closes: https://bugs.gentoo.org/968500 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> x11-drivers/nvidia-drivers/files/nvidia-590.conf | 6 ++++ x11-drivers/nvidia-drivers/metadata.xml | 6 ++-- ...1.ebuild => nvidia-drivers-590.48.01-r1.ebuild} | 37 ++++++++++++++-------- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/x11-drivers/nvidia-drivers/files/nvidia-590.conf b/x11-drivers/nvidia-drivers/files/nvidia-590.conf index 5ab27a9e9d62..36d71d1664cb 100644 --- a/x11-drivers/nvidia-drivers/files/nvidia-590.conf +++ b/x11-drivers/nvidia-drivers/files/nvidia-590.conf @@ -17,6 +17,12 @@ options nvidia-drm modeset=1 # if need to troubleshoot issues, and re-enable if unrelated. #options nvidia-drm fbdev=0 +# Disable use of the GSP firmware, only an option when USE=kernel-open +# is disabled (which in turn disables usage of Blackwell 50xx or newer +# GPUs). This should not be touched unless it is causing known issues. +# Notably may be needed to get Runtime D3 to work with Turing GPUs. +#options nvidia NVreg_EnableGpuFirmware=0 + # Suspend options. Note that Allocations=1 requires suspend hooks currently # only used when either systemd or elogind is used to suspend. If using # neither or have issues, try Allocations=0 (revert if it does not help diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml index 05def8b16360..d7260344c52e 100644 --- a/x11-drivers/nvidia-drivers/metadata.xml +++ b/x11-drivers/nvidia-drivers/metadata.xml @@ -12,10 +12,8 @@ <use> <flag name="kernel-open"> Use the open source variant of the drivers (only - works for Turing/Ampere or newer GPUs, aka GTX 1650+ - -- recommended with >=560.xx drivers if usable and - is *required* for 50xx Blackwell or newer GPUs -- - always-enabled regardless of USE in >=590.xx) + usable with Turing/Ampere or newer GPUs, aka GTX 1650+ + -- note 50xx Blackwell or newer cards *require* this) </flag> <flag name="persistenced">Install the persistence daemon for keeping devices state when unused (e.g. for headless)</flag> <flag name="powerd">Install the NVIDIA dynamic boost support daemon (only useful with specific laptops, ignore if unsure)</flag> diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-590.48.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-590.48.01-r1.ebuild similarity index 95% rename from x11-drivers/nvidia-drivers/nvidia-drivers-590.48.01.ebuild rename to x11-drivers/nvidia-drivers/nvidia-drivers-590.48.01-r1.ebuild index 79ae5026092f..71316b319c25 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-590.48.01.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-590.48.01-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -29,7 +29,10 @@ LICENSE=" SLOT="0/${PV%%.*}" # kept unkeyworded due to being a beta, users are free to opt-in for testing KEYWORDS="-* ~amd64 ~arm64" -IUSE="+X abi_x86_32 abi_x86_64 persistenced powerd +static-libs +tools wayland" +IUSE=" + +X abi_x86_32 abi_x86_64 +kernel-open persistenced powerd + +static-libs +tools wayland +" COMMON_DEPEND=" acct-group/video @@ -111,7 +114,6 @@ pkg_setup() { require_configured_kernel local CONFIG_CHECK=" - MMU_NOTIFIER PROC_FS ~DRM_KMS_HELPER ~DRM_FBDEV_EMULATION @@ -128,6 +130,8 @@ pkg_setup() { use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764 + use kernel-open && CONFIG_CHECK+=" MMU_NOTIFIER" #843827 + local drm_helper_msg="Cannot be directly selected in the kernel's config menus, and may need selection of a DRM device even if unused, e.g. CONFIG_DRM_QXL=m or DRM_AMDGPU=m (among others, consult the kernel config's help), can @@ -142,7 +146,7 @@ pkg_setup() { local ERROR_DRM_FBDEV_EMULATION="CONFIG_DRM_FBDEV_EMULATION: is not set but is needed for nvidia-drm.fbdev=1 support (see ${EPREFIX}/etc/modprobe.d/nvidia.conf), may result in a blank console/tty." - local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but is required for compilation. + local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but needed to build with USE=kernel-open. Cannot be directly selected in the kernel's menuconfig, and may need selection of another option that requires it such as CONFIG_AMD_IOMMU=y, or DRM_I915=m (among others, consult the kernel config's help)." @@ -197,15 +201,20 @@ src_compile() { if use modules; then local o_cflags=${CFLAGS} o_cxxflags=${CXXFLAGS} o_ldflags=${LDFLAGS} - # environment flags are normally unused for modules, but nvidia uses - # them for building the formerly closed "blob" and it is a bit fragile - filter-flags -fno-plt #912949 - filter-lto - CC=${KERNEL_CC} CXX=${KERNEL_CXX} strip-unsupported-flags - LDFLAGS=$(raw-ldflags) + local modlistargs=video:kernel + if use kernel-open; then + modlistargs+=-module-source:kernel-module-source/kernel-open + + # environment flags are normally unused for modules, but nvidia + # uses it for building the "blob" and it is a bit fragile + filter-flags -fno-plt #912949 + filter-lto + CC=${KERNEL_CC} CXX=${KERNEL_CXX} strip-unsupported-flags + + LDFLAGS=$(raw-ldflags) + fi - : video:kernel-module-source:kernel-module-source/kernel-open - local modlist=( nvidia{,-drm,-modeset,-peermem,-uvm}=${_} ) + local modlist=( nvidia{,-drm,-modeset,-peermem,-uvm}=${modlistargs} ) local modargs=( IGNORE_CC_MISMATCH=yes NV_VERBOSE=1 SYSOUT="${KV_OUT_DIR}" SYSSRC="${KV_DIR}" @@ -557,8 +566,8 @@ pkg_postinst() { elog "\n>=${PN}-590 has changes that may or may not need attention:" elog "1. support for Pascal, Maxwell, and Volta cards has been dropped" elog " (if affected, there should be a another message about this above)" - elog "2. kernel-open USE is gone and the open source variant is *always* used" - elog " (no longer possible to disable GSP with NVreg_EnableGpuFirmware=0)" + elog "2. USE=kernel-open is now enabled by default" + elog " (generally safe and recommended, but some setups may hit regressions)" elog "3. nvidia-drm.modeset=1 is now default regardless of USE=wayland" elog "4. nvidia-drm.fbdev=1 is now also tentatively default to match upstream" elog "See ${EROOT}/etc/modprobe.d/nvidia.conf to modify settings if needed,"
