X 서버를 시작하는 데 시간이 오래 걸리는 이유는 무엇입니까?

X 서버를 시작하는 데 시간이 오래 걸리는 이유는 무엇입니까?

배경

현재 내 컴퓨터에서 (그리고 Gorilla보다 이전에) "부팅" 시간이 오래 걸립니다.

            .-/+oossssoo+/-.               sterlingbutters@butters-ubuntu 
        `:+ssssssssssssssssss+:`           ------------------------------ 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu Groovy Gorilla (development branch) x86_64 
    .ossssssssssssssssssdMMMNysssso.       Kernel: 5.8.0-16-generic 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Uptime: 45 mins 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Packages: 3776 (dpkg), 9 (snap) 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Shell: bash 5.0.17 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Resolution: 3840x2160 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   DE: GNOME 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM Theme: Adwaita 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Theme: Yaru [GTK2/3] 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Icons: Yaru [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Terminal: gnome-terminal 
  +sssssssssdmydMMMMMMMMddddyssssssss+     CPU: Intel i9-7940X (28) @ 4.400GHz 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      GPU: NVIDIA GeForce GTX 1080 Ti 
    .ossssssssssssssssssdMMMNysssso.       Memory: 6434MiB / 31817MiB 
      -+sssssssssssssssssyyyssss+-
        `:+ssssssssssssssssss+:`                                   
            .-/+oossssoo+/-.                                       

살펴보면 journalctlX 서버를 초기화하는 데 (첫 번째 항목부터) 약 44초가 소요되는 것으로 보입니다. lightdm이것을 추론하는 데 사용한 시스템 후크는 다음과 같습니다.

/etc/lightdm/lightdm.conf.d/50-system-hooks.conf

[SeatDefaults]
display-setup-script=echo "This text is produced after the X server starts but before the user session / greeter is run. Change the display-setup-script in /etc/lightdm/lightdm.conf.d/50-system-hooks.conf to configure anything special here. It is run as root. If this command returns an error code the X server is stopped."
display-stopped-script=echo "This text is produced after the X server exits. Change the display-stopped-script in /etc/lightdm/lightdm.conf.d/50-system-hooks.conf to configure anything special here. It is run as root."
greeter-setup-script=echo "This text is produced before a greeter starts. Change the greeter-setup-script in /etc/lightdm/lightdm.conf.d/50-system-hooks.conf to configure anything special here. It is run as root. If this command returns an error code the greeter fails to start (which will cause LightDM to stop)."
session-setup-script=echo "This text is produced before a user session starts. Change the session-setup-script in /etc/lightdm/lightdm.conf.d/50-system-hooks.conf to configure anything special here. If this command returns an error the session will not start (user is returned to a greeter)."
session-cleanup-script=echo "This text is produced after a greeter or user session stops. Change the session-cleanup-script in /etc/lightdm/lightdm.conf.d/50-system-hooks.conf to configure anything special here. It is run as root." 
#session-wrapper= is a the command to run for a session. This command is run as the user and needs to exec the command passed in the arguments to complete running the session. Use this if you need to do special setup for a user session. Note the default is 'lightdm-session' so you should chain to this if you need to override this setting.
#greeter-wrapper= is a the command to run a greeter. It is the equivalent of session-wrapper for greeters. 

특히 내 컴퓨터의 사양을 고려하면 X 서버를 시작하는 데 시간이 오래 걸리는 것 같습니다.

X 서버를 시작하는 데 시간이 오래 걸리는 이유는 무엇입니까?

또한 X 서버가 초기화되면 환영 프로그램(Unity)을 시작하는 데 필요한 시간이 매우 짧습니다(1초 미만). 저에게 이상한 점은 systemctl get-defaultEquals 에도 불구하고 graphical.target인사말이 표시되기 직전(~2초)에 콘솔이 표시된다는 것입니다(가장 중요한 것은 아닙니다. 단지 이상할 뿐입니다).

내 자격 증명을 인사말에 거의 즉시 입력하면 환영 초기화와 사용자 세션 초기화 사이에 약 23초가 소요됩니다. 여기서 타임라인이 일관되지 않게 시작됩니다. 환영인이 자격 증명을 수락하고 사용자 세션을 시작하는 것처럼 보이더라도 일반적으로 자격 증명과 데스크톱이 사용 가능해질 때까지 약 1분 정도 기다립니다. 즉, 배경 화면을 보고 사용할 수 있습니다. 마우스를 사용할 수 있지만 아이콘, 메뉴, 창 등은 표시되지 않습니다.)

다음을 통해 Greeter가 초기화되는 것을 볼 수 있습니다 lightdm.

/usr/share/xgreeters/unity-greeter.desktop

[Desktop Entry]
Name=Unity Greeter
Comment=Unity Greeter
Exec=unity-greeter
Type=Application
X-Ubuntu-Gettext-Domain=unity-greeter

그리고 DE는 통과했다

/usr/share/xsessions/ubuntu.desktop

[Desktop Entry]
Name=Ubuntu
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --systemd --session=ubuntu
TryExec=/usr/bin/gnome-shell
Type=Application
DesktopNames=ubuntu:GNOME
X-GDM-SessionRegisters=true
X-Ubuntu-Gettext-Domain=gnome-session-3.0

다음 파일을 사용하십시오.

/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

[Seat:*]
user-session=ubuntu

/usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf

[Seat:*]
greeter-session=unity-greeter

(무엇인지는 모르겠지만 50-greeter-wrapper.conf: [Seat:*]\n greeter-wrapper=/usr/lib/lightdm/lightdm-greeter-session같은 디렉토리에 있음)

관련 정보