Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session management #263

Merged
merged 1 commit into from
May 20, 2020
Merged

Session management #263

merged 1 commit into from
May 20, 2020

Conversation

ericonr
Copy link
Member

@ericonr ericonr commented May 10, 2020

Ok, this one is a slight overhaul of the session management stuff. I still don't mention stuff like polkit, but I don't think it's that needed. D-Bus is explained in very rough terms, so any input is welcome for that part.

@ericonr ericonr requested a review from abenson May 10, 2020 05:02
@ericonr
Copy link
Member Author

ericonr commented May 11, 2020

@travankor I added the dbus dependency for elogind here. Do you think it's well explained?

`systemd-logind`, a service to manage user logins. This service provides
necessary features for most desktop environments and Wayland compositors. To
make use of its features, install the `elogind` package and enable the `dbus`
service. This might require a reboot.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All you need to do is restart your session AFAIK (ie. go back to login). When you authenticate, elogind will start.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was talking more specifically about dbus itself. That's what @flexibeast experienced, at least, IIRC. elogind requires only that you log out and then log back in?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to depend on the context. In my VM testing, i've found that GNOME requires a reboot after enabling dbus, but KDE doesn't. i don't recall anything needing to be done after installing elogind.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Oh and i should add: logging out and back in again after enabling dbus is not enough for GNOME. i just checked this a couple of hours ago, and it definitely needs a reboot.)

If you're having any issues with `elogind`, [enable](./services/index.md) its
service, as waiting for a D-Bus activation can lead to issues.

If you have the [acpid(8)](https://man.voidlinux.org/acpid) service enabled,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you can ignore the acpid functions in elogind in /etc/elogind/logind.conf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have some idea on how to explain this? I couldn't find an explicit list of what acpid functions were available in logind.conf(5).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added mostly what you said, if you have some function list we could consider adding it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically everything that can accept "ignore" should all say "ignore". Like the Handle* section, for example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of my phrasing now?

Copy link
Member

@ahesford ahesford May 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

By default, `elogind` listens for and processes ACPI events related to lid-switch
activation and presses of power, suspend and hibernate keys. This will conflict
with `acpid` if it is installed an enabled. Either disable `acpid` when enabling
`elogind` or modify `/etc/elogind/logind.conf` to ignore these events within
`elogind`. The `HandlePowerKey`, `HandleSuspendKey`, `HandleHibernateKey`
and multiple `HandleLidSwitch` options in [logind.conf(5)](https://man.voidlinux.org/logind.conf.5)
should be set to `ignore` to stop `elogind` from responding to ACPI events.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@travankor "options related to controlling acpi events", possibly.

@ahesford do you think those will remain valid? I don't want to let the docs grow stale.

Copy link
Member

@ahesford ahesford May 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to be agnostic, then

Either disable `acpid` when enabling `elogind` or configure `elogind`
to `ignore` ACPI events in `/etc/elogind/logind.conf`. The
[logind.conf(5) man page](https://man.voidlinux.org/logind.conf.5)
describes several configuration options, all starting with the keyword `Handle`,
that should be set to `ignore` to avoid interfering with `acpid`.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you both :D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed it up a bit, I think it looks good now.

@ericonr ericonr changed the title [WIP] Session management [Session management May 17, 2020
@ericonr ericonr changed the title [Session management Session management May 17, 2020
@ericonr
Copy link
Member Author

ericonr commented May 17, 2020

@flexibeast would it be okay with you if I factored out the dbus-run-session information from #282 to link to this page instead?

@flexibeast
Copy link
Contributor

@ericonr: Oh! Sorry, i forgot about this PR when doing #282. Yes, certainly.

service. This might require a system reboot to work properly.
- To use it as a user bus, you can start a given program (usually a window
manager or interactive shell) with
[dbus-run-session(1)](https://man.voidlinux.org/dbus-run-session.1). Most
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to check, are there actually any use-cases where dbus-run-session(1) isn't appropriate, such that users should use dbus-launch(1) instead? @abenson?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er, sorry, i meant @ahesford. But of course @abenson is welcome to chime in as well. :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dbus-launch can be used without the --exit-with-X11 argument in ways that dbus-run-session cannot, like launching a short-lived program but keeping the message bus alive. However, in the context of this document, the choice is really between dbus-run-session and dbus-launch --exit-with-x11. I don't believe there is any case where the latter would be preferred. For one, the --exit-with-x11 option obviously requires X11. The dbus-run-session command is more general and, in my view, takes a more robust approach to lifetime management. (DBus is kept alive as long as the child, not when some second, single-purpose process loses its connection to an X server.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, it makes sense to leave this item as is, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericonr: On the basis of @ahesford's comment, yes, i think it can be left as-is.

@flexibeast flexibeast mentioned this pull request May 18, 2020
@ericonr ericonr force-pushed the session-management branch 2 times, most recently from 1586403 to 8d39fe0 Compare May 18, 2020 03:46
atweiden pushed a commit to atweiden/pacfiles that referenced this pull request May 18, 2020
- Move to config/ from config/graphical-session/

- Add D-Bus header

- Expand elogind header
  - Add dbus dependency
  - Add more explanation
  - Update troubleshooting with acpid

- xorg.md: refer to session-management for D-Bus
@ericonr ericonr merged commit a226ba5 into void-linux:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants