Announcement

Collapse
No announcement yet.

Can I prevent systemd from waiting on an external HDD?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I prevent systemd from waiting on an external HDD?

    Ref: https://www.kubuntuforums.net/forum/...minute-to-boot

    I am also affected by an external hard drive. For some reason, system-d waits for it several seconcds while booting, otherwise doing nothing. Is there a way to tell systemd not to wait for the file to be mounted?
    Last edited by Snowhog; Jan 05, 2022, 12:46 PM. Reason: Start new Topic

    #2
    Originally posted by supsup View Post
    I am also affected by an external hard drive. For some reason, system-d waits for it several seconcds while booting, otherwise doing nothing. Is there a way to tell systemd not to wait for the file to be mounted?
    What are your various systemd-analyze outputs?

    Is this happening before or after the Grub menu?

    if it is before, it is the bios/POST process, probably not much that can be done. The Bios may be looking at it for boot files, and the drive may just be slow to turn on and start up. That is why I have a slow overall boot time on my PC. it is all happening *before* any OS boots.
    If it is after grub, then you could add the USB as a permanent mount in the fstab.

    Comment


      #3
      If it's during the POST process, your best bet is to either try a different USB port for that drive (to see if it's the port that is the problem), or wait until you're in your OS to plugin the drive. Otherwise, you'll continue to have long wait times during POST.

      If this happens after GRUB, you can add it to your fstab, with the "noauto" option thrown in. In this case, you will have to make a custom mount point for it (make sure the mountpoint is there, before saving!), and mount it with the "sudo mount -a" (or "sudo mount mountpoint") command.

      Edit: You can use the command "systemd-analyze" to see where the holdup really is. Firmware is POST. anything after, can maybe be corrected with fstab.

      Hope this helps.
      Last edited by jasoncollege24; Jan 04, 2022, 12:13 PM.

      Comment


        #4
        It happens afte POST, after systemd-boot (I do not use GRUB, it is very slow, like four seconds). It happens just before the change from non-colourful messages from the kernel is displaced by the green/red messages from systemd (I do not use quiet splash). The messages just stop spewing out for like 4-5 seconds and then it says usb mounted or something like that and green messages about started services start scrolling fast. Physically it seems it waits for the harddrive to spinon. When I am just rebooting and the hard-drive was previously on, there is no delay.

        But on closer inspection of the logs, I cannot really find anything, the services keep starting. Yet without the harddrive, it boots in 25 seconds, (10 seconds in POST!), with it, in around 30, pretty reliably. The difference is in how long it takes kernel to start up (2 or 10 seconds - but if it is 10, userspace then takes 8 instead of 12). I am attaching the logs of the faster boot and the slower boot (products of `journalct -b-0` and `journalctl -b-1`) in case there is anything.

        Regarding noauto, well, I would like it to be mounted automatically, just later. I guess I could make a systemd unit that would put the nouto option there before reboot/shutdown and then it would replace it one minute after boot, but that feels hazardous. And I am not even sure it would work - I think the system waits for the disk to spin up, so it would wait for it to find out its UUID, no? I will try it nonetheless but I have low hopes:-).
        Attached Files

        Comment


          #5
          Hm, so I put this into the FSTAB:

          Code:
          UUID=54D88C7E07A663D9                      /media/drew/LACIE-MOJE ntfs noauto 0 2
          UUID=3e7ae31d-12a4-42f2-a456-ce63b39c7b9c  /media/drew/LACIE-MOJE ntfs noauto 0 2
          It gets automounted and it still slows down boot. And now I can see in the logs, from 00:28:50 (until then it goes very fast in about two seconds) SDDM is starting for five seconds (why? - is there a way I could run without SDDM while having autologin? it feels quite slow and buggy, logging off can take 15 seconds) - apart from that it is just some network stuff that I disabled as required for boot (it should not hold anything up). But now I went to the slower logs and it is there too. I am confused by the logs, frankly. They look the same, but the results are not. I will try to time it with my mobile phone to see it systemd is telling me the truth:-).

          EDIT: I timed it with an alarm clock and there is indeed a difference of six seconds before a usable desktop is reached. But when I inspect the logs, they seem identical. Really weird.

          Code:
          led 05 00:28:50 GreenOne kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
          led 05 00:28:51 GreenOne kernel: nvidia_uvm: module uses symbols from proprietary module nvidia, inheriting taint.
          led 05 00:28:51 GreenOne NetworkManager[882]: <warn> [1641338931.0556] Error: failed to open /run/network/ifstate
          led 05 00:28:51 GreenOne NetworkManager[882]: <info> [1641338931.0944] modem-manager: ModemManager available
          led 05 00:28:51 GreenOne kernel: nvidia-uvm: Loaded the UVM driver, major device number 506.
          led 05 00:28:51 GreenOne systemd[1]: Starting NVIDIA Persistence Daemon...
          led 05 00:28:51 GreenOne nvidia-persistenced[1778]: Verbose syslog connection opened
          led 05 00:28:51 GreenOne nvidia-persistenced[1778]: Now running with user ID 123 and group ID 134
          led 05 00:28:51 GreenOne nvidia-persistenced[1778]: Started (1778)
          led 05 00:28:51 GreenOne nvidia-persistenced[1778]: device 0000:01:00.0 - registered
          led 05 00:28:51 GreenOne nvidia-persistenced[1778]: Local RPC services initialized
          led 05 00:28:51 GreenOne systemd[1]: Started NVIDIA Persistence Daemon.
          led 05 00:28:51 GreenOne audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=nvidia-persistenced comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:51 GreenOne avahi-daemon[877]: Server startup complete. Host name is GreenOne.local. Local service cookie is 2726661504.
          led 05 00:28:51 GreenOne NetworkManager[882]: <info> [1641338931.2672] device (wlp82s0): supplicant interface state: internal-starting -> disconnected
          led 05 00:28:51 GreenOne NetworkManager[882]: <info> [1641338931.2672] Wi-Fi P2P device controlled by interface wlp82s0 created
          led 05 00:28:51 GreenOne NetworkManager[882]: <info> [1641338931.2674] manager: (p2p-dev-wlp82s0): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/4)
          led 05 00:28:51 GreenOne NetworkManager[882]: <info> [1641338931.2676] device (p2p-dev-wlp82s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
          led 05 00:28:51 GreenOne NetworkManager[882]: <info> [1641338931.2680] device (wlp82s0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
          led 05 00:28:51 GreenOne NetworkManager[882]: <info> [1641338931.2685] device (p2p-dev-wlp82s0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:51 GreenOne postfix/postfix-script[1909]: warning: symlink leaves directory: /etc/postfix/./makedefs.out
          led 05 00:28:51 GreenOne postfix/postfix-script[2095]: starting the Postfix mail system
          led 05 00:28:51 GreenOne postfix/master[2097]: daemon started -- version 3.5.6, configuration /etc/postfix
          led 05 00:28:51 GreenOne systemd[1]: Started Postfix Mail Transport Agent (instance -).
          led 05 00:28:51 GreenOne audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=postfix@- comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:51 GreenOne systemd[1]: Starting Postfix Mail Transport Agent...
          led 05 00:28:51 GreenOne systemd[1]: Finished Postfix Mail Transport Agent.
          led 05 00:28:51 GreenOne audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=postfix comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:52 GreenOne systemd[1]: gpu-manager.service: Deactivated successfully.
          led 05 00:28:52 GreenOne systemd[1]: Finished Detect the available GPUs and deal with any system changes.
          led 05 00:28:52 GreenOne audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=gpu-manager comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:52 GreenOne audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=gpu-manager comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:52 GreenOne systemd[1]: gpu-manager.service: Consumed 1.222s CPU time.
          led 05 00:28:52 GreenOne systemd[1]: Starting Simple Desktop Display Manager...
          led 05 00:28:52 GreenOne systemd[1]: Started Simple Desktop Display Manager.
          led 05 00:28:52 GreenOne audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=sddm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:52 GreenOne sddm[2103]: Initializing...
          led 05 00:28:52 GreenOne sddm[2103]: Starting...
          led 05 00:28:52 GreenOne sddm[2103]: Logind interface found
          led 05 00:28:52 GreenOne sddm[2103]: Adding new display on vt 1 ...
          led 05 00:28:52 GreenOne sddm[2103]: Loading theme configuration from ""
          led 05 00:28:52 GreenOne sddm[2103]: Display server starting...
          led 05 00:28:52 GreenOne sddm[2103]: Adding cookie to "/var/run/sddm/{3fd02040-6c6e-4f25-beaf-89368a34a50e}"
          led 05 00:28:52 GreenOne sddm[2103]: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{3fd02040-6c6e-4f25-beaf-89368a34a50e} -background none -noreset -displayfd 17 -seat seat0 vt1
          led 05 00:28:52 GreenOne kbct-x86_64.AppImage[893]: INFO kbct > Capturing device path=/dev/input/event9 name="ThinkPad Extra Buttons" mapped_name="Kbct-ThinkPad Extra Buttons"
          led 05 00:28:52 GreenOne kbct-x86_64.AppImage[893]: INFO kbct > Capturing device path=/dev/input/event6 name="Logitech K800" mapped_name="Kbct-Logitech K800"
          led 05 00:28:52 GreenOne kbct-x86_64.AppImage[893]: INFO kbct > Capturing device path=/dev/input/event3 name="AT Translated Set 2 keyboard" mapped_name="Kbct-AT Translated Set 2 keyboard"
          led 05 00:28:52 GreenOne kernel: input: Kbct-ThinkPad Extra Buttons as /devices/virtual/input/input37
          led 05 00:28:52 GreenOne kernel: input: Kbct-Logitech K800 as /devices/virtual/input/input38
          led 05 00:28:52 GreenOne kernel: input: Kbct-AT Translated Set 2 keyboard as /devices/virtual/input/input39
          led 05 00:28:52 GreenOne systemd[1]: dmesg.service: start-pre operation timed out. Terminating.
          led 05 00:28:52 GreenOne systemd[1]: dmesg.service: Failed with result 'timeout'.
          led 05 00:28:52 GreenOne audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=dmesg comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
          led 05 00:28:52 GreenOne systemd-logind[919]: Watching system buttons on /dev/input/event22 (Kbct-Logitech K800)
          led 05 00:28:52 GreenOne systemd-logind[919]: Watching system buttons on /dev/input/event23 (Kbct-AT Translated Set 2 keyboard)
          led 05 00:28:52 GreenOne systemd-logind[919]: Watching system buttons on /dev/input/event21 (Kbct-ThinkPad Extra Buttons)
          led 05 00:28:52 GreenOne ModemManager[1126]: <info> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1d.6/0000:52:00.0': not supported by any plugin
          led 05 00:28:52 GreenOne ModemManager[1126]: <info> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1f.6': not supported by any plugin
          led 05 00:28:53 GreenOne acpid[865]: client connected from 2107[0:0]
          led 05 00:28:53 GreenOne acpid[865]: 1 client rule loaded
          led 05 00:28:53 GreenOne systemd[1]: nmbd.service: start operation timed out. Terminating.
          led 05 00:28:53 GreenOne systemd[1]: nmbd.service: Failed with result 'timeout'.
          led 05 00:28:53 GreenOne systemd[1]: Failed to start Samba NMB Daemon.
          led 05 00:28:53 GreenOne audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=nmbd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
          led 05 00:28:53 GreenOne systemd[1]: Starting Samba SMB Daemon...
          led 05 00:28:53 GreenOne systemd[1]: Started Samba SMB Daemon.
          led 05 00:28:53 GreenOne audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=smbd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:54 GreenOne systemd[1]: systemd-rfkill.service: Deactivated successfully.
          led 05 00:28:54 GreenOne audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:54 GreenOne powertop[910]: modprobe cpufreq_stats failedLoaded 0 prior measurements
          led 05 00:28:54 GreenOne powertop[910]: RAPL device for cpu 0
          led 05 00:28:54 GreenOne powertop[910]: RAPL Using PowerCap Sysfs : Domain Mask f
          led 05 00:28:54 GreenOne powertop[910]: RAPL device for cpu 0
          led 05 00:28:54 GreenOne powertop[910]: RAPL Using PowerCap Sysfs : Domain Mask f
          led 05 00:28:54 GreenOne powertop[910]: Devfreq not enabled
          led 05 00:28:54 GreenOne powertop[910]: glob returned GLOB_ABORTED
          led 05 00:28:54 GreenOne wpa_supplicant[924]: wlp82s0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=COUNTRY alpha2=CZ
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7570] policy: auto-activating connection 'supi_hnizdo_5ghz' (f8a7e0a2-8235-4d1f-8195-817ec9aab9fb)
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7572] device (wlp82s0): Activation: starting connection 'supi_hnizdo_5ghz' (f8a7e0a2-8235-4d1f-8195-817ec9aab9fb)
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7573] device (wlp82s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7574] manager: NetworkManager state is now CONNECTING
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7575] device (wlp82s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7577] device (wlp82s0): Activation: (wifi) access point 'supi_hnizdo_5ghz' has security, but secrets are required.
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7577] device (wlp82s0): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7582] device (wlp82s0): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7583] device (wlp82s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7584] device (wlp82s0): Activation: (wifi) connection 'supi_hnizdo_5ghz' has security, and secrets exist. No new secrets needed.
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7585] Config: added 'ssid' value 'supi_hnizdo_5ghz'
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7585] Config: added 'scan_ssid' value '1'
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7585] Config: added 'bgscan' value 'simple:30:-70:86400'
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7585] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256 FT-PSK'
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7585] Config: added 'psk' value '<hidden>'
          led 05 00:28:54 GreenOne wpa_supplicant[924]: wlp82s0: SME: Trying to authenticate with d4:6e:0e:28:e6:e6 (SSID='supi_hnizdo_5ghz' freq=5180 MHz)
          led 05 00:28:54 GreenOne kernel: wlp82s0: authenticate with d4:6e:0e:28:e6:e6
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7825] device (wlp82s0): supplicant interface state: disconnected -> authenticating
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.7825] device (p2p-dev-wlp82s0): supplicant management interface state: disconnected -> authenticating
          led 05 00:28:54 GreenOne kernel: wlp82s0: send auth to d4:6e:0e:28:e6:e6 (try 1/3)
          led 05 00:28:54 GreenOne wpa_supplicant[924]: wlp82s0: Trying to associate with d4:6e:0e:28:e6:e6 (SSID='supi_hnizdo_5ghz' freq=5180 MHz)
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.8695] device (wlp82s0): supplicant interface state: authenticating -> associating
          led 05 00:28:54 GreenOne NetworkManager[882]: <info> [1641338934.8696] device (p2p-dev-wlp82s0): supplicant management interface state: authenticating -> associating
          led 05 00:28:54 GreenOne kernel: wlp82s0: authenticated
          led 05 00:28:54 GreenOne kernel: wlp82s0: associate with d4:6e:0e:28:e6:e6 (try 1/3)
          led 05 00:28:54 GreenOne kernel: wlp82s0: RX AssocResp from d4:6e:0e:28:e6:e6 (capab=0x11 status=0 aid=2)
          led 05 00:28:54 GreenOne wpa_supplicant[924]: wlp82s0: Associated with d4:6e:0e:28:e6:e6
          led 05 00:28:54 GreenOne wpa_supplicant[924]: wlp82s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
          led 05 00:28:54 GreenOne kernel: wlp82s0: associated
          led 05 00:28:55 GreenOne wpa_supplicant[924]: wlp82s0: WPA: Key negotiation completed with d4:6e:0e:28:e6:e6 [PTK=CCMP GTK=CCMP]
          led 05 00:28:55 GreenOne wpa_supplicant[924]: wlp82s0: CTRL-EVENT-CONNECTED - Connection to d4:6e:0e:28:e6:e6 completed [id=0 id_str=]
          led 05 00:28:55 GreenOne kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp82s0: link becomes ready
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0315] device (wlp82s0): supplicant interface state: associating -> completed
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0316] device (wlp82s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "supi_hnizdo_5ghz"
          led 05 00:28:55 GreenOne wpa_supplicant[924]: wlp82s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-64 noise=9999 txrate=26000
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0317] device (p2p-dev-wlp82s0): supplicant management interface state: associating -> completed
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0320] device (wlp82s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0330] dhcp4 (wlp82s0): activation: beginning transaction (timeout in 45 seconds)
          led 05 00:28:55 GreenOne avahi-daemon[877]: Joining mDNS multicast group on interface wlp82s0.IPv6 with address fe80::facd:5682:7afe:acb5.
          led 05 00:28:55 GreenOne avahi-daemon[877]: New relevant interface wlp82s0.IPv6 for mDNS.
          led 05 00:28:55 GreenOne avahi-daemon[877]: Registering new address record for fe80::facd:5682:7afe:acb5 on wlp82s0.*.
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0513] dhcp4 (wlp82s0): state changed unknown -> bound, address=192.168.2.100
          led 05 00:28:55 GreenOne avahi-daemon[877]: Joining mDNS multicast group on interface wlp82s0.IPv4 with address 192.168.2.100.
          led 05 00:28:55 GreenOne avahi-daemon[877]: New relevant interface wlp82s0.IPv4 for mDNS.
          led 05 00:28:55 GreenOne avahi-daemon[877]: Registering new address record for 192.168.2.100 on wlp82s0.IPv4.
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0545] device (wlp82s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0559] device (wlp82s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0560] device (wlp82s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0562] manager: NetworkManager state is now CONNECTED_LOCAL
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0569] manager: NetworkManager state is now CONNECTED_SITE
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0570] policy: set 'supi_hnizdo_5ghz' (wlp82s0) as default for IPv4 routing and DNS
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0573] device (wlp82s0): Activation: successful, device activated.
          led 05 00:28:55 GreenOne NetworkManager[882]: <info> [1641338935.0576] manager: NetworkManager state is now CONNECTED_GLOBAL
          led 05 00:28:55 GreenOne systemd-resolved[683]: wlp82s0: Bus client set search domain list to: lan
          led 05 00:28:55 GreenOne systemd-resolved[683]: wlp82s0: Bus client set default route setting: yes
          led 05 00:28:55 GreenOne systemd-resolved[683]: wlp82s0: Bus client set DNS server list to: 192.168.2.1
          led 05 00:28:55 GreenOne wpa_supplicant[924]: wlp82s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-66 noise=9999 txrate=26000
          led 05 00:28:55 GreenOne systemd[1]: Reloading Postfix Mail Transport Agent (instance -).
          led 05 00:28:55 GreenOne nm-dispatcher[2181]: /etc/network/if-up.d/resolved: 12: mystatedir: not found
          led 05 00:28:55 GreenOne postfix/postfix-script[2201]: refreshing the Postfix mail system
          led 05 00:28:55 GreenOne postfix/master[2097]: reload -- version 3.5.6, configuration /etc/postfix
          led 05 00:28:55 GreenOne systemd[1]: Reloaded Postfix Mail Transport Agent (instance -).
          led 05 00:28:55 GreenOne systemd[1]: Reloading Postfix Mail Transport Agent.
          led 05 00:28:55 GreenOne systemd[1]: Reloaded Postfix Mail Transport Agent.
          led 05 00:28:55 GreenOne systemd[1]: Reloading Postfix Mail Transport Agent (instance -).
          led 05 00:28:55 GreenOne nm-dispatcher[2228]: /etc/network/if-up.d/resolved: 12: mystatedir: not found
          led 05 00:28:55 GreenOne postfix/postfix-script[2248]: refreshing the Postfix mail system
          led 05 00:28:55 GreenOne postfix/master[2097]: reload -- version 3.5.6, configuration /etc/postfix
          led 05 00:28:55 GreenOne systemd[1]: Reloaded Postfix Mail Transport Agent (instance -).
          led 05 00:28:55 GreenOne systemd[1]: Reloading Postfix Mail Transport Agent.
          led 05 00:28:55 GreenOne systemd[1]: Reloaded Postfix Mail Transport Agent.
          led 05 00:28:55 GreenOne sddm[2103]: Setting default cursor
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: TCP/UDP: Preserving recently used remote address: [AF_INET]185.51.249.65:1194
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: Socket Buffers: R=[131072->131072] S=[16384->16384]
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: Attempting to establish TCP connection with [AF_INET]185.51.249.65:1194 [nonblock]
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: TCP connection established with [AF_INET]185.51.249.65:1194
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: TCP_CLIENT link local: (not bound)
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: TCP_CLIENT link remote: [AF_INET]185.51.249.65:1194
          led 05 00:28:55 GreenOne sddm[2103]: Running display setup script "/usr/share/sddm/scripts/Xsetup"
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: TLS: Initial packet from [AF_INET]185.51.249.65:1194, sid=e511684c b8ff825d
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: VERIFY OK: depth=1, C=EU, ST=CZ, L=Prague, O=Ja, OU=changeme, CN=server_kysice, name=changeme, emailAddress=mail@host.domain
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: VERIFY OK: depth=0, C=EU, ST=CZ, L=Prague, O=Ja, OU=changeme, CN=server_kysice, name=changeme, emailAddress=mail@host.domain
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, 1024 bit RSA
          led 05 00:28:55 GreenOne ovpn-client1-unhfree[1137]: [server_kysice] Peer Connection Initiated with [AF_INET]185.51.249.65:1194
          led 05 00:28:56 GreenOne NetworkManager[882]: <info> [1641338936.5781] dhcp6 (wlp82s0): activation: beginning transaction (timeout in 45 seconds)
          led 05 00:28:56 GreenOne avahi-daemon[877]: Leaving mDNS multicast group on interface wlp82s0.IPv6 with address fe80::facd:5682:7afe:acb5.
          led 05 00:28:56 GreenOne avahi-daemon[877]: Joining mDNS multicast group on interface wlp82s0.IPv6 with address fd9f:a7c0:a091:0:3e5b:7518:9290:5026.
          led 05 00:28:56 GreenOne avahi-daemon[877]: Registering new address record for fd9f:a7c0:a091:0:3e5b:7518:9290:5026 on wlp82s0.*.
          led 05 00:28:56 GreenOne avahi-daemon[877]: Withdrawing address record for fe80::facd:5682:7afe:acb5 on wlp82s0.
          led 05 00:28:56 GreenOne powertop[910]: Leaving PowerTOP
          led 05 00:28:56 GreenOne powertop[910]: the port is sda
          led 05 00:28:56 GreenOne systemd[1]: powertop.service: Deactivated successfully.
          led 05 00:28:56 GreenOne audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=powertop comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
          led 05 00:28:56 GreenOne NetworkManager[882]: <info> [1641338936.8338] manager: startup complete
          led 05 00:28:56 GreenOne ovpn-client1-unhfree[1137]: SENT CONTROL [server_kysice]: 'PUSH_REQUEST' (status=1)
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: PUSH: Received control message: 'PUSH_REPLY,route 10.98.0.0 255.255.0.0,route-gateway 192.168.22.1,ifconfig 192.168.22.235 255.255.255.0,peer-id 0,cipher AES-256-GCM'
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: OPTIONS IMPORT: --ifconfig/up options modified
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: OPTIONS IMPORT: route options modified
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: OPTIONS IMPORT: route-related options modified
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: OPTIONS IMPORT: peer-id set
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: OPTIONS IMPORT: adjusting link_mtu to 1659
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: OPTIONS IMPORT: data channel crypto options modified
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: Data Channel: using negotiated cipher 'AES-256-GCM'
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: net_route_v4_best_gw query: dst 0.0.0.0
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: net_route_v4_best_gw result: via 192.168.2.1 dev wlp82s0
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: ROUTE_GATEWAY 192.168.2.1/255.255.255.0 IFACE=wlp82s0 HWADDR=04:ed:33:a6:54:37
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: TUN/TAP device tap0 opened
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: net_iface_mtu_set: mtu 1500 for tap0
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: net_iface_up: set tap0 up
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: net_addr_v4_add: 192.168.22.235/24 dev tap0
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: net_route_v4_add: 10.98.0.0/16 via 192.168.22.1 dev [NULL] table 0 metric -1
          led 05 00:28:57 GreenOne avahi-daemon[877]: Joining mDNS multicast group on interface tap0.IPv4 with address 192.168.22.235.
          led 05 00:28:57 GreenOne avahi-daemon[877]: New relevant interface tap0.IPv4 for mDNS.
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
          led 05 00:28:57 GreenOne ovpn-client1-unhfree[1137]: Initialization Sequence Completed
          led 05 00:28:57 GreenOne avahi-daemon[877]: Registering new address record for 192.168.22.235 on tap0.IPv4.
          led 05 00:28:57 GreenOne systemd-udevd[469]: Using default interface naming scheme 'v249'.
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0083] manager: (tap0): new Tun device (/org/freedesktop/NetworkManager/Devices/5)
          led 05 00:28:57 GreenOne systemd-udevd[469]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0222] device (tap0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0302] device (tap0): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0328] device (tap0): Activation: starting connection 'tap0' (64941f6d-945e-4868-94c0-4d720786ff17)
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0334] device (tap0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0342] device (tap0): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0358] device (tap0): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0363] device (tap0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0422] device (tap0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0427] device (tap0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.0446] device (tap0): Activation: successful, device activated.
          led 05 00:28:57 GreenOne systemd[1]: Reloading Postfix Mail Transport Agent (instance -).
          led 05 00:28:57 GreenOne nm-dispatcher[2330]: /etc/network/if-up.d/resolved: 12: mystatedir: not found
          led 05 00:28:57 GreenOne postfix/postfix-script[2351]: refreshing the Postfix mail system
          led 05 00:28:57 GreenOne postfix/master[2097]: reload -- version 3.5.6, configuration /etc/postfix
          led 05 00:28:57 GreenOne systemd[1]: Reloaded Postfix Mail Transport Agent (instance -).
          led 05 00:28:57 GreenOne systemd[1]: Reloading Postfix Mail Transport Agent.
          led 05 00:28:57 GreenOne systemd[1]: Reloaded Postfix Mail Transport Agent.
          led 05 00:28:57 GreenOne NetworkManager[882]: <info> [1641338937.6511] dhcp6 (wlp82s0): state changed unknown -> bound, address=fd9f:a7c0:a091::5f2
          led 05 00:28:57 GreenOne avahi-daemon[877]: Registering new address record for fd9f:a7c0:a091::5f2 on wlp82s0.*.
          led 05 00:28:57 GreenOne sddm[2103]: Display server started.
          Last edited by supsup; Jan 04, 2022, 06:02 PM.

          Comment


            #6
            I think you need to look at more than just the basic logs, to help find the possible cause.
            What is systemd-analyze, systemd-analyze blame and systemd-analyze critical-chain showing?
            particularly the last one, which will show what services are holding up others.

            You have a lot going on, some appimage thingy related to thinkpad keys, a ton of networking actions going on, samba things failing, powertop loading, among others


            Comment


              #7
              I might try disabling powertop but I do not think it is the difference. SAMBA fails because I disabled networking as a thing to wait for during boot (it slows it down). Samba will come online later. Though this is just laptop with wifi, nothing special regarding networks is not going on:-).

              I have run all the commands you say before. Systemd-analyze shows the difference of cca 6 seconds in kernel.

              Systemd-blame lists just these three things over one seconds:

              Code:
              3.253s nmbd.service
              1.773s gpu-manager.service
              1.004s auditd.service
              systemd-analyze chain gives just this:

              Code:
              graphical.target @11.894s
              └─multi-user.target @11.894s
               └─smbd.service @5.683s +59ms
                 └─network-online.target @2.412s
                   └─network.target @2.411s
                     └─NetworkManager.service @1.775s +631ms
                       └─dbus.service @1.771s
                         └─basic.target @1.687s
                           └─sockets.target @1.684s
                             └─uuidd.socket @1.680s
                               └─sysinit.target @1.647s
                                 └─systemd-update-utmp.service @1.643s +3ms
                                   └─auditd.service @636ms +1.004s
                                     └─systemd-tmpfiles-setup.service @607ms +25ms
                                       └─local-fs.target @597ms
                                         └─boot-efi.mount @464ms +132ms
                                           └─systemd-fsck@dev-disk-by\x2duuid-7B6E\x2dE2BA.service @439ms +20ms
                                             └─dev-disk-by\x2duuid-7B6E\x2dE2BA.device @431ms
              Not helpful, I think:-).

              I mean I am pretty sure it is the disk causing the delay, what I am puzzled by is that it does not show in the logs at all.

              Comment


                #8
                I was thinking something like this.
                Code:
                LABEL='VMs' /media/jason/VM ntfs-3g noauto,uid=1000,gid=1000 0 0
                The noauto option is supposed to prevent Linux from automatically mounting the drive, and I recommend using ntfs-3g for ntfs filessystems. I've personally always ended up with corrupted partitions, after writing to an NTFS partition with just the standard ntfs driver.

                Once you're at your desktop, right after a successful (slower) boot up, give the output of the following 3 commands:
                Code:
                systemd-analyze
                systemd-analyze blame
                systemd-analyze critical-chain
                Easier to read these than sift through 100's of lines of logs, and may help narrow down where to actually look in the longer logs.

                Edit: you may also want to consider checking the drive for errors on a Windows machine. Errors on a NTFS volume can cause all kinds of problems, including increased mount times, slower access times, and data loss. (Personally witnessed on both Windows, and Linux machines)
                Last edited by jasoncollege24; Jan 05, 2022, 11:00 AM.

                Comment


                  #9
                  This is without the usb disk attached
                  Code:
                  Startup finished in 10.323s (firmware) + 349ms (loader) + 2.682s (kernel) + 12.020s (userspace) = 25.374s
                  graphical.target reached after 12.015s in userspace
                  Note - fix_powertop.service has 10 second sleep in it, it does not hold anything (I disabled it for this one).
                  Code:
                  10.184s fix_powertop.service
                  4.953s systemd-suspend.service
                  3.253s nmbd.service
                  3.202s apt-daily-upgrade.service
                  1.739s gpu-manager.service
                  1.089s nvidia-suspend.service
                  983ms postfix@-.service
                  786ms auditd.service
                  781ms systemd-resolved.service
                  737ms fwupd-refresh.service
                  725ms man-db.service
                  491ms accounts-daemon.service
                  430ms networkd-dispatcher.service
                  425ms avahi-daemon.service
                  419ms bluetooth.service
                  416ms NetworkManager.service
                  411ms vboxdrv.service
                  401ms apport.service
                  389ms polkit.service
                  385ms power-profiles-daemon.service
                  373ms mono-xsp4.service
                  373ms alsa-restore.service
                  369ms kexec.service
                  363ms atd.service
                  360ms systemd-timesyncd.service
                  352ms dev-nvme0n1p2.device
                  349ms secureboot-db.service
                  346ms e2scrub_reap.service
                  320ms rsyslog.service
                  295ms upower.service
                  210ms systemd-journal-flush.service
                  140ms logrotate.service
                  133ms ua-timer.service
                  123ms boot-efi.mount
                  120ms udisks2.service
                  118ms apparmor.service
                  111ms smbd.service
                  99ms lighttpd.service
                  69ms systemd-udev-trigger.service
                  69ms user@1000.service
                  69ms thermald.service
                  68ms systemd-logind.service
                  67ms update-notifier-download.service
                  65ms ModemManager.service
                  65ms wpa_supplicant.service
                  65ms smartmontools.service
                  55ms systemd-fsck@dev-disk-by\x2duuid-b752ecb8\x2ded29\x2d42d6\x2dbcfc\x2d418a6235eac3.s ervice
                  50ms phpsessionclean.service
                  46ms kerneloops.service
                  46ms systemd-fsck@dev-disk-by\x2duuid-7B6E\x2dE2BA.service
                  43ms dev-hugepages.mount
                  42ms dev-mqueue.mount
                  41ms sys-kernel-debug.mount
                  40ms sys-kernel-tracing.mount
                  39ms systemd-rfkill.service
                  35ms keyboard-setup.service
                  34ms kmod-static-nodes.service
                  32ms modprobe@configfs.service
                  32ms shut_down_avr.service
                  Code:
                  graphical.target @12.015s
                  └─multi-user.target @12.015s
                  └─smbd.service @5.491s +111ms
                  └─network-online.target @2.220s
                  └─network.target @2.217s
                  └─NetworkManager.service @1.796s +416ms
                  └─dbus.service @1.794s
                  └─basic.target @1.771s
                  └─sockets.target @1.771s
                  └─uuidd.socket @1.768s
                  └─sysinit.target @1.704s
                  └─systemd-update-utmp.service @1.699s +4ms
                  └─auditd.service @910ms +786ms
                  └─systemd-tmpfiles-setup.service @886ms +20ms
                  └─local-fs.target @876ms
                  └─boot-efi.mount @752ms +123ms
                  └─systemd-fsck@dev-disk-by\x2duuid-7B6E\x2dE2BA.service @689ms +46ms
                  └─dev-disk-by\x2duuid-7B6E\x2dE2BA.device @681ms
                  and this is with the usbdrive attached.

                  Code:
                  Startup finished in 15.645s (firmware) + 349ms (loader) + 10.926s (kernel) + 5.211s (userspace) = 32.132s  
                  graphical.target reached after 5.206s in userspace
                  Code:
                  3.250s nmbd.service
                  2.642s gpu-manager.service
                  1.101s postfix@-.service
                  870ms accounts-daemon.service
                  786ms avahi-daemon.service
                  783ms NetworkManager.service
                  777ms bluetooth.service
                  769ms polkit.service
                  768ms networkd-dispatcher.service
                  759ms power-profiles-daemon.service
                  737ms apport.service
                  732ms alsa-restore.service
                  729ms mono-xsp4.service
                  726ms kexec.service
                  724ms atd.service
                  709ms e2scrub_reap.service
                  694ms rsyslog.service
                  690ms secureboot-db.service
                  493ms vboxdrv.service
                  346ms smartmontools.service
                  338ms dev-nvme0n1p2.device
                  192ms cups.service
                  191ms systemd-journal-flush.service
                  181ms binfmt-support.service
                  174ms udisks2.service
                  170ms auditd.service
                  147ms apparmor.service
                  144ms lighttpd.service
                  142ms systemd-resolved.service
                  135ms upower.service
                  105ms user@1000.service
                  101ms systemd-timesyncd.service
                   81ms phpsessionclean.service
                   80ms proc-sys-fs-binfmt_misc.mount
                   79ms boot-efi.mount
                   77ms wpa_supplicant.service
                   75ms ModemManager.service
                   72ms systemd-udev-trigger.service
                   72ms systemd-fsck@dev-disk-by\x2duuid-b752ecb8\x2ded29\x2d42d6\x2dbcfc\x2d418a6235eac3.s ervice
                   68ms thermald.service
                   67ms update-notifier-download.service
                   61ms systemd-logind.service
                   60ms kerneloops.service
                   51ms packagekit.service
                   50ms console-setup.service
                   50ms plymouth-read-write.service
                   47ms smbd.service
                   47ms systemd-tmpfiles-setup.service
                   46ms systemd-rfkill.service
                   43ms dev-hugepages.mount
                   42ms dev-mqueue.mount
                   41ms sys-kernel-debug.mount
                   40ms sys-kernel-tracing.mount
                   35ms systemd-fsck@dev-disk-by\x2duuid-7B6E\x2dE2BA.service
                   35ms keyboard-setup.service
                   34ms kmod-static-nodes.service
                   33ms hddtemp.service
                   32ms modprobe@configfs.service
                   31ms modprobe@drm.service
                   31ms virtualbox.service
                   30ms modprobe@fuse.service
                   29ms systemd-journald.service
                   29ms systemd-udevd.service
                   27ms systemd-modules-load.service
                   26ms systemd-remount-fs.service
                   21ms ufw.service
                   20ms openvpn.service
                   19ms colord.service
                   14ms systemd-random-seed.service
                   14ms plymouth-quit.service
                   14ms openvpn@client1-unhfree.service
                   12ms systemd-user-sessions.service
                    9ms sys-fs-fuse-connections.mount
                    9ms systemd-sysctl.service
                    9ms sys-kernel-config.mount
                    8ms home.mount
                    7ms vboxweb-service.service
                    7ms systemd-update-utmp.service
                    6ms systemd-sysusers.service
                    6ms kexec-load.service
                    6ms systemd-backlight@leds:tpacpi::kbd_backlight.service
                    6ms nvidia-persistenced.service
                    6ms setvtrgb.service
                    6ms systemd-tmpfiles-setup-dev.service
                    5ms user-runtime-dir@1000.service
                    5ms vboxballoonctrl-service.service
                    5ms systemd-backlight@backlight:intel_backlight.service
                    4ms tmp.mount
                    3ms systemd-update-utmp-runlevel.service
                    3ms vboxautostart-service.service
                    2ms rtkit-daemon.service
                    1ms sddm.service
                  796us postfix.service
                  ​​​​​​
                  Code:
                  graphical.target @5.206s
                  └─multi-user.target @5.206s
                   └─smbd.service @5.158s +47ms
                     └─network-online.target @1.882s
                       └─network.target @1.878s
                         └─wpa_supplicant.service @1.795s +77ms
                           └─dbus.service @1.082s
                             └─basic.target @1.065s
                               └─sockets.target @1.064s
                                 └─uuidd.socket @1.064s
                                   └─sysinit.target @1.035s
                                     └─systemd-update-utmp.service @1.027s +7ms
                                       └─auditd.service @855ms +170ms
                                         └─systemd-tmpfiles-setup.service @793ms +47ms
                                           └─local-fs.target @742ms
                                             └─boot-efi.mount @660ms +79ms
                                               └─systemd-fsck@dev-disk-by\x2duuid-7B6E\x2dE2BA.service @609ms +35ms
                                                 └─dev-disk-by\x2duuid-7B6E\x2dE2BA.device @607ms
                  I am pretty sure it is just waiting for the rotational disks to spin up so that it can read the label, so maybe that is why the /fstab thing does not change anything (I cahnged it as advised).

                  Comment

                  Working...
                  X