Accepting request 1189388 from home:mkoutny:branches:Base:System:simple
- Add 5004-disable-session-freeze.patch as a temporary workaround for https://github.com/systemd/systemd/issues/33083 OBS-URL: https://build.opensuse.org/request/show/1189388 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1548
This commit is contained in:
parent
fd124384ff
commit
6882300393
53
5004-disable-session-freeze.patch
Normal file
53
5004-disable-session-freeze.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From: Michal Koutný <mkoutny@suse.com>
|
||||
Date: Wed, 24 Jul 2024 14:20:17 +0200
|
||||
Subject: Disable session freeze
|
||||
|
||||
Freezing of user.slice is not reliable and it breaks regular suspend/resume
|
||||
operations for users [1].
|
||||
Disable the partial (user.slice) freezing (rely on kernel freezing of every
|
||||
task upon suspend) since the benefit of user.slice freezing does not outweight
|
||||
the breakage caused by cgroup freezing implementation.
|
||||
|
||||
[1] https://github.com/systemd/systemd/issues/33083
|
||||
---
|
||||
src/home/homework.c | 7 ++++---
|
||||
src/sleep/sleep.c | 8 +++++---
|
||||
2 files changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/src/sleep/sleep.c
|
||||
+++ b/src/sleep/sleep.c
|
||||
@@ -603,12 +603,14 @@ static int run(int argc, char *argv[]) {
|
||||
r = getenv_bool("SYSTEMD_SLEEP_FREEZE_USER_SESSIONS");
|
||||
if (r < 0 && r != -ENXIO)
|
||||
log_warning_errno(r, "Cannot parse value of $SYSTEMD_SLEEP_FREEZE_USER_SESSIONS, ignoring.");
|
||||
+ if (r == -ENXIO)
|
||||
+ r = 0; /* Do not freeze by default unless requested */
|
||||
if (r != 0)
|
||||
(void) unit_freezer_new_freeze(SPECIAL_USER_SLICE, &user_slice_freezer);
|
||||
else
|
||||
- log_notice("User sessions remain unfrozen on explicit request ($SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0).\n"
|
||||
- "This is not recommended, and might result in unexpected behavior, particularly\n"
|
||||
- "in suspend-then-hibernate operations or setups with encrypted home directories.");
|
||||
+ log_notice("User sessions remain unfrozen (add $SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=1 to override),\n"
|
||||
+ "relying on kernel to perform the freeze.\n"
|
||||
+ "This is a temporary downstream workaround for https://github.com/systemd/systemd/issues/33083.");
|
||||
|
||||
switch (arg_operation) {
|
||||
|
||||
--- a/src/home/homework.c
|
||||
+++ b/src/home/homework.c
|
||||
@@ -1879,10 +1879,11 @@ static int user_session_freezer(uid_t ui
|
||||
r = getenv_bool("SYSTEMD_HOME_LOCK_FREEZE_SESSION");
|
||||
if (r < 0 && r != -ENXIO)
|
||||
log_warning_errno(r, "Cannot parse value of $SYSTEMD_HOME_LOCK_FREEZE_SESSION, ignoring: %m");
|
||||
- else if (r == 0) {
|
||||
+ else if (r == 0 || r == -ENXIO) { /* Do not freeze by default unless requested */
|
||||
if (freeze_now)
|
||||
- log_notice("Session remains unfrozen on explicit request ($SYSTEMD_HOME_LOCK_FREEZE_SESSION=0).\n"
|
||||
- "This is not recommended, and might result in unexpected behavior including data loss!");
|
||||
+ log_notice("Session remains unfrozen (add $SYSTEMD_HOME_LOCK_FREEZE_SESSION=1 to override).\n"
|
||||
+ "This is a temporary downstream workaround for https://github.com/systemd/systemd/issues/33083.\n"
|
||||
+ "Home locking is thus experimental and might result in unexpected behavior including data loss!");
|
||||
|
||||
*ret = NULL;
|
||||
return 0;
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 24 12:34:13 UTC 2024 - Michal Koutný <mkoutny@suse.com>
|
||||
|
||||
- Add 5004-disable-session-freeze.patch as a temporary workaround for
|
||||
https://github.com/systemd/systemd/issues/33083
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 22 12:06:23 UTC 2024 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file
|
||||
# spec file for package systemd
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
@ -233,6 +233,7 @@ Patch: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch
|
||||
# will be removed as soon as a proper fix will be merged by upstream.
|
||||
Patch: 5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch
|
||||
Patch: 5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch
|
||||
Patch: 5004-disable-session-freeze.patch
|
||||
%endif
|
||||
Patch: 5003-core-when-switching-root-remove-run-systemd-before-e.patch
|
||||
|
||||
@ -336,7 +337,7 @@ Requires: group(lp)
|
||||
Requires(pre): group(kvm)
|
||||
Requires(post): sed
|
||||
Requires(post): coreutils
|
||||
Requires(postun):coreutils
|
||||
Requires(postun): coreutils
|
||||
# 'regenerate_initrd_post' macro is expanded during build, hence this BR.
|
||||
BuildRequires: suse-module-tools
|
||||
%if %{without bootstrap}
|
||||
|
Loading…
Reference in New Issue
Block a user