Thanks @banjo. Changing to slick greeter did not help the hostname/logon_twice problem, but there was no segfault/coredump
What I know so far:
Among other things, this is a timing problem.
If I change lightdm.conf to contain greeter-setup-script=<SCRIPT> and that SCRIPT only does sleep 1.5s, I get the correct hostname displayed on the greeter. I only need to enter my password once and I’m logged on successfully. I suspect new installs are much more likely to be impacted by this bug.
On the greeter, gtk or slick, I initially see the hostname manjaro. When I enter my password the first time, the greeter is redisplayed with the correct hostname. The second password attempt is completed successfully.
Where does the hostname manjaro come from?
Why is manjaro in/var/run/lightdm/root/:0 initially (which causes this problem) and not the dhcp hostname?
I changed the title as shown below because only lightdm-gtk-greeter segfaulted, but both greeters showed the wrong hostname initially.
From: Lightdm-gtk-greeter cairo segfault - first logon fails, second succeeds
To: New install - first logon fails, second succeeds due to hostname=manjaro
Install XFCE ISO - 21.0.7
The greeter shows Manjaro in the hostname location. If I cat /var/run/lightdm/root/:0, I see manjaro.
Login fails. The greeter is re-displayed, but now the greeter and the run file show the correct hostname.
I interjected an artifical delay into lightdm (greeter-setup-script) and after a reboot the hostname is correct.
I have also noticed, that after some time, the problem goes away on its’ own (boot process becomes busier ??). After I install and get this problem, I reboot several times, I view the logs, and at some point, I consistently get the correct hostname and the first login succeeds. This is repeatable, if I reinstall, it starts all over again.
Anyone else run into this on a new install?
Why is manjaro being picked up as the hostname? For the life of me, I can’t figure out where that coming from.
hostnamectl --static set-hostname "" # removes /etc/hostname from system
Great to know.
I’m looking at the journal and the manjaro hostname started appearing in January of this year. It has been impacting my current machines, but it was a new install that really highlighted the bug because it impacts the lightdm greeter.
It seems fallback-hostname has been around since 233. I can’t tell from Manjaro gitlab commits when or if it changed. It looks like it might be the 12/30/2020 Stable update.
This redhat bug report describes what is happening:
Oh, thank you for reminding me of thread I opened and failed to close. As it turns out, for my setup, all that is required is to delete the /etc/hostname file. Then the client will accept option host-name "rpi-name" as assigned in the server 's dhcpd.conf.