Skip to main content
Topic: [WIP] seatd support (elogind alternative) (Read 14040 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [WIP] seatd support (elogind alternative)

Reply #15
Small update, I discovered a subtle bug in pam_rundir. You had to play around with a few users to hit it. This should now be fixed. I also ported it over to utmpx.h instead of utmp.h (the latter is deprecated). This is updated in universe as version 1.2.0.

Re: [WIP] seatd support (elogind alternative)

Reply #16
Hello, I tried those steps again but in my case I couldn't make it work.

I attach the image from my TTY, I don't know if I am missing something, I also tried what @capezotte  replied but in my case I haven't had success.


Artix Linux Colombia

Re: [WIP] seatd support (elogind alternative)

Reply #17
Sad to say, I'm at a loss there. That error does not appear to be any issue with the XDG_RUNTIME_DIR and so I think that part is working correctly. That sway error occurs when it is unable to find any logind or seatd session at all. So even though the seatd daemon is running for you and your user appears to be in the correct group, for some reason it cannot find it. When you logged in was there a /run/user/1000 directory (or something similar)?

seatd update
Upstream has fixed the VT crash that occurred with wlroots. The fixes have been backported to seatd-0.6.2-1.3. If you had the patched version of libinput I previously provided, you can get rid of it by simply reinstalling it from the Artix repos.
Code: [Select]
# pacman -S libinput

You will need to restart your seatd service. Obviously, this will kill your graphical session so be prepared.
Code: [Select]
# s6-svc -r /run/s6-rc/servicedirs/seatd-srv

Now you can start Sway (or any other wlroots compositor) again and you should be able to seamlessly switch VTs.

Re: [WIP] seatd support (elogind alternative)

Reply #18
Sad to say, I'm at a loss there. That error does not appear to be any issue with the XDG_RUNTIME_DIR and so I think that part is working correctly. That sway error occurs when it is unable to find any logind or seatd session at all. So even though the seatd daemon is running for you and your user appears to be in the correct group, for some reason it cannot find it. When you logged in was there a /run/user/1000 directory (or something similar)?

seatd update
Upstream has fixed the VT crash that occurred with wlroots. The fixes have been backported to seatd-0.6.2-1.3. If you had the patched version of libinput I previously provided, you can get rid of it by simply reinstalling it from the Artix repos.
Code: [Select]
# pacman -S libinput

You will need to restart your seatd service. Obviously, this will kill your graphical session so be prepared.
Code: [Select]
# s6-svc -r /run/s6-rc/servicedirs/seatd-srv

Now you can start Sway (or any other wlroots compositor) again and you should be able to seamlessly switch VTs.

Hi again, I did those steps again and I still have no success with sway. The /run/user/1000 exists but it was completely empty,  when i install elogind again, it contains some stuffs.

Something I got curious was when I restarted the seatd service and my graphical session was killed, I don't know if that's suppose to be normal.

When I install elogind back everything goes to normal but I guess this is not the purpose of this post :P

What I also look a bit strange sway should look for seatd backend instead of liblogind, right?
Artix Linux Colombia

Re: [WIP] seatd support (elogind alternative)

Reply #19
I realised I am a retard and I forgot that I have the env "LIBSEAT_BACKEND=logind" variable in /etc/profile.d/wayland.sh


Code: [Select]
cat /etc/profile.d/wayland.sh
#!/bin/bash
export MOZ_ENABLE_WAYLAND=1
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
export QT_QPA_PLATFORM=wayland
#export QT_SCALE_FACTOR=1.25
#export LIBSEAT_BACKEND=logind

I just commented and everything is working fine.
Artix Linux Colombia

Re: [WIP] seatd support (elogind alternative)

Reply #20
Hah, glad you figured it out! And yeah don't kill/restart elogind or seatd unless you like having your graphics killed.

Re: [WIP] seatd support (elogind alternative)

Reply #21
Small update. pam_rundir, seatd-s6, and seatd-suite66 have been all been moved out of Universe and into gremlins and galaxy-gremlins. Additionally, the pambase package has been updated and placed into gremlins. If you had previously installed the Universe packages, the new pambase package will generate a .pacnew file. Overwriting the old file with the .pacnew is recommended.


Re: [WIP] seatd support (elogind alternative)

Reply #23
I use Runit, and I'd like to help with getting this working, although I have some questions first, as I use an elogind script to lock the screen before sleeping, and the dbus functionality to tell xss-lock to lock the screen when I run `loginctl lock-session', would either of those be impacted? And if so, is there already a workaround?

If  both of those are workable, then I already have the 0.6.2-1.3 version of seatd installed (which seems to be the latest version that can coexist with elogind), and I could try to help write a seatd-runit script to test.

Re: [WIP] seatd support (elogind alternative)

Reply #24
The loginctl binary does not exist with seatd, so you could not call it directly. However, the compiled version of seatd that is in the repos does support the logind API. So calling the equivalent API request via another method (like say dbus for example) should still work.

Re: [WIP] seatd support (elogind alternative)

Reply #25
Quote
seatd and elogind are in conflict

Is there any particular reason for this change? I’m not going to switch to elogind-less seatd at the moment, but seatd is required by wlroots.

Edit: in case someone is reading this & wondering what happened, see this thread

Re: [WIP] seatd support (elogind alternative)

Reply #26
The loginctl binary does not exist with seatd, so you could not call it directly. However, the compiled version of seatd that is in the repos does support the logind API. So calling the equivalent API request via another method (like say dbus for example) should still work.

It shouldn't be too hard to work around the 'loginctl' binary issue if it keeps the dbus side, so that should be good enough. Any tips for starting off writing the script, based on how it works on s6?

Edit: I have a temporary init script, where should I send it after I test it? I don't have a PKGBUILD made for it yet, just the /etc/runit/sv/seatd/run script.

Re: [WIP] seatd support (elogind alternative)

Reply #27
A suggestion: the seatd-as-elogind-replacement package could contain a rewritten version of the /usr/lib/udev/rules.d/73-seat-late.rules file (included with elogind), which would chmod 666 device files tagged with uaccess (or run another command that does something with the ACLs like elogind itself does).

It'd obviate the need for users to add themselves to groups.

Re: [WIP] seatd support (elogind alternative)

Reply #28
Of course, never lightly use -Rdd but in this case it is okay. seatd only needs libelogind to function.
I know libelogind comes from libsystemd, but what aspect of it does seatd need to work?

 

Re: [WIP] seatd support (elogind alternative)

Reply #29
A suggestion: the seatd-as-elogind-replacement package could contain a rewritten version of the /usr/lib/udev/rules.d/73-seat-late.rules file (included with elogind), which would chmod 666 device files tagged with uaccess (or run another command that does something with the ACLs like elogind itself does).

It'd obviate the need for users to add themselves to groups.
Late here, but is there a non-systemd/elogind program that can do this? I'm not too aware of this kind of thing.

I know libelogind comes from libsystemd, but what aspect of it does seatd need to work?
The seatd in the repos is compiled with elogind support so it's linked to libelogind. It's used to implement the loginctl API.