commit:     3a5c720c6adf7674cb5d92a36c5365b739da17ce
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 15:53:28 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 30 16:33:12 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a5c720c

x11-drivers/nvidia-drivers: cleanup old sleep warnings

Shouldn't be overly needed anymore, plus want to avoid
the warning that can get wrongly repeated when switching
branches.

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

 .../nvidia-drivers-470.256.02-r2.ebuild            | 42 +---------------------
 .../nvidia-drivers-535.230.02.ebuild               | 40 ---------------------
 .../nvidia-drivers-550.144.03.ebuild               | 40 ---------------------
 .../nvidia-drivers/nvidia-drivers-550.40.83.ebuild | 40 ---------------------
 .../nvidia-drivers/nvidia-drivers-565.77.ebuild    | 40 ---------------------
 5 files changed, 1 insertion(+), 201 deletions(-)

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r2.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r2.ebuild
index b0d6b97ad07c..1ac00d9739fb 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r2.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -476,46 +476,6 @@ pkg_postinst() {
                ewarn "[2] https://wiki.gentoo.org/wiki/Nouveau";
        fi
 
-       # these can be removed after some time, only to help the transition
-       # given users are unlikely to do further custom solutions if it works
-       # (see also https://github.com/elogind/elogind/issues/272)
-       if grep -riq "^[^#]*HandleNvidiaSleep=yes" 
"${EROOT}"/etc/elogind/sleep.conf.d/ 2>/dev/null
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected HandleNvidiaSleep=yes in 
${EROOT}/etc/elogind/sleep.conf.d/."
-               ewarn "This 'could' cause issues if used in combination with 
the new hook"
-               ewarn "installed by the ebuild to handle sleep using the 
official upstream"
-               ewarn "script. It is recommended to disable the option."
-       fi
-       if [[ $(realpath "${EROOT}"{/etc,{/usr,}/lib*}/elogind/system-sleep 
2>/dev/null | \
-               sort | uniq | xargs -d'\n' grep -Ril nvidia 2>/dev/null | wc 
-l) -gt 2 ]]
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected a custom script at 
${EROOT}{/etc,{/usr,}/lib*}/elogind/system-sleep"
-               ewarn "referencing NVIDIA. This version of ${PN} has installed 
its own"
-               ewarn "hook at ${EROOT}/usr/lib/elogind/system-sleep/nvidia and 
it is recommended"
-               ewarn "to remove the custom one to avoid potential issues."
-               ewarn
-               ewarn "Feel free to ignore this warning if you know the other 
NVIDIA-related"
-               ewarn "scripts can be used together. The warning will be 
removed in the future."
-       fi
-       if [[ ${REPLACING_VERSIONS##* } ]] &&
-               ver_test ${REPLACING_VERSIONS##* } -lt 470.256.02-r1 # may get 
repeated
-       then
-               elog
-               elog "For suspend/sleep, 
'NVreg_PreserveVideoMemoryAllocations=1' is now default"
-               elog "with this version of ${PN}. This is recommended (or 
required) by"
-               elog "major DEs especially with wayland but, *if* experience 
regressions with"
-               elog "suspend, try reverting to =0 in 
'${EROOT}/etc/modprobe.d/nvidia.conf'."
-               elog
-               elog "May notably be an issue when using neither systemd nor 
elogind to suspend."
-               elog
-               elog "Also, the systemd suspend/hibernate/resume services are 
now enabled by"
-               elog "default, and for openrc+elogind a similar hook has been 
installed."
-       fi
-
        ewarn
        ewarn "Be warned/reminded that the 470.xx branch reached end-of-life 
and"
        ewarn "NVIDIA is no longer fixing issues (including security). Free to 
keep"

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-535.230.02.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-535.230.02.ebuild
index 7f52da36b2ef..02fa367c93eb 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-535.230.02.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-535.230.02.ebuild
@@ -573,44 +573,4 @@ pkg_postinst() {
                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
-
-       # these can be removed after some time, only to help the transition
-       # given users are unlikely to do further custom solutions if it works
-       # (see also https://github.com/elogind/elogind/issues/272)
-       if grep -riq "^[^#]*HandleNvidiaSleep=yes" 
"${EROOT}"/etc/elogind/sleep.conf.d/ 2>/dev/null
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected HandleNvidiaSleep=yes in 
${EROOT}/etc/elogind/sleep.conf.d/."
-               ewarn "This 'could' cause issues if used in combination with 
the new hook"
-               ewarn "installed by the ebuild to handle sleep using the 
official upstream"
-               ewarn "script. It is recommended to disable the option."
-       fi
-       if [[ $(realpath "${EROOT}"{/etc,{/usr,}/lib*}/elogind/system-sleep 
2>/dev/null | \
-               sort | uniq | xargs -d'\n' grep -Ril nvidia 2>/dev/null | wc 
-l) -gt 2 ]]
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected a custom script at 
${EROOT}{/etc,{/usr,}/lib*}/elogind/system-sleep"
-               ewarn "referencing NVIDIA. This version of ${PN} has installed 
its own"
-               ewarn "hook at ${EROOT}/usr/lib/elogind/system-sleep/nvidia and 
it is recommended"
-               ewarn "to remove the custom one to avoid potential issues."
-               ewarn
-               ewarn "Feel free to ignore this warning if you know the other 
NVIDIA-related"
-               ewarn "scripts can be used together. The warning will be 
removed in the future."
-       fi
-       if [[ ${REPLACING_VERSIONS##* } ]] &&
-               ver_test ${REPLACING_VERSIONS##* } -lt 535.183.01-r1 # may get 
repeated
-       then
-               elog
-               elog "For suspend/sleep, 
'NVreg_PreserveVideoMemoryAllocations=1' is now default"
-               elog "with this version of ${PN}. This is recommended (or 
required) by"
-               elog "major DEs especially with wayland but, *if* experience 
regressions with"
-               elog "suspend, try reverting to =0 in 
'${EROOT}/etc/modprobe.d/nvidia.conf'."
-               elog
-               elog "May notably be an issue when using neither systemd nor 
elogind to suspend."
-               elog
-               elog "Also, the systemd suspend/hibernate/resume services are 
now enabled by"
-               elog "default, and for openrc+elogind a similar hook has been 
installed."
-       fi
 }

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.144.03.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-550.144.03.ebuild
index 389d910edd3e..69d63203644f 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.144.03.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.144.03.ebuild
@@ -566,44 +566,4 @@ pkg_postinst() {
                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
-
-       # these can be removed after some time, only to help the transition
-       # given users are unlikely to do further custom solutions if it works
-       # (see also https://github.com/elogind/elogind/issues/272)
-       if grep -riq "^[^#]*HandleNvidiaSleep=yes" 
"${EROOT}"/etc/elogind/sleep.conf.d/ 2>/dev/null
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected HandleNvidiaSleep=yes in 
${EROOT}/etc/elogind/sleep.conf.d/."
-               ewarn "This 'could' cause issues if used in combination with 
the new hook"
-               ewarn "installed by the ebuild to handle sleep using the 
official upstream"
-               ewarn "script. It is recommended to disable the option."
-       fi
-       if [[ $(realpath "${EROOT}"{/etc,{/usr,}/lib*}/elogind/system-sleep 
2>/dev/null | \
-               sort | uniq | xargs -d'\n' grep -Ril nvidia 2>/dev/null | wc 
-l) -gt 2 ]]
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected a custom script at 
${EROOT}{/etc,{/usr,}/lib*}/elogind/system-sleep"
-               ewarn "referencing NVIDIA. This version of ${PN} has installed 
its own"
-               ewarn "hook at ${EROOT}/usr/lib/elogind/system-sleep/nvidia and 
it is recommended"
-               ewarn "to remove the custom one to avoid potential issues."
-               ewarn
-               ewarn "Feel free to ignore this warning if you know the other 
NVIDIA-related"
-               ewarn "scripts can be used together. The warning will be 
removed in the future."
-       fi
-       if [[ ${REPLACING_VERSIONS##* } ]] &&
-               ver_test ${REPLACING_VERSIONS##* } -lt 550.107.02-r1 # may get 
repeated
-       then
-               elog
-               elog "For suspend/sleep, 
'NVreg_PreserveVideoMemoryAllocations=1' is now default"
-               elog "with this version of ${PN}. This is recommended (or 
required) by"
-               elog "major DEs especially with wayland but, *if* experience 
regressions with"
-               elog "suspend, try reverting to =0 in 
'${EROOT}/etc/modprobe.d/nvidia.conf'."
-               elog
-               elog "May notably be an issue when using neither systemd nor 
elogind to suspend."
-               elog
-               elog "Also, the systemd suspend/hibernate/resume services are 
now enabled by"
-               elog "default, and for openrc+elogind a similar hook has been 
installed."
-       fi
 }

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.83.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.83.ebuild
index 1ee927ceccbd..f4e1b8c9ff17 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.83.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.83.ebuild
@@ -564,44 +564,4 @@ pkg_postinst() {
                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
-
-       # these can be removed after some time, only to help the transition
-       # given users are unlikely to do further custom solutions if it works
-       # (see also https://github.com/elogind/elogind/issues/272)
-       if grep -riq "^[^#]*HandleNvidiaSleep=yes" 
"${EROOT}"/etc/elogind/sleep.conf.d/ 2>/dev/null
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected HandleNvidiaSleep=yes in 
${EROOT}/etc/elogind/sleep.conf.d/."
-               ewarn "This 'could' cause issues if used in combination with 
the new hook"
-               ewarn "installed by the ebuild to handle sleep using the 
official upstream"
-               ewarn "script. It is recommended to disable the option."
-       fi
-       if [[ $(realpath "${EROOT}"{/etc,{/usr,}/lib*}/elogind/system-sleep 
2>/dev/null | \
-               sort | uniq | xargs -d'\n' grep -Ril nvidia 2>/dev/null | wc 
-l) -gt 2 ]]
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected a custom script at 
${EROOT}{/etc,{/usr,}/lib*}/elogind/system-sleep"
-               ewarn "referencing NVIDIA. This version of ${PN} has installed 
its own"
-               ewarn "hook at ${EROOT}/usr/lib/elogind/system-sleep/nvidia and 
it is recommended"
-               ewarn "to remove the custom one to avoid potential issues."
-               ewarn
-               ewarn "Feel free to ignore this warning if you know the other 
NVIDIA-related"
-               ewarn "scripts can be used together. The warning will be 
removed in the future."
-       fi
-       if [[ ${REPLACING_VERSIONS##* } ]] &&
-               ver_test ${REPLACING_VERSIONS##* } -lt 550.40.71-r1 # may get 
repeated
-       then
-               elog
-               elog "For suspend/sleep, 
'NVreg_PreserveVideoMemoryAllocations=1' is now default"
-               elog "with this version of ${PN}. This is recommended (or 
required) by"
-               elog "major DEs especially with wayland but, *if* experience 
regressions with"
-               elog "suspend, try reverting to =0 in 
'${EROOT}/etc/modprobe.d/nvidia.conf'."
-               elog
-               elog "May notably be an issue when using neither systemd nor 
elogind to suspend."
-               elog
-               elog "Also, the systemd suspend/hibernate/resume services are 
now enabled by"
-               elog "default, and for openrc+elogind a similar hook has been 
installed."
-       fi
 }

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-565.77.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-565.77.ebuild
index 2f947bfb056e..649f3eece71a 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-565.77.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-565.77.ebuild
@@ -586,44 +586,4 @@ pkg_postinst() {
                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."
        fi
-
-       # these can be removed after some time, only to help the transition
-       # given users are unlikely to do further custom solutions if it works
-       # (see also https://github.com/elogind/elogind/issues/272)
-       if grep -riq "^[^#]*HandleNvidiaSleep=yes" 
"${EROOT}"/etc/elogind/sleep.conf.d/ 2>/dev/null
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected HandleNvidiaSleep=yes in 
${EROOT}/etc/elogind/sleep.conf.d/."
-               ewarn "This 'could' cause issues if used in combination with 
the new hook"
-               ewarn "installed by the ebuild to handle sleep using the 
official upstream"
-               ewarn "script. It is recommended to disable the option."
-       fi
-       if [[ $(realpath "${EROOT}"{/etc,{/usr,}/lib*}/elogind/system-sleep 
2>/dev/null | \
-               sort | uniq | xargs -d'\n' grep -Ril nvidia 2>/dev/null | wc 
-l) -gt 2 ]]
-       then
-               ewarn
-               ewarn "!!! WARNING !!!"
-               ewarn "Detected a custom script at 
${EROOT}{/etc,{/usr,}/lib*}/elogind/system-sleep"
-               ewarn "referencing NVIDIA. This version of ${PN} has installed 
its own"
-               ewarn "hook at ${EROOT}/usr/lib/elogind/system-sleep/nvidia and 
it is recommended"
-               ewarn "to remove the custom one to avoid potential issues."
-               ewarn
-               ewarn "Feel free to ignore this warning if you know the other 
NVIDIA-related"
-               ewarn "scripts can be used together. The warning will be 
removed in the future."
-       fi
-       if [[ ${REPLACING_VERSIONS##* } ]] &&
-               ver_test ${REPLACING_VERSIONS##* } -lt 560.35.03-r1 # may get 
repeated
-       then
-               elog
-               elog "For suspend/sleep, 
'NVreg_PreserveVideoMemoryAllocations=1' is now default"
-               elog "with this version of ${PN}. This is recommended (or 
required) by"
-               elog "major DEs especially with wayland but, *if* experience 
regressions with"
-               elog "suspend, try reverting to =0 in 
'${EROOT}/etc/modprobe.d/nvidia.conf'."
-               elog
-               elog "May notably be an issue when using neither systemd nor 
elogind to suspend."
-               elog
-               elog "Also, the systemd suspend/hibernate/resume services are 
now enabled by"
-               elog "default, and for openrc+elogind a similar hook has been 
installed."
-       fi
 }

Reply via email to