On 2022-01-20 13:59:21 +0100, Vincent Lefevre wrote:
> The second point is that there is a race condition in the detection of
> the monitors on startup, so that the behavior varies.
> 
> This issue is actually also now reproducible with systemd 250.2, but
> the systemd version seems to have an effect of the possible behaviors
> (A, B and C below):
> 
> With systemd 250.2:
>   A. 2 monitors detected, the greeter appears.
>   B. 2 monitors detected, the greeter does not appear.
> 
> With systemd 250.3:
>   B. 2 monitors detected, the greeter does not appear.
>   C. 1 monitor detected (the laptop screen), the greeter appears on
>      this monitor.
> 
> Case C is actually like a one-monitor setup (it could occur in the
> past, perhaps still currently with systemd 250.2, but I haven't
> done many tests with this version, mainly focusing on 250.3).
> Note that when 2 monitors are detected, they are always mirrored.
> 
> Case B has never appeared before (I was always in case A or C),
> while my monitor setup hasn't changed. 2 things have changed on
> my laptop in the last few days:
[...]

I now have a better workaround than setting active-monitor=1 (which
has issues with the menu as I've said, perhaps because the knowledge
of lightdm about the connected monitors and their configuration is
inconsistent due to the race condition): delay the setup in order to
avoid the race condition.

Adding a script /etc/lightdm/display-setup-script with "sleep 1"
and setting

  display-setup-script=/etc/lightdm/display-setup-script

in /etc/lightdm/lightdm.conf seems to solve the problem.

Note: this does not have any effect on the detected monitors, i.e.
one may still have randomly 1 or 2 detected monitors[*], but in the
case of 2 detected monitors, the greeter is visible.

[*] This is probably taken into account when lightdm starts X (which
occurs before, as seen in the lightdm.log debug log). If one wants
to fix that, one could do that with xrandr (not tested).

In short, even though there is a good workaround, the greeter should
do its best to display its menu bar and dialogs at a position where
there will be visible.

Finally, I don't know about the other greeters, but if they have a
similar issue, this workaround should also work since it is on the
lightdm level.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to