Slow initialization of something during boot

poma pomidorabelisima at gmail.com
Thu Aug 15 17:58:21 UTC 2013


…
> 
> 5th:
> cp /usr/lib/systemd/system/lightdm.service /etc/systemd/system
> - add 10s delay in
> /etc/systemd/system/lightdm.service
> i.e.
>> [Service]
> ExecStartPre=/usr/bin/sleep 10
> ExecStart=/usr/sbin/lightdm
>> 
> - enable it
> i.e.
> systemctl enable lightdm.service --force
> 
> 
> If it works, and those 10s show as the only delay, you can try to lower
> the value of it.
> 

I've managed to produce a lag via NetworkManager disabled,

systemctl status NetworkManager
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled)
   Active: inactive (dead)

These are the results of the application of the 'ExecStartPre' directive
in the 'lightdm.service'

====================================================
- default - no sleep
----------------------------------------------------
systemd-analyze blame
…
         30.903s lightdm.service
…
----------------------------------------------------
/var/log/lightdm/lightdm.log
…
[+0.04s] DEBUG: Launching X Server
…
[+30.87s] DEBUG: Greeter connected, display is ready
[+30.87s] DEBUG: New display ready, switching to it
[+30.87s] DEBUG: Activating VT 1
…
====================================================
- 10s sleep
/etc/systemd/system/lightdm.service
…
ExecStartPre=/usr/bin/sleep 10
…
----------------------------------------------------
systemd-analyze blame
…
         10.058s lightdm.service
…
----------------------------------------------------
/var/log/lightdm/lightdm.log
…
[+0.04s] DEBUG: Launching X Server
…
[+1.23s] DEBUG: Greeter connected, display is ready
[+1.23s] DEBUG: New display ready, switching to it
[+1.23s] DEBUG: Activating VT 1
…
====================================================
- 2s sleep
/etc/systemd/system/lightdm.service
…
ExecStartPre=/usr/bin/sleep 2
…
----------------------------------------------------
systemd-analyze blame
…
          2.146s lightdm.service
…
----------------------------------------------------
/var/log/lightdm/lightdm.log
…
[+0.12s] DEBUG: Launching X Server
…
[+2.88s] DEBUG: Greeter connected, display is ready
[+2.88s] DEBUG: New display ready, switching to it
[+2.88s] DEBUG: Activating VT 1
…
====================================================


poma




More information about the users mailing list