You are not logged in.

#1 2021-09-03 19:35:57

lowry
Member
Registered: 2021-09-03
Posts: 4

Regression running rootless Xorg possible linked to systemd-logind

I had rootless Xorg starting with intel driver on an Thinkpad T420s  for several years.

The setup is simple. Systemd logs into tty1 and bash launches startx:

cat /etc/systemd/system/getty@tty1.service.d/override.conf
[Service]
ExecStart=/usr/bin/agetty --autologin lowry --noclear %I $TERM
Type=idle
TTYVTDisallocate=no
cat ~/.bash_profile

if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
  exec startx
fi

Since a few days, I get the following as first error in my ~/.local/share/xorg/Xorg.0.log:

systemd-logind::failed to get session: PID XXXX does not belong to any known session

The, I get the no screens found error.

When launching as root, Xorg works fine.

This happened somewhere around systemd-libs upgrade from 249.3-1 to 249-4.1.


Anyone has a solution yet?

Last edited by lowry (2021-09-03 19:39:49)

Offline

#2 2021-09-03 19:51:27

lowry
Member
Registered: 2021-09-03
Posts: 4

Re: Regression running rootless Xorg possible linked to systemd-logind

Got it on my own. I needed

/etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes

Still unclear why xorg suddenly needed that.

Last edited by lowry (2021-09-03 19:59:10)

Offline

#3 2021-09-03 21:17:01

Raynman
Member
Registered: 2011-10-22
Posts: 1,313

Re: Regression running rootless Xorg possible linked to systemd-logind

That means disabling rootless X.

lowry wrote:

Still unclear why xorg suddenly needed that.

Well, you have this:

Since a few days, I get the following as first error in my ~/.local/share/xorg/Xorg.0.log:

systemd-logind::failed to get session: PID XXXX does not belong to any known session

Your session is somehow broken (or doesn't get detected correctly?): https://wiki.archlinux.org/title/Genera … ermissions

Do you happen to have a custom .xserverrc?

Offline

#4 2021-09-04 19:32:52

lowry
Member
Registered: 2021-09-03
Posts: 4

Re: Regression running rootless Xorg possible linked to systemd-logind

@Raynman, I have no custom xserverrc. And yes, I know that that Xorg is not running rootless anymore, but it's better that having no Xorg at all.

Thanks for the hint to systemd General troubleshooting page, will go over it to figure out what happened.

Offline

#5 2021-09-04 21:00:01

Raynman
Member
Registered: 2011-10-22
Posts: 1,313

Re: Regression running rootless Xorg possible linked to systemd-logind

lowry wrote:

And yes, I know that that Xorg is not running rootless anymore, but it's better that having no Xorg at all.

True, but it kinda sounded like "I find the solution" instead of "I found a workaround".

You could also try (after reverting the Xwrapper.config) to startx manually (and maybe also without autologin) and see if that makes a difference (perhaps a weird race condition?).

Offline

Board footer

Powered by FluxBB