Skip to main content
Topic: lightdm: runit service dbus dependency changed to elogind (Read 896 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

lightdm: runit service dbus dependency changed to elogind

lightdm's runit service package used to have a dbus dependency that was changed to an elogind one a few months ago.

Comparing the PKGBUILD's complexity before and after, I can see way you'd make that change. However, I tried to install the most recent package changing nothing but
Code: [Select]
sv start elogind >/dev/null
to
Code: [Select]
sv start dbus >/dev/null
and removing the elogind dependency so I could run it with consolekit+seatd, and it seems to work.

So I want to ask: why change the dependency?

Re: lightdm: runit service dbus dependency changed to elogind

Reply #1
There was a race condition that occurred if you depended on only dbus. Lightdm actually requires logind. That being said, I thought we had refactored all the init backends so that way seatd also provided logind. I'm not sure how you would accomplish this on runit though.

 

Re: lightdm: runit service dbus dependency changed to elogind

Reply #2
As a quick n dirty solution, you can rename /run/runit/service/seatd to /run/runit/service/elogind (no need to rename the underlying /etc/runit/sv/seatd folder) and just pretend seatd is named elogind when using sv.

Re: lightdm: runit service dbus dependency changed to elogind

Reply #3
As a quick n dirty solution, you can rename /run/runit/service/seatd to /run/runit/service/elogind (no need to rename the underlying /etc/runit/sv/seatd folder) and just pretend seatd is named elogind when using sv.
I claim copyright on this one!

And yeah, instead of changing the dependency in lightdm to a wrong one, we could just name the links in the seatd-runit and elogind-runit packages logind (which is basically what s6 does in a different way). And we could just make dependencies on logind instead of the specific providers.

Re: lightdm: runit service dbus dependency changed to elogind

Reply #4
I claim copyright on this one!

And yeah, instead of changing the dependency in lightdm to a wrong one, we could just name the links in the seatd-runit and elogind-runit packages logind (which is basically what s6 does in a different way). And we could just make dependencies on logind instead of the specific providers.
I like this idea. I am also in favour of adding some sort of support to consolekit2, because using seatd on its own is not a great experience. I'm going to adopt the AUR package and add a patch to make it not require pm-utils for shutdown, suspend & friends for my own and others' convenience.

I'm not too hopeful for actual official support because of the need for recompiling polkit with different flags.

Re: lightdm: runit service dbus dependency changed to elogind

Reply #5
What does consolekit2 do exactly again? I know seatd lacks some things like setting XDG_RUNTIME_DIR, but that's what pam_rundir is for (it's in the repos). The big thing that I'm aware of that's still missing is ACL groups, but I didn't think consolekit did that either. Or maybe I'm wrong.

Re: lightdm: runit service dbus dependency changed to elogind

Reply #6
consolekit2 does set XDG_RUNTIME_DIR, and that was actually the main reason I started using consolekit2. Something in pam_rundir broke lightdm and I never figured out what it was. And consolekit2 actually does also have ACL groups if you compile it with --enable-udev-acl, which it is on the current PKGBUILD in the AUR.

Another very important thing consolekit2 has is proper support from polkit (though a polkit compiled for elogind won't work with consolekit). In the seatd thread, users reported problems like some functions from networkmanager breaking. Also many people in the seatd thread (myself included) reported not being able to shutdown/reboot without manually creating polkit files or other workarounds, and I couldn't use timeshift or gparted outside of the terminal. With consolekit2+seatd these all work without the need for manual intervention.

The obvious catch is that consolekit2 has looked like it's dead for 5 years, with most recent work being bugfixes. Since it does work well, I'm not bothered, the only reason I don't consider it feature complete like runit is because of its reliance on two old, deprecated and unmaintained dependencies. pm-utils is the obvious 'rotting for 10+ years' one, and I might make a PR with my changes to finally get rid of it. cgmanager was deprecated in 2016 and maintained until 2019. I haven't seen anyone tackle the cgmanager dependency.

RIght now, consolekit2 patched to directly use kernel methods for suspension plus seatd has worked very well for me and I'll keep using it regardless of official/universe support, but I would appreciate it and I think others switching to seatd would too.

Back on topic, I can't wait for the seatd and elogind providing a logind service change in runit :)

Re: lightdm: runit service dbus dependency changed to elogind

Reply #7
@qontinuum I tried the seatd-runit package currently in staging and I found a problem with it. The way it's currently done, rsm enable logind fails with the error "service directory 'logind' does not exist". But it does let you rsm start logind. Adding to that, rsm enable seatd does work too. That's actually the only way I've found out to have the logind service start at boot. And if you stop the seatd service, the logind service will also stop, mirroring each other.

For me, it worked as I think is intended when I changed the PKGBUILD to

Code: [Select]
package() {
    cd "$srcdir"
    install -Dm755 seatd.run "$pkgdir/etc/runit/sv/logind/run"

    install -d "${pkgdir}/etc/runit/runsvdir/default"
}

The .install file would have to be changed to reflect this, but at least it feels less wonky if you don't have seatd and logind services mirroring each other.

I haven't tested elogind-runit, but looking at the PKGBUILD I assume it has the same issue.