Announcement

Collapse
No announcement yet.

Network Manager takes too long to boot. Graphical issues after sleeping.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Network Manager takes too long to boot. Graphical issues after sleeping.

    Hello,

    Running a fresh installed Kubuntu 24.04 on a desktop PC and facing two issues:

    1. NetworkManager takes +30s to boot which seems too much.


    Code:
    $ systemd-analyze critical-chain
    The time when unit became active or started is printed after the "@" character.
    The time the unit took to start is printed after the "+" character.
    
    graphical.target @36.541s
    └─multi-user.target @36.541s
    └─docker.service @35.432s +1.108s
    └─network-online.target @35.415s
    └─NetworkManager-wait-online.service @31.726s +3.688s
    └─NetworkManager.service @1.369s +30.355s
    └─dbus.service @1.337s +30ms
    └─basic.target @1.332s
    └─sockets.target @1.332s
    └─snapd.socket @1.331s +1ms
    └─sysinit.target @1.314s
    └─snapd.apparmor.service @1.238s +75ms
    └─apparmor.service @1.205s +32ms
    └─local-fs.target @1.204s
    └─boot-efi.mount @1.199s +4ms
    └─systemd-fsck@dev-disk-by\x2duuid-B135\x2d93A0.service @389ms +9ms
    └─dev-disk-by\x2duuid-B135\x2d93A0.device @353ms

    2. After going back from sleep, I have several different issues with graphics: a) sometimes it boots properly b) sometimes it does not boot, I see the mouse but no graphics are loaded c) graphics are "flickering", I see like big pixels in the screen.

    P.S. Is there a way of adding hibernate / other sleep options where I do not lose all my opened work?

    Thanks,
    David
    Last edited by Snowhog; Jun 21, 2024, 12:09 PM.

    #2
    How long is your actual boot? Things are loaded in parallel, so saving that 30 seconds won't net you a full 30 seconds saving in actual boot time.

    The NetworkManager-wait-online.service may be the real culprit here, and don't forget Docker networks.
    You might try disabling NetworkManager-wait-online.service and see if that helps, as it is a common thing on Linux desktops when people check boot times.

    Also make sure that the connection settings as set to allow all users and toi connect automatically - this loads the connection a bit earlier (I think) and may help as well, if this isn't set already.

    Originally posted by davidalo View Post
    I see the mouse but no graphics are loaded
    If the cursor moves, try hitting alt-f2 or alt-space to open krunner - if it opens, you can try reloading plasmashell plasmashell --replace. You can also open applications and system settings, etc from there if needed.

    Originally posted by davidalo View Post
    P.S. Is there a way of adding hibernate / other sleep options where I do not lose all my opened work?
    Hibernation is disabled in ubuntu for ages, since it is poorly supported, and can be a crapshoot if it work, works poorly, oir doesn't work at all.
    But one can test it and enable it if desired. The process is not as simple as it used to be, and documentation that is current is lacking.


    ​​https://www.reddit.com/r/Kubuntu/com...are&utm_term=1
    and more thoroughly:
    https://ubuntuhandbook.org/index.php...-ubuntu-21-10/
    I have not personally tested this, as I don't use hibernation. I suspect that the suspend issues you see may also possibly be present with hibernation.

    It may also be worth looking at your specific hardware - GPU and specific mainboard or laptop model - as there may be some configuration tweaks that help with this. As you get a blank screen, video driver issues seem a logical cause here.
    Often either a GPU driver issue (Nvidia, of course) or some simple scripting can be used to /unload/load/reload kernel modules during suspend and resume. Very much specific to one's hardware.

    Comment


      #3
      How long is your actual boot? Things are loaded in parallel, so saving that 30 seconds won't net you a full 30 seconds saving in actual boot time.
      Code:
      Startup finished in 20.642s (firmware) + 1.383s (loader) + 2.984s (kernel) + 38.237s (userspace) = 1min 3.248s
      graphical.target reached after 38.221s in userspace

      I will try disabling Network-wait-online.service and let you know, but I think I tried a few days ago with no luck.


      If the cursor moves, try hitting alt-f2 or alt-space to open krunner - if it opens, you can try reloading plasmashell plasmashell --replace. You can also open applications and system settings, etc from there if needed.​
      I will try this and let you know.


      It may also be worth looking at your specific hardware - GPU and specific mainboard or laptop model - as there may be some configuration tweaks that help with this. As you get a blank screen, video driver issues seem a logical cause here.
      Often either a GPU driver issue (Nvidia, of course) or some simple scripting can be used to /unload/load/reload kernel modules during suspend and resume. Very much specific to one's hardware.​
      Any hints of what to look at?


      Thanks,
      David

      Comment


        #4
        Disabling Network-wait-online.service didn't improve a lot...

        Code:
        $ systemd-analyze time
        Startup finished in 19.210s (firmware) + 1.346s (loader) + 2.262s (kernel) + 32.303s (userspace) = 55.122s
        graphical.target reached after 32.284s in userspace.
        
        $ systemd-analyze critical-chain
        The time when unit became active or started is printed after the "@" character.
        The time the unit took to start is printed after the "+" character.
        
        graphical.target @32.284s
        └─multi-user.target @32.284s
        └─docker.service @31.798s +486ms
        └─containerd.service @31.712s +68ms
        └─network.target @31.711s
        └─NetworkManager.service @1.366s +30.343s
        └─dbus.service @1.337s +28ms
        └─basic.target @1.332s
        └─sockets.target @1.332s
        └─snapd.socket @1.331s +1ms
        └─sysinit.target @1.318s
        └─snapd.apparmor.service @1.236s +82ms
        └─apparmor.service @1.199s +36ms
        └─local-fs.target @1.198s
        └─run-snapd-ns.mount @32.011s
        └─local-fs-pre.target @229ms
        └─lvm2-monitor.service @181ms +47ms
        └─systemd-journald.socket @178ms
        └─-.mount @164ms
        └─-.slice @164ms

        Comment


          #5
          Originally posted by davidalo View Post
          Any hints of what to look at?
          What hardware do you have?
          Your network service is taking a long time - what card is it?

          Have you tried disabling docker? What containers are you running, and are they loading during bootup (part of the "userspace?)

          Also note it is taking 20 seconds to get past the bios loading (the firmware stage), Is that up to date? But to be honest, 55 seconds is not a bad time at all, especially with loading docker.
          Cut down that bios time, and it is super fast. Look at what you

          Comment


            #6
            Originally posted by claydoh View Post

            What hardware do you have?
            Your network service is taking a long time - what card is it?
            - ASUS TUF GAMING B760 PLUS WIFI​
            - MSI GeForce RTX 4060 Ti VENTUS 2X BLACK OC​

            Have you tried disabling docker? What containers are you running, and are they loading during bootup (part of the "userspace?)

            Also note it is taking 20 seconds to get past the bios loading (the firmware stage), Is that up to date? But to be honest, 55 seconds is not a bad time at all, especially with loading docker.
            Cut down that bios time, and it is super fast. Look at what you
            I have one docker running at boot but this was happening without docker as well. I will try disabling it.

            Regarding bios, I will take a look

            Comment

            Working...
            X