diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2021-07-19 13:55:02 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2021-07-19 21:12:38 -0400 |
commit | 7ffe759b4dce326196b4a561f4c2c4127779284d (patch) | |
tree | c8081e614dac2bb2f37fd7aabdd3dc898d26e0f0 /x11-drivers | |
parent | x11-drivers/nvidia-drivers: drop 465.31, end of 0/465 branch (diff) | |
download | gentoo-7ffe759b4dce326196b4a561f4c2c4127779284d.tar.gz gentoo-7ffe759b4dce326196b4a561f4c2c4127779284d.tar.bz2 gentoo-7ffe759b4dce326196b4a561f4c2c4127779284d.zip |
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@gentoo.org>
Diffstat (limited to 'x11-drivers')
5 files changed, 80 insertions, 0 deletions
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 8cb722145a59..233548975b04 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 0f37a333d294..71680c789650 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 f87b9c480628..afd78ca65386 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 d68e85fb35b5..e93f07b1e500 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 d68e85fb35b5..e93f07b1e500 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 } |