commit: 7ffe759b4dce326196b4a561f4c2c4127779284d Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Mon Jul 19 17:55:02 2021 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Tue Jul 20 01:12:38 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ffe759b
x11-drivers/nvidia-drivers: inform about Coolbits changes As part of a security fix by NVIDIA (unknown if intentional or a bug, NVIDIA has not responded), it became impossible to use Coolbits if Xorg doesn't have root privileges. Fortunately, most users do not need this and complains in ~arch have been minimal. But for the few users for which fan control / reclocking or similar is essential, provide a postinst message only if use of Coolbits is detected (do not wish to spread this unnecessarily so users do not set USE=suid on xorg-server when they don't need it and, even though it been 3 months, it may still be a temporary requirement). Message is primarily aimed at stable users given ~arch had to deal with this for a while already. Bug: https://bugs.gentoo.org/784248 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> .../nvidia-drivers/nvidia-drivers-390.143-r1.ebuild | 16 ++++++++++++++++ .../nvidia-drivers/nvidia-drivers-450.119.03.ebuild | 16 ++++++++++++++++ x11-drivers/nvidia-drivers/nvidia-drivers-460.84.ebuild | 16 ++++++++++++++++ .../nvidia-drivers/nvidia-drivers-470.42.01.ebuild | 16 ++++++++++++++++ .../nvidia-drivers/nvidia-drivers-470.57.02.ebuild | 16 ++++++++++++++++ 5 files changed, 80 insertions(+) diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.143-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.143-r1.ebuild index 8cb722145a5..233548975b0 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.143-r1.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.143-r1.ebuild @@ -385,4 +385,20 @@ pkg_postinst() { elog "Support for EGLStream (egl-wayland) is no longer offered with legacy" elog "nvidia-drivers. It is recommended to use nouveau drivers for wayland." fi + + # Try to show this message only to users that may really need it + # given the workaround is discouraged and usage isn't widespread. + if use X && [[ ${REPLACING_VERSIONS} ]] && + ver_test ${REPLACING_VERSIONS} -lt 390.143 && + grep -qr Coolbits "${EROOT}"/etc/X11/{xorg.conf,xorg.conf.d/*.conf} 2>/dev/null; then + elog + elog "Coolbits support with ${PN} has been restricted to require Xorg" + elog "with root privilege by NVIDIA (being in video group is not sufficient)." + elog "e.g. attempting to change fan speed with nvidia-settings would fail." + elog + elog "Depending on your display manager (e.g. sddm starts X as root, gdm doesn't)" + elog "or if using startx, it may be necessary to emerge x11-base/xorg-server with" + elog 'USE="suid -elogind -systemd" if wish to keep using this feature.' + elog "Bug: https://bugs.gentoo.org/784248" + fi } diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-450.119.03.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-450.119.03.ebuild index 0f37a333d29..71680c78965 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-450.119.03.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-450.119.03.ebuild @@ -406,4 +406,20 @@ pkg_postinst() { ewarn "...then downgrade to a legacy branch if possible. For details, see:" ewarn "https://www.nvidia.com/object/IO_32667.html" fi + + # Try to show this message only to users that may really need it + # given the workaround is discouraged and usage isn't widespread. + if use X && [[ ${REPLACING_VERSIONS} ]] && + ver_test ${REPLACING_VERSIONS} -lt 450.119.03 && + grep -qr Coolbits "${EROOT}"/etc/X11/{xorg.conf,xorg.conf.d/*.conf} 2>/dev/null; then + elog + elog "Coolbits support with ${PN} has been restricted to require Xorg" + elog "with root privilege by NVIDIA (being in video group is not sufficient)." + elog "e.g. attempting to change fan speed with nvidia-settings would fail." + elog + elog "Depending on your display manager (e.g. sddm starts X as root, gdm doesn't)" + elog "or if using startx, it may be necessary to emerge x11-base/xorg-server with" + elog 'USE="suid -elogind -systemd" if wish to keep using this feature.' + elog "Bug: https://bugs.gentoo.org/784248" + fi } diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-460.84.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-460.84.ebuild index f87b9c48062..afd78ca6538 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-460.84.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-460.84.ebuild @@ -399,4 +399,20 @@ pkg_postinst() { ewarn "...then downgrade to a legacy branch if possible. For details, see:" ewarn "https://www.nvidia.com/object/IO_32667.html" fi + + # Try to show this message only to users that may really need it + # given the workaround is discouraged and usage isn't widespread. + if use X && [[ ${REPLACING_VERSIONS} ]] && + ver_test ${REPLACING_VERSIONS} -lt 460.73.01 && + grep -qr Coolbits "${EROOT}"/etc/X11/{xorg.conf,xorg.conf.d/*.conf} 2>/dev/null; then + elog + elog "Coolbits support with ${PN} has been restricted to require Xorg" + elog "with root privilege by NVIDIA (being in video group is not sufficient)." + elog "e.g. attempting to change fan speed with nvidia-settings would fail." + elog + elog "Depending on your display manager (e.g. sddm starts X as root, gdm doesn't)" + elog "or if using startx, it may be necessary to emerge x11-base/xorg-server with" + elog 'USE="suid -elogind -systemd" if wish to keep using this feature.' + elog "Bug: https://bugs.gentoo.org/784248" + fi } diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.42.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.42.01.ebuild index d68e85fb35b..e93f07b1e50 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.42.01.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.42.01.ebuild @@ -424,4 +424,20 @@ pkg_postinst() { ewarn "...then downgrade to a legacy branch if possible. For details, see:" ewarn "https://www.nvidia.com/object/IO_32667.html" fi + + # Try to show this message only to users that may really need it + # given the workaround is discouraged and usage isn't widespread. + if use X && [[ ${REPLACING_VERSIONS} ]] && + ver_test ${REPLACING_VERSIONS} -lt 460.73.01 && + grep -qr Coolbits "${EROOT}"/etc/X11/{xorg.conf,xorg.conf.d/*.conf} 2>/dev/null; then + elog + elog "Coolbits support with ${PN} has been restricted to require Xorg" + elog "with root privilege by NVIDIA (being in video group is not sufficient)." + elog "e.g. attempting to change fan speed with nvidia-settings would fail." + elog + elog "Depending on your display manager (e.g. sddm starts X as root, gdm doesn't)" + elog "or if using startx, it may be necessary to emerge x11-base/xorg-server with" + elog 'USE="suid -elogind -systemd" if wish to keep using this feature.' + elog "Bug: https://bugs.gentoo.org/784248" + fi } diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.57.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.57.02.ebuild index d68e85fb35b..e93f07b1e50 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.57.02.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.57.02.ebuild @@ -424,4 +424,20 @@ pkg_postinst() { ewarn "...then downgrade to a legacy branch if possible. For details, see:" ewarn "https://www.nvidia.com/object/IO_32667.html" fi + + # Try to show this message only to users that may really need it + # given the workaround is discouraged and usage isn't widespread. + if use X && [[ ${REPLACING_VERSIONS} ]] && + ver_test ${REPLACING_VERSIONS} -lt 460.73.01 && + grep -qr Coolbits "${EROOT}"/etc/X11/{xorg.conf,xorg.conf.d/*.conf} 2>/dev/null; then + elog + elog "Coolbits support with ${PN} has been restricted to require Xorg" + elog "with root privilege by NVIDIA (being in video group is not sufficient)." + elog "e.g. attempting to change fan speed with nvidia-settings would fail." + elog + elog "Depending on your display manager (e.g. sddm starts X as root, gdm doesn't)" + elog "or if using startx, it may be necessary to emerge x11-base/xorg-server with" + elog 'USE="suid -elogind -systemd" if wish to keep using this feature.' + elog "Bug: https://bugs.gentoo.org/784248" + fi }
