* bug#52786: [aarch64] elogind 246.10 fails to start on ROCK64, breaking sway @ 2021-12-25 8:41 pelzflorian (Florian Pelz) 2021-12-28 15:35 ` pelzflorian (Florian Pelz) 0 siblings, 1 reply; 6+ messages in thread From: pelzflorian (Florian Pelz) @ 2021-12-25 8:41 UTC (permalink / raw) To: 52786 [-- Attachment #1: Type: text/plain, Size: 931 bytes --] On a ROCK64 system-on-chip, herd start elogind fails. This is guix commit 87624540b486d710749ad00ef5aa427a9e5c1d0c after the core-updates-frozen merge. This breaks sway for me, which I start from the Linux console. But if I Revert "gnu: elogind: Update to 246.10." This reverts commit a0bf66ab9432675f86095d9a2533d7b80f58a668. then it is working again. (Actually on reconfigure in order to build python-dbusmock I also need to add #:tests? #f to python-dbusmock.) I shall try out if updating to commit 488f1c589df00e802163af534294d93372e5c025 services: dbus: Wait 1 minute for elogind to get ready. helps, but the failure is immediate, so that is probably unrelated. If it does not help, I will bisect the elogind versions. Attached is my config. (Note that the setup is unusual; to boot, I copy all files referenced in /boot/extlinux/extlinux.conf from /gnu/store to /boot/gnu/store.) Regards, Florian [-- Attachment #2: rock64-config.scm --] [-- Type: application/vnd.lotus-screencam, Size: 3390 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#52786: [aarch64] elogind 246.10 fails to start on ROCK64, breaking sway 2021-12-25 8:41 bug#52786: [aarch64] elogind 246.10 fails to start on ROCK64, breaking sway pelzflorian (Florian Pelz) @ 2021-12-28 15:35 ` pelzflorian (Florian Pelz) 2022-01-01 11:47 ` pelzflorian (Florian Pelz) 0 siblings, 1 reply; 6+ messages in thread From: pelzflorian (Florian Pelz) @ 2021-12-28 15:35 UTC (permalink / raw) To: 52786 elogind commit 7db52c01ed07f543f8272ea9a726cb542e771595 is the first elogind version that does not launch, but it is too entangled to simply revert. I will take another look tomorrow. On Sat, Dec 25, 2021 at 09:41:09AM +0100, pelzflorian (Florian Pelz) wrote: > I shall try out if updating to > > commit 488f1c589df00e802163af534294d93372e5c025 > services: dbus: Wait 1 minute for elogind to get ready. > > helps, but the failure is immediate, so that is probably unrelated. I have not yet tried because the check phase of the guix package had failed. Regards, Florian ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#52786: [aarch64] elogind 246.10 fails to start on ROCK64, breaking sway 2021-12-28 15:35 ` pelzflorian (Florian Pelz) @ 2022-01-01 11:47 ` pelzflorian (Florian Pelz) 2022-01-10 17:16 ` pelzflorian (Florian Pelz) 0 siblings, 1 reply; 6+ messages in thread From: pelzflorian (Florian Pelz) @ 2022-01-01 11:47 UTC (permalink / raw) To: 52786 [-- Attachment #1: Type: text/plain, Size: 1610 bytes --] On Tue, Dec 28, 2021 at 04:35:23PM +0100, pelzflorian (Florian Pelz) wrote: > elogind commit 7db52c01ed07f543f8272ea9a726cb542e771595 is the first > elogind version that does not launch, but it is too entangled to > simply revert. I will take another look tomorrow. This was a dead end. With 7db52c01ed07f543f8272ea9a726cb542e771595, elogind did actually launch but shepherd did not recognize it. The attached patch was required, but it does not make a difference for starting sway. (Neither is it an alternative fix for <https://issues.guix.gnu.org/issue/52051>.) Elogind’s entire v246-stable branch does not run sway anymore on ROCK64. I don’t think bisecting is a good way to find the cause. The sway errors are: 00:00:00.013 [ERROR] [wlr] [libseat] [libseat/backend/seatd.c:78] Could not connect to socket /run/seatd.sock: No such file or directory 00:00:00.031 [ERROR] [wlr] [libseat] [libseat/backend/logind.c:267] Could not activate session: Action org.freedesktop.login1.chvt is not registered 00:00:00.031 [ERROR] [wlr] [libseat] [libseat/libseat.c:73] No backend was able to open a seat 00:00:00.031 [ERROR] [wlr] [backend/session/session.c:84] Unable to create seat: Function not implemented 00:00:00.031 [ERROR] [wlr] [backend/session/session.c:218] Failed to load session backend 00:00:00.031 [ERROR] [wlr] [backend/backend.c:353] Failed to start a DRM session 00:00:00.031 [ERROR] [sway/server.c:53] Unable to create backend The first line seems harmless and is also printed on old elogind before sway starts. I will try to actually understand what is happening. Regards, Florian [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: TEST-elogind-Watch-PID-file.patch --] [-- Type: text/plain; charset=utf-8, Size: 1389 bytes --] From: Florian Pelz <pelzflorian@pelzflorian.de> Date: Sat, 1 Jan 2022 12:17:14 +0100 Subject: [PATCH] TEST elogind: Watch PID file. * gnu/services/desktop.scm (elogind-shepherd-service): Set #:pid-file. --- gnu/services/desktop.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index c6761ca784..fc5617c046 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2020 Reza Alizadeh Majd <r.majd@pantherx.org> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> +;;; Copyright © 2022 Florian Pelz <pelzflorian@pelzflorian.de> ;;; ;;; This file is part of GNU Guix. ;;; @@ -731,7 +732,9 @@ (define (elogind-shepherd-service config) #:environment-variables (list (string-append "ELOGIND_CONF_FILE=" #$(elogind-configuration-file - config))))) + config))) + ;; The PID path from elogind's package definition: + #:pid-file "/run/systemd/elogind.pid")) (stop #~(make-kill-destructor))))) (define elogind-service-type base-commit: 87624540b486d710749ad00ef5aa427a9e5c1d0c -- 2.34.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#52786: [aarch64] elogind 246.10 fails to start on ROCK64, breaking sway 2022-01-01 11:47 ` pelzflorian (Florian Pelz) @ 2022-01-10 17:16 ` pelzflorian (Florian Pelz) 2022-06-22 8:59 ` pelzflorian (Florian Pelz) 0 siblings, 1 reply; 6+ messages in thread From: pelzflorian (Florian Pelz) @ 2022-01-10 17:16 UTC (permalink / raw) To: 52786 [-- Attachment #1: Type: text/plain, Size: 270 bytes --] Reverting elogind commit 150d7b05074f16db70a2872765edbb39066d80af makes sway start again. See attached patch. We could graft elogind or put it on core-updates, but I have not yet properly tested nor understood. I will test and try understanding now. Regards, Florian [-- Attachment #2: gnu-elogind-Revert-changes-to-logind-waiting-for-pol.patch --] [-- Type: text/plain, Size: 8293 bytes --] From: Florian Pelz <pelzflorian@pelzflorian.de> Date: Mon, 10 Jan 2022 17:24:50 +0100 Subject: [PATCH] gnu: elogind: Revert changes to logind waiting for polkit. * gnu/packages/patches/elogind-revert-logind-check-policykit.patch: New file. * gnu/packages/freedesktop.scm (elogind): Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/freedesktop.scm | 1 + ...logind-revert-logind-check-policykit.patch | 164 ++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 gnu/packages/patches/elogind-revert-logind-check-policykit.patch diff --git a/gnu/local.mk b/gnu/local.mk index a7106d5f77..f295e22924 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1017,6 +1017,7 @@ dist_patch_DATA = \ %D%/packages/patches/elm-compiler-disable-reactor.patch \ %D%/packages/patches/elm-compiler-fix-map-key.patch \ %D%/packages/patches/elogind-revert-polkit-detection.patch \ + %D%/packages/patches/elogind-revert-logind-check-policykit.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-ignore-empty-xim-styles.patch \ diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index a14fba862c..48f4fb11ce 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -576,6 +576,7 @@ (define-public elogind (base32 "16045bhpwjq2nqgswln67ipg1zrz2djxlgkfngqng3jqpwagmnzq")) (patches (search-patches + "elogind-revert-logind-check-policykit.patch" "elogind-revert-polkit-detection.patch")))) (build-system meson-build-system) (arguments diff --git a/gnu/packages/patches/elogind-revert-logind-check-policykit.patch b/gnu/packages/patches/elogind-revert-logind-check-policykit.patch new file mode 100644 index 0000000000..a589fa9591 --- /dev/null +++ b/gnu/packages/patches/elogind-revert-logind-check-policykit.patch @@ -0,0 +1,164 @@ +From 1c3f1db2f8a93957386813b1be4274f6ac8b851f Mon Sep 17 00:00:00 2001 +From: Florian Pelz <pelzflorian@pelzflorian.de> +Date: Mon, 10 Jan 2022 17:12:40 +0100 +Subject: [PATCH] Revert "logind: check PolicyKit before allowing VT switch" + +This reverts commit 150d7b05074f16db70a2872765edbb39066d80af. +--- + src/login/logind-dbus.c | 16 --------- + src/login/logind-seat-dbus.c | 58 +-------------------------------- + src/login/logind-session-dbus.c | 14 -------- + 3 files changed, 1 insertion(+), 87 deletions(-) + +diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c +index a9c954c43..ba30fa7c3 100644 +--- a/src/login/logind-dbus.c ++++ b/src/login/logind-dbus.c +@@ -1035,8 +1035,6 @@ static int method_activate_session(sd_bus_message *message, void *userdata, sd_b + if (r < 0) + return r; + +- /* PolicyKit is done by bus_session_method_activate() */ +- + return bus_session_method_activate(message, session, error); + } + +@@ -1068,20 +1066,6 @@ static int method_activate_session_on_seat(sd_bus_message *message, void *userda + return sd_bus_error_setf(error, BUS_ERROR_SESSION_NOT_ON_SEAT, + "Session %s not on seat %s", session_name, seat_name); + +- r = bus_verify_polkit_async( +- message, +- CAP_SYS_ADMIN, +- "org.freedesktop.login1.chvt", +- NULL, +- false, +- UID_INVALID, +- &m->polkit_registry, +- error); +- if (r < 0) +- return r; +- if (r == 0) +- return 1; /* Will call us back */ +- + r = session_activate(session); + if (r < 0) + return r; +diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c +index a91765205..01fc8ddf6 100644 +--- a/src/login/logind-seat-dbus.c ++++ b/src/login/logind-seat-dbus.c +@@ -179,20 +179,6 @@ static int method_activate_session(sd_bus_message *message, void *userdata, sd_b + if (session->seat != s) + return sd_bus_error_setf(error, BUS_ERROR_SESSION_NOT_ON_SEAT, "Session %s not on seat %s", name, s->id); + +- r = bus_verify_polkit_async( +- message, +- CAP_SYS_ADMIN, +- "org.freedesktop.login1.chvt", +- NULL, +- false, +- UID_INVALID, +- &s->manager->polkit_registry, +- error); +- if (r < 0) +- return r; +- if (r == 0) +- return 1; /* Will call us back */ +- + r = session_activate(session); + if (r < 0) + return r; +@@ -213,21 +199,7 @@ static int method_switch_to(sd_bus_message *message, void *userdata, sd_bus_erro + return r; + + if (to <= 0) +- return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid virtual terminal"); +- +- r = bus_verify_polkit_async( +- message, +- CAP_SYS_ADMIN, +- "org.freedesktop.login1.chvt", +- NULL, +- false, +- UID_INVALID, +- &s->manager->polkit_registry, +- error); +- if (r < 0) +- return r; +- if (r == 0) +- return 1; /* Will call us back */ ++ return -EINVAL; + + r = seat_switch_to(s, to); + if (r < 0) +@@ -243,20 +215,6 @@ static int method_switch_to_next(sd_bus_message *message, void *userdata, sd_bus + assert(message); + assert(s); + +- r = bus_verify_polkit_async( +- message, +- CAP_SYS_ADMIN, +- "org.freedesktop.login1.chvt", +- NULL, +- false, +- UID_INVALID, +- &s->manager->polkit_registry, +- error); +- if (r < 0) +- return r; +- if (r == 0) +- return 1; /* Will call us back */ +- + r = seat_switch_to_next(s); + if (r < 0) + return r; +@@ -271,20 +229,6 @@ static int method_switch_to_previous(sd_bus_message *message, void *userdata, sd + assert(message); + assert(s); + +- r = bus_verify_polkit_async( +- message, +- CAP_SYS_ADMIN, +- "org.freedesktop.login1.chvt", +- NULL, +- false, +- UID_INVALID, +- &s->manager->polkit_registry, +- error); +- if (r < 0) +- return r; +- if (r == 0) +- return 1; /* Will call us back */ +- + r = seat_switch_to_previous(s); + if (r < 0) + return r; +diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c +index beca34a33..9c223418e 100644 +--- a/src/login/logind-session-dbus.c ++++ b/src/login/logind-session-dbus.c +@@ -194,20 +194,6 @@ int bus_session_method_activate(sd_bus_message *message, void *userdata, sd_bus_ + assert(message); + assert(s); + +- r = bus_verify_polkit_async( +- message, +- CAP_SYS_ADMIN, +- "org.freedesktop.login1.chvt", +- NULL, +- false, +- UID_INVALID, +- &s->manager->polkit_registry, +- error); +- if (r < 0) +- return r; +- if (r == 0) +- return 1; /* Will call us back */ +- + r = session_activate(s); + if (r < 0) + return r; +-- +2.34.0 + base-commit: 87624540b486d710749ad00ef5aa427a9e5c1d0c -- 2.34.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#52786: [aarch64] elogind 246.10 fails to start on ROCK64, breaking sway 2022-01-10 17:16 ` pelzflorian (Florian Pelz) @ 2022-06-22 8:59 ` pelzflorian (Florian Pelz) 2022-06-22 12:26 ` Josselin Poiret via Bug reports for GNU Guix 0 siblings, 1 reply; 6+ messages in thread From: pelzflorian (Florian Pelz) @ 2022-06-22 8:59 UTC (permalink / raw) To: 52786-done On Mon, Jan 10, 2022 at 06:16:03PM +0100, pelzflorian (Florian Pelz) wrote: > Reverting elogind commit 150d7b05074f16db70a2872765edbb39066d80af > makes sway start again. See attached patch. We could graft elogind > or put it on core-updates, but I have not yet properly tested nor > understood. I will test and try understanding now. Closing, because: * muradm added seatd-service-type and using (service seatd-service-type) in lieu of (elogind-service) works. It looks like a better (?) workaround than making elogind work. * I have not understood and do not plan to debug further. Maybe that I can no longer start sway by typing sway in a virtual terminal is even a deliberate change in logind, but then again I don’t see it on x86_64. Regards, Florian ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#52786: [aarch64] elogind 246.10 fails to start on ROCK64, breaking sway 2022-06-22 8:59 ` pelzflorian (Florian Pelz) @ 2022-06-22 12:26 ` Josselin Poiret via Bug reports for GNU Guix 0 siblings, 0 replies; 6+ messages in thread From: Josselin Poiret via Bug reports for GNU Guix @ 2022-06-22 12:26 UTC (permalink / raw) To: pelzflorian (Florian Pelz), 52786-done Hello, "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes: > * muradm added seatd-service-type and using (service > seatd-service-type) in lieu of (elogind-service) works. It looks > like a better (?) workaround than making elogind work. Just FTR, seatd is a light alternative to the seat management part of elogind, but does not replace all of its functionality! There are a couple of things that rely on (e)logind-specific functionality, such as polkit (so by extension NetworkManager or UDisks for example). It's a good alternative, but better be aware of its shortcomings. For a minimal Sway-based desktop it'll work well though :) Best, -- Josselin Poiret ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-22 12:27 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-12-25 8:41 bug#52786: [aarch64] elogind 246.10 fails to start on ROCK64, breaking sway pelzflorian (Florian Pelz) 2021-12-28 15:35 ` pelzflorian (Florian Pelz) 2022-01-01 11:47 ` pelzflorian (Florian Pelz) 2022-01-10 17:16 ` pelzflorian (Florian Pelz) 2022-06-22 8:59 ` pelzflorian (Florian Pelz) 2022-06-22 12:26 ` Josselin Poiret via Bug reports for GNU Guix
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).