Login screen redirect

OpenMandriva Lx version:

6.0

Desktop environment (KDE, LXQT…):

Plasma, x11

Description of the issue (screenshots if relevant):

After about a minute or two of being logged in, I am re-directed to the login screen.

Check out this post:

https://forum.openmandriva.org/t/xlibre-session-auto-logout-after-a-time/8738

There’s a workaround in there that works, and I’ll actually be updating that post with a more permanent “fix” in just a bit.

And I just realized that the post I linked is now closed…so I can’t update. So, I’ll provide my update here.

Long story short, this issue with sessions getting kicked back out to the SDDM login screen is a race condition that occurs when pam_kwallet5 (which starts ksecretd) starts before the systemd service manager can get started. ksecretd then fails to register with the XDG desktop portal, and the x11 server dies.

If you’re on a machine with only 1 user, then you can use the command sudo loginctl enable-linger user (replace “user” with your username) to start and keep the systemd service manager running at all times. This ensures that the session bus starts prior to pam_kwallet5, and eliminates the race condition. I enabled that a couple of weeks ago on 2 computers, both running ROME, and haven’t had an issue since.

The issue with this approach is that, if you have other users on your machine, enabling linger for 1 user won’t fix the issue if another user logs in. I only have my own user on these machines, so this workaround has been working fine.

I’m gonna try this because the other ways, for some reason (probably my stupidity xD) didn’t work properly.

But this one will work, I guess. xD

(Edit: WORKED!)