! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-session: runtime detect consolekit/logind
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description Fabio Erculiani 2013-05-10 08:21:00 CEST
Created attachment 5031 
logind/consolekit runtime detection patch

There is a general consensus (especially in the GNOME world) that before dropping any support for consolekit, both consolekit and logind should be detected at runtime.
This helps distributions planning to gently migrate from consolekit to logind to roll out a reliable path: enable logind support, have all the packages detect consolekit/logind at runtime, eventually migrate to logind reducing the risk of breaking current installations.

The patch I am proposing is exactly doing this, the same way GNOME does: have xfce4-session detect logind at runtime if --enable-systemd is passed to ./configure.
The attached patch is being currently tested in Sabayon and Gentoo (it's available on the systemd-love Portage overlay).
Comment 1 Yves-Alexis Perez editbugs 2013-10-24 21:30:57 CEST
Hey there,

can someone comment on this?
Comment 2 Yves-Alexis Perez editbugs 2014-02-23 14:37:44 CET
I've tried this patch on top of 4.11 (which includes the “static” systemd support).

Patch applies fine and compile fine, but at runtime we still have a problem, actually, on systems where systemd-logind is running but systemd is not pid 1 (which is possible on logind < 204 and is a target goal in Ubuntu and maybe Debian). In that case, xfce4-session will prefer logind/systemd over consolekit/upower, but it'll fail to suspend.

I'm not sure if there's a way to actually fix that, maybe systemd-shim will help.
Comment 3 Yves-Alexis Perez editbugs 2014-02-23 15:06:54 CET
(In reply to Yves-Alexis Perez from comment #2)
> I'm not sure if there's a way to actually fix that, maybe systemd-shim will
> help.

So, it seems that it does help, so we have at least some kind of workaround.
Comment 4 Samuli Suominen 2014-06-02 18:45:10 CEST
Seems like this bug should be adapted to work of bug 9952, or maybe closed
Comment 5 Yves-Alexis Perez editbugs 2014-06-28 11:19:02 CEST
It seems that this current patch unfortunately doesn't handle logind beeing restarted (for example after a logind upgrade). That means that hardware-dependent features (shutdown/reboot etc.) are not supported after an upgrade, the user needs to restart the session.

More info at http://bugs.debian.org/752744
Comment 6 Yves-Alexis Perez editbugs 2014-06-28 12:04:35 CEST
Actually, I take that back, that's only with 4.10 without the patch that the problem occurs, which makes sense anyway.
Comment 7 Eric Koegel editbugs 2014-09-22 19:33:27 CEST
Something similar to this proposed patch was pushed in http://git.xfce.org/xfce/xfce4-session/commit/?id=0bc5eb603a3ab4af930fac70e03cfe7aa63a399e

Marking this bug resolved.

Bug #10076

Reported by:
Fabio Erculiani
Reported on: 2013-05-10
Last modified on: 2014-09-22

People

Assignee:
Xfce Bug Triage
CC List:
6 users

Version

Version:
4.10.1

Attachments

Additional information