Elogind

elogind is Article description::the [[systemd project's logind, extracted to a standalone package.]] It's designed for users who prefer a non-systemd init system, but still want to use popular software such as KDE/Wayland or GNOME that otherwise hard-depends on systemd.

Kernel
The following kernel options are recommended:

In the unlikely (and not recommended) event that standard kernel features are enabled for manual configuration, elogind also requires,   and   support. Most users can ignore this.

USE flags
There is a global  USE flag for enabling elogind support in other packages. It's also recommended to disable support for other session trackers to avoid conflicts:

Emerge
After updating the USE flags update the system so the changes take effect:

Service
elogind may be optionally configured to start at boot time:

Alternatively, elogind will be launched automatically when the first service calls it via dbus, or if built with, when the first user logs into the system. However if there are problems getting poweroff/reboot/suspend etc. working from desktop environment, putting elogind into boot runlevel will make sure it is started properly before any user is logged in and so should fix the problem.

startx integration
To have an elogind session created when using to start the X server (instead of a display manager), add the following to the user's  file:

in the above example needs to be replaced by a window manager or a single application.

Hook scripts to be run when suspending/hibernating and/or when resuming/thawing
With elogind the situation is much handier. Any suspend/resume and hibernate/thaw hook scripts need to be in the directory and use the variables $1 (  or  ) and $2 (,  , or  ). For example, in the case of elogind a hook script could have the following format:

loginctl
The command may be used to control and introspect the login manager. For example, to shut down or reboot the system:

For example, to suspend, hibernate or hybrid-suspend the system:

Troubleshooting

 * Forum topic: Elogind not creating a session

Conflict when using hidepid in proc
When procfs is mounted with  and , there will be conflicts with elogind. In order to change this, the needs to be changed to.

See also this forum post https://forums.gentoo.org/viewtopic-t-1099870.html

External resources

 * - integration into Gentoo tracker bug.
 * News item - Desktop profile switching USE default to elogind