Lightdm doesn't start at boot time and the keyboard is almost hung

Which Linux distro are you using? Ubuntu 24.04 LTS

Which release version? Mint

Which kernel are you using? Linux frmwk16 6.8.0-39-generic #39-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 21:49:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Which BIOS version are you using? I think it is 3.03

Which Framework Laptop 16 model are you using? (AMD Ryzen™ 7040 Series)

At boot time, about the moment when the machine changes from a text mode to a graphics mode, the screen blanks. When the machine is finished booting, they keyboard is inoperative EXCEPT that the fn+space bar does change the backlighting of the keyboard. This includes using the function keys to open virtual terminals.
The computer is working although you would not know it from using the keyboard. I can ssh into the computer. I can clear the problem through the following sequence of commands:

systemctl daemon-reload
systemctl stop display-manager
systemctl start gdm
systemctl stop gdm
systemctl start display-manager

Note that at this point, everything works quite nicely.

I had a hypothesis that I had overloaded a USB-C port so I bought a USB-A port and another USB-C port and I have experimented with using different ports and with no loads or my typical loads or an intermediate load, and nothing leaps out.

TL,DR:
Here is an HTML file which is a log of the above:

jeffs@frmwk16:~$ cat /tmp/startup_workaround.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.0  (Linux)">
	<META NAME="CREATED" CONTENT="20040718;16111600">
	<META NAME="CHANGED" CONTENT="20040718;17011900">
	<STYLE>
	<!--
		@page { size: 8.5in 11in; margin-left: 1.25in; margin-right: 1.25in; margin-top: 1in; margin-bottom: 1in }
		P { margin-bottom: 0.08in }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">

<pre><font color="#26A269"><b>jeffs@frmwk16</b></font>:<span style="background-color:#A2734C"><font color="#171421">~</font></span>$ sudo su -
[sudo] password for jeffs: 
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># /root/restart_display_manager 
Executing script /root/restart_display_manager
Running systemctl daemon-reload
Stopping the display manager
starting gdm
gdm started.  Now stopping GDM
now starting display-manager
Display manager started.  Exiting /root/restart_display_manager
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># cat /root/restart_display_manager
#! /bin/bash

echo &quot;Executing script $0&quot;
echo &quot;Running systemctl daemon-reload&quot;
systemctl daemon-reload
echo &quot;Stopping the display manager&quot;
systemctl stop display-manager
echo &quot;starting gdm&quot;
systemctl start gdm
echo &quot;gdm started.  Now stopping GDM&quot;
systemctl stop gdm
echo &quot;now starting display-manager&quot;
systemctl start display-manager
echo &quot;Display manager started.  Exiting $0&quot;
exit 0


<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl status display-manager
<font color="#26A269"><b>●</b></font> lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: <font color="#26A269"><b>enabled</b></font>)
     Active: <font color="#26A269"><b>active (running)</b></font> since Wed 2024-08-07 13:42:23 PDT; 1min 10s ago
       Docs: man:lightdm(1)
    Process: 5643 ExecStartPre=/bin/sh -c [ &quot;$(basename $(cat /etc/X11/default-display-manager 2&gt;/dev/null))&quot; = <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
   Main PID: 5648 (lightdm)
      Tasks: 5 (limit: 37588)
     Memory: 3.6M (peak: 4.1M)
        CPU: 58ms
     CGroup: /system.slice/lightdm.service
             ├─<font color="#8A8A8A">5648 /usr/sbin/lightdm</font>
             └─<font color="#8A8A8A">5656 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -no</font><span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>

Aug 07 13:42:23 frmwk16 systemd[1]: Starting lightdm.service - Light Display Manager...
Aug 07 13:42:23 frmwk16 lightdm[5648]: <font color="#D7D75F"><b>Seat type &apos;xlocal&apos; is deprecated, use &apos;type=local&apos; instead</b></font>
Aug 07 13:42:23 frmwk16 systemd[1]: Started lightdm.service - Light Display Manager.
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl stop display-manager
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl status display-manager
○ lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: <font color="#26A269"><b>enabled</b></font>)
     Active: inactive (dead) since Wed 2024-08-07 13:44:10 PDT; 2s ago
   Duration: 1min 42.196s
       Docs: man:lightdm(1)
    Process: 5643 ExecStartPre=/bin/sh -c [ &quot;$(basename $(cat /etc/X11/default-display-manager 2&gt;/dev/null))&quot; = <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
    Process: 5648 ExecStart=/usr/sbin/lightdm (code=exited, status=0/SUCCESS)
   Main PID: 5648 (code=exited, status=0/SUCCESS)
        CPU: 163ms

Aug 07 13:42:23 frmwk16 systemd[1]: Starting lightdm.service - Light Display Manager...
Aug 07 13:42:23 frmwk16 lightdm[5648]: <font color="#D7D75F"><b>Seat type &apos;xlocal&apos; is deprecated, use &apos;type=local&apos; instead</b></font>
Aug 07 13:42:23 frmwk16 systemd[1]: Started lightdm.service - Light Display Manager.
Aug 07 13:44:05 frmwk16 systemd[1]: Stopping lightdm.service - Light Display Manager...
Aug 07 13:44:10 frmwk16 systemd[1]: lightdm.service: Deactivated successfully.
Aug 07 13:44:10 frmwk16 systemd[1]: Stopped lightdm.service - Light Display Manager.
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl status gdm
○ gdm.service - GNOME Display Manager
     Loaded: loaded (/usr/lib/systemd/system/gdm.service; static)
     Active: inactive (dead)

Aug 07 13:42:22 frmwk16 systemd[1]: Starting gdm.service - GNOME Display Manager...
Aug 07 13:42:22 frmwk16 systemd[1]: Started gdm.service - GNOME Display Manager.
Aug 07 13:42:22 frmwk16 systemd[1]: Stopping gdm.service - GNOME Display Manager...
Aug 07 13:42:23 frmwk16 systemd[1]: gdm.service: Deactivated successfully.
Aug 07 13:42:23 frmwk16 systemd[1]: Stopped gdm.service - GNOME Display Manager.
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl start gdm
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl status gdm
<font color="#26A269"><b>●</b></font> gdm.service - GNOME Display Manager
     Loaded: loaded (/usr/lib/systemd/system/gdm.service; static)
     Active: <font color="#26A269"><b>active (running)</b></font> since Wed 2024-08-07 13:44:33 PDT; 5s ago
    Process: 5688 ExecStartPre=/usr/share/gdm/generate-config (code=exited, status=0/SUCCESS)
   Main PID: 5694 (gdm3)
      Tasks: 5 (limit: 37588)
     Memory: 2.6M (peak: 4.2M)
        CPU: 44ms
     CGroup: /system.slice/gdm.service
             └─<font color="#8A8A8A">5694 /usr/sbin/gdm3</font>

Aug 07 13:44:33 frmwk16 systemd[1]: Starting gdm.service - GNOME Display Manager...
Aug 07 13:44:33 frmwk16 systemd[1]: Started gdm.service - GNOME Display Manager.
Aug 07 13:44:33 frmwk16 gdm-launch-environment][5699]: pam_unix(gdm-launch-environment:session): session opened <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
...skipping...
<font color="#26A269"><b>●</b></font> gdm.service - GNOME Display Manager
     Loaded: loaded (/usr/lib/systemd/system/gdm.service; static)
     Active: <font color="#26A269"><b>active (running)</b></font> since Wed 2024-08-07 13:44:33 PDT; 5s ago
    Process: 5688 ExecStartPre=/usr/share/gdm/generate-config (code=exited, status=0/SUCCESS)
   Main PID: 5694 (gdm3)
      Tasks: 5 (limit: 37588)
     Memory: 2.6M (peak: 4.2M)
        CPU: 44ms
     CGroup: /system.slice/gdm.service
             └─<font color="#8A8A8A">5694 /usr/sbin/gdm3</font>

Aug 07 13:44:33 frmwk16 systemd[1]: Starting gdm.service - GNOME Display Manager...
Aug 07 13:44:33 frmwk16 systemd[1]: Started gdm.service - GNOME Display Manager.
Aug 07 13:44:33 frmwk16 gdm-launch-environment][5699]: pam_unix(gdm-launch-environment:session): session opened <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl stop gdm
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl status gdm
○ gdm.service - GNOME Display Manager
     Loaded: loaded (/usr/lib/systemd/system/gdm.service; static)
     Active: inactive (dead)

Aug 07 13:42:22 frmwk16 systemd[1]: Stopping gdm.service - GNOME Display Manager...
Aug 07 13:42:23 frmwk16 systemd[1]: gdm.service: Deactivated successfully.
Aug 07 13:42:23 frmwk16 systemd[1]: Stopped gdm.service - GNOME Display Manager.
Aug 07 13:44:33 frmwk16 systemd[1]: Starting gdm.service - GNOME Display Manager...
Aug 07 13:44:33 frmwk16 systemd[1]: Started gdm.service - GNOME Display Manager.
Aug 07 13:44:33 frmwk16 gdm-launch-environment][5699]: pam_unix(gdm-launch-environment:session): session opened <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
Aug 07 13:44:49 frmwk16 systemd[1]: Stopping gdm.service - GNOME Display Manager...
Aug 07 13:44:50 frmwk16 gdm3[5694]: <b>Gdm: Child process -5725 was already dead.</b>
Aug 07 13:44:50 frmwk16 systemd[1]: gdm.service: Deactivated successfully.
Aug 07 13:44:50 frmwk16 systemd[1]: Stopped gdm.service - GNOME Display Manager.
...skipping...
○ gdm.service - GNOME Display Manager
     Loaded: loaded (/usr/lib/systemd/system/gdm.service; static)
     Active: inactive (dead)

Aug 07 13:42:22 frmwk16 systemd[1]: Stopping gdm.service - GNOME Display Manager...
Aug 07 13:42:23 frmwk16 systemd[1]: gdm.service: Deactivated successfully.
Aug 07 13:42:23 frmwk16 systemd[1]: Stopped gdm.service - GNOME Display Manager.
Aug 07 13:44:33 frmwk16 systemd[1]: Starting gdm.service - GNOME Display Manager...
Aug 07 13:44:33 frmwk16 systemd[1]: Started gdm.service - GNOME Display Manager.
Aug 07 13:44:33 frmwk16 gdm-launch-environment][5699]: pam_unix(gdm-launch-environment:session): session opened <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
Aug 07 13:44:49 frmwk16 systemd[1]: Stopping gdm.service - GNOME Display Manager...
Aug 07 13:44:50 frmwk16 gdm3[5694]: <b>Gdm: Child process -5725 was already dead.</b>
Aug 07 13:44:50 frmwk16 systemd[1]: gdm.service: Deactivated successfully.
Aug 07 13:44:50 frmwk16 systemd[1]: Stopped gdm.service - GNOME Display Manager.
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl status display-manager
○ lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: <font color="#26A269"><b>enabled</b></font>)
     Active: inactive (dead) since Wed 2024-08-07 13:44:10 PDT; 54s ago
   Duration: 1min 42.196s
       Docs: man:lightdm(1)
    Process: 5643 ExecStartPre=/bin/sh -c [ &quot;$(basename $(cat /etc/X11/default-display-manager 2&gt;/dev/null))&quot; = <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
    Process: 5648 ExecStart=/usr/sbin/lightdm (code=exited, status=0/SUCCESS)
   Main PID: 5648 (code=exited, status=0/SUCCESS)
        CPU: 163ms

Aug 07 13:42:23 frmwk16 systemd[1]: Starting lightdm.service - Light Display Manager...
Aug 07 13:42:23 frmwk16 lightdm[5648]: <font color="#D7D75F"><b>Seat type &apos;xlocal&apos; is deprecated, use &apos;type=local&apos; instead</b></font>
Aug 07 13:42:23 frmwk16 systemd[1]: Started lightdm.service - Light Display Manager.
Aug 07 13:44:05 frmwk16 systemd[1]: Stopping lightdm.service - Light Display Manager...
Aug 07 13:44:10 frmwk16 systemd[1]: lightdm.service: Deactivated successfully.
Aug 07 13:44:10 frmwk16 systemd[1]: Stopped lightdm.service - Light Display Manager.
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl start display-manager
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl status display-manager
<font color="#26A269"><b>●</b></font> lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: <font color="#26A269"><b>enabled</b></font>)
     Active: <font color="#26A269"><b>active (running)</b></font> since Wed 2024-08-07 13:45:25 PDT; 11s ago
       Docs: man:lightdm(1)
    Process: 6349 ExecStartPre=/bin/sh -c [ &quot;$(basename $(cat /etc/X11/default-display-manager 2&gt;/dev/null))&quot; = <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
   Main PID: 6353 (lightdm)
      Tasks: 18 (limit: 37588)
     Memory: 45.2M (peak: 45.8M)
        CPU: 771ms
     CGroup: /system.slice/lightdm.service
             ├─<font color="#8A8A8A">6353 /usr/sbin/lightdm</font>
             ├─<font color="#8A8A8A">6361 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -no</font><span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
             └─<font color="#8A8A8A">6669 lightdm --session-child 14 21</font>

Aug 07 13:45:25 frmwk16 systemd[1]: Starting lightdm.service - Light Display Manager...
Aug 07 13:45:25 frmwk16 lightdm[6353]: <font color="#D7D75F"><b>Seat type &apos;xlocal&apos; is deprecated, use &apos;type=local&apos; instead</b></font>
Aug 07 13:45:25 frmwk16 systemd[1]: Started lightdm.service - Light Display Manager.
Aug 07 13:45:25 frmwk16 lightdm[6380]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=11<span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
Aug 07 13:45:26 frmwk16 lightdm[6380]: <font color="#C01C28"><b>gkr-pam: couldn&apos;t unlock the login keyring.</b></font>
Aug 07 13:45:27 frmwk16 lightdm[6669]: pam_succeed_if(lightdm:auth): requirement &quot;user ingroup nopasswdlogin&quot; no<span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
...skipping...
<font color="#26A269"><b>●</b></font> lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: <font color="#26A269"><b>enabled</b></font>)
     Active: <font color="#26A269"><b>active (running)</b></font> since Wed 2024-08-07 13:45:25 PDT; 11s ago
       Docs: man:lightdm(1)
    Process: 6349 ExecStartPre=/bin/sh -c [ &quot;$(basename $(cat /etc/X11/default-display-manager 2&gt;/dev/null))&quot; = <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
   Main PID: 6353 (lightdm)
      Tasks: 18 (limit: 37588)
     Memory: 45.2M (peak: 45.8M)
        CPU: 771ms
     CGroup: /system.slice/lightdm.service
             ├─<font color="#8A8A8A">6353 /usr/sbin/lightdm</font>
             ├─<font color="#8A8A8A">6361 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -no</font><span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
             └─<font color="#8A8A8A">6669 lightdm --session-child 14 21</font>

Aug 07 13:45:25 frmwk16 systemd[1]: Starting lightdm.service - Light Display Manager...
Aug 07 13:45:25 frmwk16 lightdm[6353]: <font color="#D7D75F"><b>Seat type &apos;xlocal&apos; is deprecated, use &apos;type=local&apos; instead</b></font>
Aug 07 13:45:25 frmwk16 systemd[1]: Started lightdm.service - Light Display Manager.
Aug 07 13:45:25 frmwk16 lightdm[6380]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=11<span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
Aug 07 13:45:26 frmwk16 lightdm[6380]: <font color="#C01C28"><b>gkr-pam: couldn&apos;t unlock the login keyring.</b></font>
Aug 07 13:45:27 frmwk16 lightdm[6669]: pam_succeed_if(lightdm:auth): requirement &quot;user ingroup nopasswdlogin&quot; no<span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<b>~</b>
<font color="#C01C28"><b>root@frmwk16</b></font>:<font color="#12488B"><b>~</b></font># systemctl status display-manager
<font color="#26A269"><b>●</b></font> lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: <font color="#26A269"><b>enabled</b></font>)
     Active: <font color="#26A269"><b>active (running)</b></font> since Wed 2024-08-07 13:45:25 PDT; 41s ago
       Docs: man:lightdm(1)
    Process: 6349 ExecStartPre=/bin/sh -c [ &quot;$(basename $(cat /etc/X11/default-display-manager 2&gt;/dev/null))&quot; = <span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
   Main PID: 6353 (lightdm)
      Tasks: 17 (limit: 37588)
     Memory: 45.1M (peak: 45.8M)
        CPU: 777ms
     CGroup: /system.slice/lightdm.service
             ├─<font color="#8A8A8A">6353 /usr/sbin/lightdm</font>
             ├─<font color="#8A8A8A">6361 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -no</font><span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
             └─<font color="#8A8A8A">6669 lightdm --session-child 14 21</font>

Aug 07 13:45:25 frmwk16 systemd[1]: Starting lightdm.service - Light Display Manager...
Aug 07 13:45:25 frmwk16 lightdm[6353]: <font color="#D7D75F"><b>Seat type &apos;xlocal&apos; is deprecated, use &apos;type=local&apos; instead</b></font>
Aug 07 13:45:25 frmwk16 systemd[1]: Started lightdm.service - Light Display Manager.
Aug 07 13:45:25 frmwk16 lightdm[6380]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=11<span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
Aug 07 13:45:26 frmwk16 lightdm[6380]: <font color="#C01C28"><b>gkr-pam: couldn&apos;t unlock the login keyring.</b></font>
Aug 07 13:45:27 frmwk16 lightdm[6669]: pam_succeed_if(lightdm:auth): requirement &quot;user ingroup nopasswdlogin&quot; no<span style="background-color:#FFFFFF"><font color="#1E1E1E">&gt;</font></span>
<span style="background-color:#FFFFFF"><font color="#1E1E1E">lines 1-20/20 (END)</font></span>

</pre>
</body>
</html>

Sounds like the same race condition we saw in gdm and SDDM with simpledrm.

Try porting this solution to lightdm.

Here is the lightdm bug report: