Init systems => dinit => Topic started by: nyugdijhunter on 06 August 2023, 18:46:00
Title: dinit-userservd doesn't spawn user dinit
Post by: nyugdijhunter on 06 August 2023, 18:46:00
I installed the artix fork of dinit-userservd (https://github.com/Xynonners/dinit-userservd (https://github.com/Xynonners/dinit-userservd)), started the service, and added "session optional pam_dinit_userservd.so" to /etc/pam.d/login, but the dinit user instance still doesn't spawn. What might I be missing here?
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: davmac on 09 August 2023, 07:16:51
Do you have your user services set up (i.e. service descriptions in place), including a `boot` service?
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: nyugdijhunter on 09 August 2023, 10:47:50
auth required pam_securetty.so auth requisite pam_nologin.so auth include system-local-login account include system-local-login session include system-local-login session optional pam_dinit_userservd.so password include system-local-login
If that's what you also have and it doesn't work, I guess you would need to debug it. See if you can find if PAM itself has logged anything; perhaps try running strace on the dinit-userservd process.
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: kiblaster on 10 August 2023, 20:38:01
Do you use "strace dinitctl restart dinit-userservd" to debug?
You need to trace dinit-userservd, not dinitctl. I was thinking along the lines of:
login on a virtual terminal as root, strace the dinit-userservd process by its pid
seperately log in as user
go back to the root terminal and check the trace for activity
If you see activity in the trace, hopefully it gives some clue to what's going wrong. If there's no activity it means your PAM configuration isn't right or the pam_dinit_userservd.so PAM module isn't working properly; in either case the PAM logs are probably the best bet.
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: negative on 27 September 2023, 02:58:48
same issue here with dinit-userservd. service itself starts, but user services do not run. /var/log/dinit-userservd.log does not show anything and /etc/security/login does not exist in my case. well, is should be in /etc/pam.d/login but still it cannot run user service or write anything to its logfile.
running the dir with dinit as user works fine.
UPDATE: well i got it fixed. from the reddit post, 'session optional pam_dinit_userservd.so' should be in '/etc/pam.d/system-login' (at least for me) and not in /etc/pam.d/login as the original guide suggested. now dinit-runservd spawns dinit --user correctly and runs users services fine.
new issue though. as using this method will cause "dinitctl" to loose the socket of dinit when you logout from the session and log back in. you needed to reboot in order for this to work again. not sure how to deal with that yet.
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: davmac on 27 September 2023, 14:25:35
Quote
'session optional pam_dinit_userservd.so' should be in '/etc/pam.d/system-login' (at least for me) and not in /etc/pam.d/login as the original guide suggested. now dinit-runservd spawns dinit --user correctly and runs users services fine.
Putting it in login works for me, but that's with console login. If you're using a display manager it could be different. I think system-login is probably more correct; that seems to get included by other logins anyway.
However:
Quote
new issue though. as using this method will cause "dinitctl" to loose the socket of dinit when you logout from the session and log back in. you needed to reboot in order for this to work again. not sure how to deal with that yet
I'm pretty sure elogind is managing the runtime dir, so I believe it's important to make sure that the elogind pam module is listed before the dinit-userservd module. With that arrangement, it all works fine and I don't get this problem. On the other hand if I put them the other way around, dinitctl never has a socket to work with, so this doesn't seem to be exactly the same as what you're describing.
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: negative on 28 September 2023, 16:01:59
well, i guess my problem because i was using greetd/greetd-gtkgreet combo as my login manager. somehow it breaks the user session. logging in through TTY work fine. not tested yet if things still work when switching to another user.
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: kiblaster on 28 September 2023, 21:39:22
Using /etc/pam.d/system-login worked but some services that normally works now fail.
Also after logging out it wasn't working anymore, dinitctl couldn't find the dinit instance. I ran pkill dinit, there was a process, and after logging out the instance was fine. I logged out a few times looks like it is always like that.
Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY M 21:32:51.530117 pw.core ../pipewire/src/pipewire/core.c:180:destroy_proxy: 0x55855eb08730: leaked proxy 0x55855ebaa280 id:4 M 21:32:51.530226 wireplumber ../wireplumber/src/main.c:364:on_disconnected: disconnected from pipewire Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY M 21:32:51.736933 pw.core ../pipewire/src/pipewire/core.c:180:destroy_proxy: 0x558fe612b550: leaked proxy 0x558fe61c46d0 id:3 M 21:32:51.736994 wireplumber ../wireplumber/src/main.c:364:on_disconnected: disconnected from pipewire Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY M 21:32:51.934022 pw.core ../pipewire/src/pipewire/core.c:180:destroy_proxy: 0x55cf5a326550: leaked proxy 0x55cf5a3be9b0 id:3 M 21:32:51.934076 wireplumber ../wireplumber/src/main.c:364:on_disconnected: disconnected from pipewire Error acquiring bus address: Cannot autolaunch D-Bus without X11 $DISPLAY M 21:32:52.135160 pw.core ../pipewire/src/pipewire/core.c:180:destroy_proxy: 0x56508faf3690: leaked proxy 0x56508fb8f870 id:3 M 21:32:52.135249 wireplumber ../wireplumber/src/main.c:364:on_disconnected: disconnected from pipewire
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: negative on 29 September 2023, 00:48:57
@kikblaster
what loginmanager are you using?
it appears that when using only tty to login/logout, the '/run/user/$UID' does not gets wipe hence dinitctl in user-mode works. while when using loginmanager (i've used greetd and ly) '/run/user/$UID' is wiped out. and no matter how dinit-userservd is restarted it can never respawn a dinit instance for the currently logged-in user.
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: kiblaster on 29 September 2023, 16:45:25
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: konimex on 30 September 2023, 13:55:45
Please note that dinit-userservd has never been supported, and the "Artix fork" of it has been unmaintained for some time. However, turnstile nowadays is practically distro-neutral and has distro interoperability as its priority.
Hence, to make it easier for all interested users to try it (and also that I actually am using it right now to test it), I've added all turnstile-related packages along with some example services (dbus, pipewire, wireplumber, mpd) that actually works in my case to the [galaxy] repo under the turnstile-experimental group, so you would need to enable it in /etc/pacman.conf. I hope the addition becomes a useful data point for turnstile developers for bugs, quirks, and whatnot. Also, if possible (albeit unrelated to dinit), I hope it gets another service manager backend (such as s6).
Please note that this does not mean I'm officially supporting turnstile (yet, at least).
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: negative on 30 September 2023, 14:52:36
Please note that dinit-userservd has never been supported, and the "Artix fork" of it has been unmaintained for some time. However, turnstile nowadays is practically distro-neutral and has distro interoperability as its priority.
Hence, to make it easier for all interested users to try it (and also that I actually am using it right now to test it), I've added all turnstile-related packages along with some example services (dbus, pipewire, wireplumber, mpd) that actually works in my case to the [galaxy] repo under the turnstile-experimental group, so you would need to enable it in /etc/pacman.conf. I hope the addition becomes a useful data point for turnstile developers for bugs, quirks, and whatnot. Also, if possible (albeit unrelated to dinit), I hope it gets another service manager backend (such as s6).
Please note that this does not mean I'm officially supporting turnstile (yet, at least).
thanks. just did a quick test (installed and enabled turnstile-experimental and all modules) and session appears to be working fine after login/logout and login back.
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: konimex on 02 October 2023, 15:09:41
Since turnstile-0.1.8-3, the system dinit service of turnstile has been separated from the turnstile main package (it should be on turnstile-dinit now), you will need to install it separately.
Also, because turnstile is primarily concerned with user services, there's no reason to restrict turnstile to depend on dinit, preventing users with other init systems to try it. Therefore all user service packages and turnstile itself will only depend on dinit-base so you would only need the dinit binaries (also the fact that dinit is the only turnstile backend, for now).
On an aside note (albeit unrelated to dinit), turnstile-openrc package has been added to galaxy so users with OpenRC as their init system can try it.
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: kiblaster on 02 October 2023, 16:45:14
I installed turnstile, enabled the service and rebooted.
User dinit cannot conncet to the socket, there is no dinit process at all, but dinitctl shows it fine:
:: Starting full system upgrade... [...] :: knotifications5 and knotifications are in conflict. Remove knotifications? [y/N] y :: kwindowsystem5 and kwindowsystem are in conflict. Remove kwindowsystem? [y/N] y :: kconfig5 and kconfig are in conflict. Remove kconfig? [y/N]
It works as dinit-userserv the same service that normally works are now failing. Does it need to run dbus service? I am using instead "exec dbus-launch --exit-with-session bspwm".
cat /var/log/turnstiled.log srv: pam_close_session: Cannot make/remove an entry for the specified sessiondinit: In multiple cgroups, cannot determine cgroup root path dinit: Could not open dependency directory '/usr/lib/dinit.d/user/boot.d' for system service. [ OK ] system [ OK ] picom [ OK ] pipewire.user [ OK ] pasystray [ OK ] pipewire-pulse.user [ OK ] wireplumber.user [ OK ] boot Service 'boot' started. dinit: Service picom process terminated with exit code 1 [STOPPD] picom [ OK ] picom dinit: Service picom process terminated with exit code 1 [STOPPD] picom dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray [ OK ] pasystray dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray [ OK ] picom dinit: Service picom process terminated with exit code 1 [STOPPD] picom [ OK ] pasystray dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray dinit: Service wireplumber.user process terminated with exit code 70 [ OK ] picom dinit: Service picom process terminated with exit code 1 dinit: Service picom restarting too quickly; stopping. [STOPPD] picom [ OK ] pasystray dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service wireplumber.user restarting too quickly; stopping. dinit: Service wireplumber.user restarting too quickly; stopping. [STOPPD] wireplumber.user dinit: Service pasystray process terminated with exit code 1 dinit: Service pasystray restarting too quickly; stopping. [STOPPD] pasystray [ OK ] wireplumber.user dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service wireplumber.user restarting too quickly; stopping. dinit: Service wireplumber.user restarting too quickly; stopping. [STOPPD] wireplumber.user [ OK ] picom dinit: Service picom process terminated with exit code 1 [STOPPD] picom [ OK ] picom dinit: Service picom process terminated with exit code 1 [STOPPD] picom [ OK ] picom dinit: Service picom process terminated with exit code 1 [STOPPD] picom [ OK ] picom dinit: Service picom process terminated with exit code 1 dinit: Service picom restarting too quickly; stopping. [STOPPD] picom [ OK ] pasystray dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray [ OK ] pasystray dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray [ OK ] pasystray dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray [ OK ] pasystray dinit: Service pasystray process terminated with exit code 1 dinit: Service pasystray restarting too quickly; stopping. [STOPPD] pasystray [STOPPD] boot [STOPPD] system [STOPPD] pipewire.user [STOPPD] pipewire-pulse.user dinit: In multiple cgroups, cannot determine cgroup root path dinit: Could not open dependency directory '/usr/lib/dinit.d/user/boot.d' for system service. [ OK ] system [ OK ] pipewire.user [ OK ] pasystray [ OK ] picom [ OK ] pipewire-pulse.user [ OK ] wireplumber.user [ OK ] boot Service 'boot' started. dinit: Service picom process terminated with exit code 1 [STOPPD] picom dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray [ OK ] picom [ OK ] pasystray dinit: Service picom process terminated with exit code 1 [STOPPD] picom dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service wireplumber.user process terminated with exit code 70 [ OK ] picom [ OK ] pasystray dinit: Service picom process terminated with exit code 1 [STOPPD] picom dinit: Service pasystray process terminated with exit code 1 [STOPPD] pasystray dinit: Service wireplumber.user process terminated with exit code 70 [ OK ] pasystray [ OK ] picom dinit: Service picom process terminated with exit code 1 dinit: Service picom restarting too quickly; stopping. [STOPPD] picom dinit: Service pasystray process terminated with exit code 1 dinit: Service pasystray restarting too quickly; stopping. [STOPPD] pasystray dinit: Service wireplumber.user process terminated with exit code 70 dinit: Service wireplumber.user restarting too quickly; stopping. dinit: Service wireplumber.user restarting too quickly; stopping. [STOPPD] wireplumber.user [STOPPD] boot [STOPPD] system [STOPPD] pipewire-pulse.user [STOPPD] pipewire.user
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: konimex on 04 October 2023, 00:25:48
:: Starting full system upgrade... [...] :: knotifications5 and knotifications are in conflict. Remove knotifications? [y/N] y :: kwindowsystem5 and kwindowsystem are in conflict. Remove kwindowsystem? [y/N] y :: kconfig5 and kconfig are in conflict. Remove kconfig? [y/N]
It works as dinit-userserv the same service that normally works are now failing. Does it need to run dbus service? I am using instead "exec dbus-launch --exit-with-session bspwm".
Re: KDE things, try again. We just updated a bunch of its packages and it might take a while until it reaches your mirror.
Do you have turnstiled system service enabled? From your turnstile log that looks like the turnstiled service isn't enabled at all.
Also, dbus, pipewire{,-pulse}, and wireplumber, have dinit user service package in [galaxy], you can use it and enable them instead of making your own (from your logs it looks like you made your own pipewire/wireplumber service). (Also the dbus user service package eliminates the need to use dbus-launch, you should be able to just startx).
Title: Re: dinit-userservd doesn't spawn user dinit
Post by: kiblaster on 04 October 2023, 17:12:30
I just tried KDE packages still as before. Did Arch renamed k... to k...5 maybe?
[ 10/05/23 20:41:34.074 main FATAL ERROR ] Can't open display.
I checked epiphany again I can't use it also when starting dbus differently. Some time ago I was using since a problem with librewolf but recently I never used it.
Very nice to have user dinit instance spawned automatically and dbus service I don't need anymore the wrapper to start bspwm.