summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-11-03 19:17:02 -0500
committerIonen Wolkens <ionen@gentoo.org>2024-11-04 08:27:46 -0500
commit380e65161ef386416fd7510fb1538a86f9c50b1c (patch)
tree6c7399fa0c214e29e4b7428b001f71cae3d8ef58 /x11-drivers
parentapp-misc/fastfetch: add 2.29.0 (diff)
downloadgentoo-380e65161ef386416fd7510fb1538a86f9c50b1c.tar.gz
gentoo-380e65161ef386416fd7510fb1538a86f9c50b1c.tar.bz2
gentoo-380e65161ef386416fd7510fb1538a86f9c50b1c.zip
x11-drivers/nvidia-drivers: disable >=systemd-256's freeze session
Otherwise system may fail to resume from sleep for some nvidia users. Have not tried to reproduce myself, but given Debian, Arch, and likely other distros have done this and systemd itself recommends doing with nvidia, plus a forum users confirmed it helps, let's just do it. Kind of wonder how it took until stable to get someone mentioning issues? Maybe only cause problems for some specific setups. Hopefully doing this here is temporary, kind of feel like systemd upstream could handle this better (nvidia does not seem to be the only case where this can cause problems), or maybe something can be done from nvidia's side. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r2.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild)16
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-535.216.01-r1.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-535.216.01.ebuild)16
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-550.127.05-r1.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-550.127.05.ebuild)16
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-550.40.79-r1.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-550.40.79.ebuild)16
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r3.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r2.ebuild)16
5 files changed, 80 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r2.ebuild
index 5245c34c4a82..bc391906f0f4 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r1.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02-r2.ebuild
@@ -374,6 +374,22 @@ documentation that is installed alongside this README."
# TODO: cleanup after 255.5 been stable for a few months
dosym {/usr/lib,/"${libdir}"}/elogind/system-sleep/nvidia
+ # needed with >=systemd-256 or may fail to resume with some setups
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072722
+ insinto "${unitdir}"/systemd-homed.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
+ EOF
+ insinto "${unitdir}"/systemd-suspend.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false
+ EOF
+ dosym -r "${unitdir}"/systemd-{suspend,hibernate}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,hybrid-sleep}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,suspend-then-hibernate}.service.d/10-nvidia.conf
+
# symlink non-versioned so nvidia-settings can use it even if misdetected
dosym nvidia-application-profiles-${PV}-key-documentation \
${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-535.216.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-535.216.01-r1.ebuild
index 6b5796fa1b55..f6b99ca641ae 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-535.216.01.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-535.216.01-r1.ebuild
@@ -438,6 +438,22 @@ documentation that is installed alongside this README."
# TODO: cleanup after 255.5 been stable for a few months
dosym {/usr/lib,/"${libdir}"}/elogind/system-sleep/nvidia
+ # needed with >=systemd-256 or may fail to resume with some setups
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072722
+ insinto "${unitdir}"/systemd-homed.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
+ EOF
+ insinto "${unitdir}"/systemd-suspend.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false
+ EOF
+ dosym -r "${unitdir}"/systemd-{suspend,hibernate}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,hybrid-sleep}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,suspend-then-hibernate}.service.d/10-nvidia.conf
+
# symlink non-versioned so nvidia-settings can use it even if misdetected
dosym nvidia-application-profiles-${PV}-key-documentation \
${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.127.05.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.127.05-r1.ebuild
index 39be92964955..f34ae07f3e62 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.127.05.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.127.05-r1.ebuild
@@ -428,6 +428,22 @@ documentation that is installed alongside this README."
# TODO: cleanup after 255.5 been stable for a few months
dosym {/usr/lib,/"${libdir}"}/elogind/system-sleep/nvidia
+ # needed with >=systemd-256 or may fail to resume with some setups
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072722
+ insinto "${unitdir}"/systemd-homed.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
+ EOF
+ insinto "${unitdir}"/systemd-suspend.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false
+ EOF
+ dosym -r "${unitdir}"/systemd-{suspend,hibernate}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,hybrid-sleep}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,suspend-then-hibernate}.service.d/10-nvidia.conf
+
# symlink non-versioned so nvidia-settings can use it even if misdetected
dosym nvidia-application-profiles-${PV}-key-documentation \
${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.79.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.79-r1.ebuild
index a3ac0ff7a563..4434d79b1b3d 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.79.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.79-r1.ebuild
@@ -431,6 +431,22 @@ documentation that is installed alongside this README."
# TODO: cleanup after 255.5 been stable for a few months
dosym {/usr/lib,/"${libdir}"}/elogind/system-sleep/nvidia
+ # needed with >=systemd-256 or may fail to resume with some setups
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072722
+ insinto "${unitdir}"/systemd-homed.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
+ EOF
+ insinto "${unitdir}"/systemd-suspend.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false
+ EOF
+ dosym -r "${unitdir}"/systemd-{suspend,hibernate}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,hybrid-sleep}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,suspend-then-hibernate}.service.d/10-nvidia.conf
+
# symlink non-versioned so nvidia-settings can use it even if misdetected
dosym nvidia-application-profiles-${PV}-key-documentation \
${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r2.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r3.ebuild
index e665698e0a26..6f2fc8b8718f 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r2.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-565.57.01-r3.ebuild
@@ -438,6 +438,22 @@ documentation that is installed alongside this README."
# TODO: cleanup after 255.5 been stable for a few months
dosym {/usr/lib,/"${libdir}"}/elogind/system-sleep/nvidia
+ # needed with >=systemd-256 or may fail to resume with some setups
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072722
+ insinto "${unitdir}"/systemd-homed.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
+ EOF
+ insinto "${unitdir}"/systemd-suspend.service.d
+ newins - 10-nvidia.conf <<-EOF
+ [Service]
+ Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false
+ EOF
+ dosym -r "${unitdir}"/systemd-{suspend,hibernate}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,hybrid-sleep}.service.d/10-nvidia.conf
+ dosym -r "${unitdir}"/systemd-{suspend,suspend-then-hibernate}.service.d/10-nvidia.conf
+
# symlink non-versioned so nvidia-settings can use it even if misdetected
dosym nvidia-application-profiles-${PV}-key-documentation \
${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation