Announcement

Collapse
No announcement yet.

Yet Another Slow Shutdown Involving NetworkManager...

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

    Yet Another Slow Shutdown Involving NetworkManager...

    ...this time with the 6.14.0-27-generic kernel. Running X11 on a system that is dual-bootable to both Kubuntu and Win11. (I rarely run Win11.) I was viewing the SanDisk and Yahoo Mail websites using Chromium in incognito mode (because I hate leaving cookie crumbs for others to follow). NetworkManager started acting up, consuming 100% of a single CPU, during which time the NetworkManager icon on my taskbar went orange-red. (I run both LAN and WiFi on this desktop.) The ifconfig command hung. I performed "top" to see NetworkManager at 100% and to obtain the NetworkManager PID. I then attempted to kill NetworkManager using "sudo kill <NetworkManager PID>, but the "sudo" command hung. (All "sudo" commands hung during this time which is likely not a clue but only a symptom.) However...and this is the only time I've _really_ needed to do this...I previously set a password for root and I was able to become root via "su". As root, I then killed the NetworkManager PID. All was allegedly back to normal. I then performed "shutdown -r", but found that processes associated with fwupd-refresh.service, postfix@.service and cups-browsed.service refused to die until MUCH later when the operating system finally sent SIGKILL. And just as before, while the system did shutdown, it did not power off the hardware, leaving up a display stating that /dev/sda needed to perform some cache saving or something similar...and /dev/sda was NOT mounted and is essentially NEVER used, since I run a SSD. As such, the reboot required by "shutdown -r" did not occur.

    Also, my Plasma display sometimes crashes but recovers. Yes, it is annoying.

    1. Let me know if I need to post this elsewhere in kubuntu forums.

    2. Could this nonsense be caused by UEFI/BIOS settings?

    3. Tell me exactly what information you need from me. Here is what is returned by "inxi -xxz -F":
    System:

    Kernel: 6.14.0-27-generic arch: x86_64 bits: 64 compiler: gcc v: 13.3.0
    Desktop: KDE Plasma v: 5.27.12 tk: Qt v: 5.15.13 wm: kwin_x11 dm: SDDM
    Distro: Kubuntu 24.04.2 LTS (Noble Numbat) base: Ubuntu

    Machine:

    Type: Desktop Mobo: Micro-Star model: PRO B650-VC WIFI III (MS-7E18) v: 1.0
    serial: &lt;superuser required&gt; part-nu: Desktop UEFI: American Megatrends LLC.
    v: 1.H4 date: 12/20/2024

    CPU:

    Info: 12-core model: AMD Ryzen 9 9900X bits: 64 type: MT MCP MCM arch: N/A
    rev: 0 cache: L1: 960 KiB L2: 12 MiB L3: 64 MiB
    Speed (MHz): avg: 3104 high: 3634 min/max: 600/5662 boost: enabled cores:
    1: 3001 2: 3001 3: 3634 4: 3001 5: 3001 6: 3001 7: 3001 8: 3001 9: 3001
    10: 3001 11: 3001 12: 3001 13: 3001 14: 3001 15: 3608 16: 3001 17: 3001
    18: 3001 19: 3624 20: 3623 21: 3001 22: 3001 23: 3001 24: 3001
    bogomips: 211199
    Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm

    Graphics:

    Device-1: NVIDIA vendor: Micro-Star MSI driver: nvidia v: 575.64.03 pcie:
    speed: 32 GT/s lanes: 16 ports: active: none off: DP-1,DP-2
    empty: DP-3,HDMI-A-2 bus-ID: 01:00.0 chip-ID: 10de:2f04
    Device-2: AMD vendor: Micro-Star MSI driver: amdgpu v: kernel pcie:
    speed: 16 GT/s lanes: 16 ports: active: none empty: HDMI-A-1,Writeback-1
    bus-ID: 13:00.0 chip-ID: 1002:13c0 temp: 34.0 C
    Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.6
    compositor: kwin_x11 driver: X: loaded: amdgpu,nvidia
    unloaded: fbdev,modesetting,nouveau,vesa dri: radeonsi
    gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
    Screen-1: 0 s-res: 3360x1050 s-dpi: 87
    Monitor-1: DP-1 note: disabled pos: right model: LG (GoldStar) W2252
    res: 1680x1050 dpi: 90 diag: 585mm (23")
    Monitor-2: DP-2 mapped: DP-3 note: disabled pos: primary,left
    model: LG (GoldStar) L226W res: 1680x1050 dpi: 90 diag: 585mm (23")
    API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 1 drv: radeonsi
    device: 3 drv: swrast gbm: drv: kms_swrast surfaceless: drv: nvidia x11:
    drv: nvidia inactive: wayland,device-2
    API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 575.64.03
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 5070/PCIe/SSE2
    API: Vulkan v: 1.3.275 surfaces: xcb,xlib device: 0 type: discrete-gpu
    driver: N/A device-ID: 10de:2f04 device: 1 type: integrated-gpu driver: N/A
    device-ID: 1002:13c0 device: 2 type: cpu driver: N/A device-ID: 10005:0000

    Audio:

    Device-1: NVIDIA driver: snd_hda_intel v: kernel pcie: speed: 32 GT/s
    lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:2f80
    Device-2: AMD Rembrandt Radeon High Definition Audio
    vendor: Micro-Star MSI driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
    lanes: 16 bus-ID: 13:00.1 chip-ID: 1002:1640
    Device-3: AMD Family 17h/19h HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 13:00.6 chip-ID: 1022:15e3
    API: ALSA v: k6.14.0-27-generic status: kernel-api
    Server-1: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active
    Server-2: PulseAudio v: 16.1 status: off (using pipewire-pulse)

    Network:

    Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI RTL8111/8168/8411 driver: r8169 v: kernel pcie:
    speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 0f:00.0 chip-ID: 10ec:8168
    IF: enp15s0 state: up speed: 1000 Mbps duplex: full mac: &lt;filter&gt;
    Device-2: Qualcomm WCN785x Wi-Fi 7 320MHz 2x2 [FastConnect 7800]
    vendor: Foxconn Band Simultaneous Wireless driver: ath12k_pci v: N/A pcie:
    speed: 8 GT/s lanes: 1 bus-ID: 10:00.0 chip-ID: 17cb:1107
    IF: wlp16s0 state: up mac: &lt;filter&gt;
    IF-ID-1: virbr0 state: down mac: &lt;filter&gt;

    Bluetooth:

    Device-1: Foxconn / Hon Hai driver: btusb v: 0.8 type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 bus-ID: 1-12:3 chip-ID: 0489:e10a
    Report: hciconfig ID: hci0 rfk-id: 0 state: up address: &lt;filter&gt; bt-v: 5.3
    lmp-v: 12 sub-v: 7fe5

    Drives:

    Local Storage: total: 3.64 TiB used: 504.15 GiB (13.5%)
    ID-1: /dev/nvme0n1 vendor: Western Digital model: WD Green SN3000 2TB
    size: 1.82 TiB speed: 63.2 Gb/s lanes: 4 serial: &lt;filter&gt; temp: 32.9 C
    ID-2: /dev/sda vendor: Seagate model: ST2000DM006-2DM164 size: 1.82 TiB
    speed: 6.0 Gb/s serial: &lt;filter&gt;

    Partition:

    ID-1: / size: 1.38 TiB used: 504.08 GiB (35.7%) fs: ext4 dev: /dev/nvme0n1p4
    ID-2: /boot/efi size: 96 MiB used: 67.4 MiB (70.2%) fs: vfat
    dev: /dev/nvme0n1p1

    Swap:

    ID-1: swap-1 type: file size: 512 MiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile

    Sensors:

    System Temperatures: cpu: 37.0 C mobo: 29.0 C
    Fan Speeds (rpm): N/A
    GPU: device: nvidia screen: :0.0 temp: 39 C fan: 0% device: amdgpu
    temp: 34.0 C

    Info:

    Memory: total: 32 GiB note: est. available: 30.45 GiB used: 3.04 GiB (10.0%)
    Processes: 480 Power: uptime: 36m wakeups: 0 Init: systemd v: 255
    target: graphical (5) default: graphical
    Packages: 3102 pm: dpkg pkgs: 3077 pm: flatpak pkgs: 7 pm: snap pkgs: 18
    Compilers: gcc: 13.3.0 Shell: Bash v: 5.2.21 running-in: konsole
    inxi: 3.3.34

    ​Thank you very much in advance!

    #2
    I saw some interesting-to-me behavior earlier that is symptomatic of the slow-shutdown problem and thought I should provide it here.

    Since my desktop is a bit more energy-hoggish than my previous desktop, I normally put it into "sleep" mode when I walk away from it. So I placed it into sleep mode, and upon return/wakeup I noticed that both NetworkManager and sadc were running at 100% load on single CPUs. Note that this is not an everytime event...this happens some of the time.

    It is also while NetworkManager is running full-tilt boogie at 100% that my taskbar Networks icon is orange-red, indicating loss of internet capability.

    I then executed "systemctl list-units" and browsed through the long list of items. Here's what I saw that was highlighted by the system with different font colors than the rest of the output:
    Code:
    UNIT                     LOAD    ACTIVE  SUB     JOB  DESCRIPTION
    systemd-suspend.service  loaded  failed  failed       System Suspend​
    This was the only "failed" service. I suppose there could be other abnormal service states that would be pertinent to this issue, but I plead ignorance. I can read man pages, but I admit to being a bit snowed under when trying to learn about systemd. systemctl is a little more straight-forward, but it's still a long read that requires significant knowledge to fully understand, and I'm not there yet.

    I have noticed that when the above event occurs, any command preceded by "sudo" is either hung or takes so long that it might as well be considered hung. I did attempt "systemctl stop NetworkManager.service" and it did finally return with a command line prompt, but that took a _VERY_LONG_TIME_. I followed this with "systemctl restart NetworkManager.service", but after a _VERY_LONG_TIME_, I gave up and proceeded to reboot. Yes, reboot took a very long time, but I finally got my system back with network service so I could provide this spew to you. It certainly appears that systemd is taking a very long time to shutdown services, but I have no clue why. Perhaps something is making the system believe that it has resources that are required for ongoing processes and those processes refuse to release the resources back to the system.

    ​If you would be so kind as to provide either links or ideas on where/how to look to troubleshoot this issue, I would greatly appreciate it.

    Comment


      #3
      Have you tried switching to systemd-networkd instead of NM?

      I know it doesn't help with trouble shooting but it might avoid the problem. I only use NM on my laptop. My others (desktops and server) I use systemd

      https://manpages.ubuntu.com/manpages...network.5.html

      Please Read Me

      Comment


        #4
        No, I have not switched over to using systemd-networkd. 24.04 LTS was installed on my system with NetworkManager as the default. If I were to make this switchover, I would prefer that capability provided to me by the system designers with a simple "System Settings" modification or a fairly simple download process _OR_ a set of instructions that could be run inside a shellscript so as to minimize the likelihood of error. I just read the man page link you provided...THANK YOU FOR THAT...and I do not understand all the changes that need to be made. I'm not steeped in systemd and I'm not trained as a Computer Scientist or as a Network Engineer. I'm a retired PhD Electrical Engineer/Scientist.

        Actually, I didn't read the entire link. My eyes glazed over before I got to "[PIE] SECTION OPTIONS". There is so much to misunderstand... ;-)

        Edited to add: I don't need a shellscript, but a set of cookbook instructions would look really good to me. ;-)
        Last edited by TheSupremeVizier; Aug 08, 2025, 09:37 PM.

        Comment


          #5
          I agree there's a lot to unpack on the webpage but I didn't see where you described what kind of network connection you're using so it's impossible to give more specific instructions.

          wifi? ethernet? static ip? managed ip?

          Here's a Debian page that has the full set of configurations: https://wiki.debian.org/SystemdNetworkd

          Here's a simpler page that describes a static IP setup: https://stuffivelearned.org/doku.php...buntu:networkd

          Note on the static IP setup page, the writer has you remove netplan. There's a danger that if you mess up you could end up with no internet and no way to get it back. This is not an issue if you were wise enough to use BTRFS as your file system when installing. Then you can just take a snapshot before any edits and restore it if something goes wrong.


          Another thing to consider is the problem lies with the kernel or the kernel module on 6.14. If you still have 6.11 installed, boot to that and see if you get the same results. If it works on 6.11, then just remove 6.14. There;s no immediate need to upgrade the kernel unless you know of a specific need or feature you can't live without.

          Please Read Me

          Comment


            #6
            Hmmm. First, I'm pretty much using whatever default network configuration that the 24.04 LTS ISO image provided. My system is hooked up to both LAN and WiFi and both are enabled. Why? No particular reason other than I suspect Bluetooth works through the antenna also used for the WiFi connection, but Bluetooth likely has nothing to do with the wireless router that both the LAN and WiFi are connected into. As such, with respect to my problematic desktop, both the IP address provided by the router for the LAN port and the IP address provided by the WiFi router can vary from boot to boot. The only device on my LAN that has a permanently assigned IP address is the printer and that is an older laser printer connected via LAN to the router. So for the desktop, I would say both LAN and WiFi are used and that the router assigns the IP addresses, and as such I assume those are "managed addresses". "ifconfig" shows that IP addresses for the LAN and WiFi connections are assigned.

            Before I started this response, my Plasma desktop crashed. So I took the time to inspect "systemctl is-failed", "systemctl list-units", systemctl list-units --all" and "systemctl list-unit-files" and record everything that contained red font. It's lengthy, but I have no idea at this time if reboot will result in a lengthy scenario or be fast as desired. I will report back on that. I don't know if the snap-firefox failure is pertinent since I haven't used Firefox since booting and I'm using Chromium right now. Maybe there's a dependency on Firefox. Here's the spew:
            Code:
            In what follows, if any red font was shown in the output, the entire output line is presented below. 
            "systemctl is-failed" reports degraded
            "systemctl list-units" returns the following using red font indicating potential discrepancy:
            UNIT                     LOAD       ACTIVE  SUB     DESCRIPTION
            snap-firefox-6565.mount  not-found  failed  failed  snap-firefox-6565.mount​
            
            systemctl list-units --all" returns the following using red font indicating potential discrepancy:
            UNIT                                                                       LOAD      ACTIVE   SUB       DESCRIPTION
            home.mount                                                                 not-found inactive dead      home.mount
            run-credentials-systemd\x2dresolved.service.mount                          not-found inactive dead      run-credentials-systemd\x2dresolved.service.mount
            run-credentials-systemd\x2dsysctl.service.mount                            not-found inactive dead      run-credentials-systemd\x2dsysctl.service.mount
            run-credentials-systemd\x2dsysusers.service.mount                          not-found inactive dead      run-credentials-systemd\x2dsysusers.service.mount
            run-credentials-systemd\x2dtmpfiles\x2dclean.service.mount                 not-found inactive dead      run-credentials-systemd\x2dtmpfiles\x2dclean.service.mount
            run-credentials-systemd\x2dtmpfiles\x2dsetup.service.mount                 not-found inactive dead      run-credentials-systemd\x2dtmpfiles\x2dsetup.service.mount
            run-credentials-systemd\x2dtmpfiles\x2dsetup\x2ddev.service.mount          not-found inactive dead      run-credentials-systemd\x2dtmpfiles\x2dsetup\x2ddev.service.mount
            run-credentials-systemd\x2dtmpfiles\x2dsetup\x2ddev\x2dearly.service.mount not-found inactive dead      run-credentials-systemd\x2dtmpfiles\x2dsetup\x2ddev\x2dearly.service.mount
            snap-firefox-6565.mount                                                    not-found failed   failed    snap-firefox-6565.mount
            auditd.service                                                             not-found inactive dead      auditd.service
            auto-cpufreq.service                                                       not-found inactive dead      auto-cpufreq.service
            connman.service                                                            not-found inactive dead      connman.service
            console-screen.service                                                     not-found inactive dead      console-screen.service
            exim4.service                                                              not-found inactive dead      exim4.service
            fcoe.service                                                               not-found inactive dead      fcoe.service
            iscsi-shutdown.service                                                     not-found inactive dead      iscsi-shutdown.service
            iscsi.service                                                              not-found inactive dead      iscsi.service
            iscsid.service                                                             not-found inactive dead      iscsid.service
            kbd.service                                                                not-found inactive dead      kbd.service
            nslcd.service                                                              not-found inactive dead      nslcd.service
            oem-config.service                                                         not-found inactive dead      oem-config.service
            ovsdb-server.service                                                       not-found inactive dead      ovsdb-server.service
            rbdmap.service                                                             not-found inactive dead      rbdmap.service
            sendmail.service                                                           not-found inactive dead      sendmail.service
            system76-power.service                                                     not-found inactive dead      system76-power.service
            systemd-oomd.service                                                       not-found inactive dead      systemd-oomd.service
            systemd-vconsole-setup.service                                             not-found inactive dead      systemd-vconsole-setup.service
            tlp.service                                                                not-found inactive dead      tlp.service
            tuned.service                                                              not-found inactive dead      tuned.service
            ua-auto-attach.service                                                     not-found inactive dead      ua-auto-attach.service
            ubuntu-advantage-cloud-id-shim.service                                     not-found inactive dead      ubuntu-advantage-cloud-id-shim.service
            xencommons.service                                                         not-found inactive dead      xencommons.service
            xendomains.service                                                         not-found inactive dead      xendomains.service
            zfs-mount.service                                                          not-found inactive dead      zfs-mount.service
            virtlxcd.socket                                                            not-found inactive dead      virtlxcd.socket
            virtqemud.socket                                                           not-found inactive dead      virtqemud.socket
            virtvboxd.socket                                                           not-found inactive dead      virtvboxd.socket
            virtvzd.socket                                                             not-found inactive dead      virtvzd.socket
            virtxend.socket                                                            not-found inactive dead      virtxend.socket
            display-manager.target                                                     not-found inactive dead      display-manager.target
            syslog.target                                                              not-found inactive dead      syslog.target
            
            "systemctl list-unit-files" returns the following using red font indicating potential discrepancy:
            UNIT FILE                                    STATE           PRESET
            proc-sys-fs-binfmt_misc.mount                disabled        disabled
            postfix-resolvconf.path                      disabled        enabled
            alsa-utils.service                           masked          enabled
            cloud-init.service                           disabled        enabled
            console-getty.service                        disabled        disabled
            cryptdisks-early.service                     masked          enabled
            cryptdisks.service                           masked          enabled
            debug-shell.service                          disabled        disabled
            drkonqi-coredump-processor@.service          disabled        enabled
            gdomap.service                               disabled        enabled
            hwclock.service                              masked          enabled
            nftables.service                             disabled        enabled
            nvidia-suspend-then-hibernate.service        disabled        enabled
            postfix-resolvconf.service                   disabled        enabled
            pulseaudio-enable-autospawn.service          masked          enabled
            rsync.service                                disabled        enabled
            rtkit-daemon.service                         disabled        enabled
            saned.service                                masked          enabled
            serial-getty@.service                        disabled        enabled
            snap.chromium.daemon.service                 disabled        enabled
            snap.mesa-2404.component-monitor.service     disabled        enabled
            speech-dispatcherd.service                   disabled        enabled
            sudo.service                                 masked          enabled
            systemd-boot-check-no-failures.service       disabled        disabled
            systemd-confext.service                      disabled        enabled
            systemd-network-generator.service            disabled        enabled
            systemd-networkd-wait-online.service         disabled        enabled
            systemd-networkd-wait-online@.service        disabled        enabled
            systemd-networkd.service                     disabled        enabled
            systemd-nspawn@.service                      disabled        enabled
            systemd-pcrlock-file-system.service          disabled        enabled
            systemd-pcrlock-firmware-code.service        disabled        enabled
            systemd-pcrlock-firmware-config.service      disabled        enabled
            systemd-pcrlock-machine-id.service           disabled        enabled
            systemd-pcrlock-make-policy.service          disabled        enabled
            systemd-pcrlock-secureboot-authority.service disabled        enabled
            systemd-pcrlock-secureboot-policy.service    disabled        enabled
            systemd-sysext.service                       disabled        enabled
            systemd-time-wait-sync.service               disabled        disabled
            upower.service                               disabled        enabled
            wpa_supplicant-nl80211@.service              disabled        enabled
            wpa_supplicant-wired@.service                disabled        enabled
            wpa_supplicant@.service                      disabled        enabled
            x11-common.service                           masked          enabled
            libvirtd-tcp.socket                          disabled        enabled
            libvirtd-tls.socket                          disabled        enabled
            saned.socket                                 disabled        enabled
            systemd-journald-audit.socket                disabled        enabled
            systemd-networkd.socket                      disabled        enabled
            systemd-pcrextend.socket                     disabled        enabled
            systemd-sysext.socket                        disabled        enabled
            exit.target                                  disabled        disabled
            halt.target                                  disabled        disabled
            kexec.target                                 disabled        disabled
            poweroff.target                              disabled        disabled
            reboot.target                                disabled        enabled
            remote-cryptsetup.target                     disabled        enabled
            remote-veritysetup.target                    disabled        enabled
            systemd-sysupdate-reboot.timer               disabled        enabled
            systemd-sysupdate.timer                      disabled        enabled
            xfs_scrub_all.timer                          disabled        enabled
            ETA: The report back after reboot is that the shutdown occurred at a very rapid pace. As such, the above doesn't fully capture the failure(s) that is(are) causing the slow shutdown problem.
            Last edited by TheSupremeVizier; Today, 12:07 AM.

            Comment


              #7
              IME, having two internet connections to the same DHCP server causes problems unless one is specifically set for a sole purpose, like an VPN tunnel or a VM interface, or they are bonded.

              The fact that bluetooth and wifi use the same antenna doesn't mean you can't turn wifi off.

              I suggest turning one or the other off and see if anything improves. If you want them both one for some reason, look up how to bond (aka link aggregation) the ports.

              Please Read Me

              Comment

              Users Viewing This Topic

              Collapse

              There are 0 users viewing this topic.

              Working...
              X