[systemd-devel] How should Wayland compositors handle logind restarts?

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Feb 8 10:55:35 UTC 2021


On Mon, Feb 08, 2021 at 11:43:35AM +0200, Vlad Zahorodnii wrote:
> Hi,


> My question is - should Wayland compositors handle logind restarts
> in any way?
> 
> At the moment, many Wayland compositors don't take any precautions
> against the case where logind is restarted. They assume that the DRM
> file descriptors will remain valid and the session will be restored
> auto-magically.

Yes, that is what they should be doing.

> Currently, a lot of Wayland compositors can't recover from logind
> restarts. For example, that's the case with weston, sway, kwin, and
> perhaps other compositors.
> 
> The culprit seems to be that atomic commits fail with the
> "Permission denied" error.

That's because of a bug in logind. I started working on a fix last
year [1], but doing this properly requires restructuring how the code
handles cleanup. It's on the TODO list.

[1] https://github.com/systemd/systemd/pull/17558

Zbyszek


More information about the systemd-devel mailing list