Bug 471870 - With NetworkManager 1.44, the Networks applet disappears or loses all networks after stop/start of NetworkManager, which sometimes happens on wake from sleep in certain distros
Summary: With NetworkManager 1.44, the Networks applet disappears or loses all network...
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: applet (show other bugs)
Version: 5.27.6
Platform: Kubuntu Linux
: HI major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 475597 475957 476070 476323 478143 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-02 12:30 UTC by Łukasz Konieczny
Modified: 2023-12-07 22:41 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.112


Attachments
NM applet is not visible anywhere after resume (259.92 KB, image/png)
2023-07-02 12:30 UTC, Łukasz Konieczny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Konieczny 2023-07-02 12:30:01 UTC
Created attachment 160044 [details]
NM applet is not visible anywhere after resume

SUMMARY
There is a problem with NetworkManager applet in tray. It happens frequently (but not always), that this applet doesn't appear after resuming from suspend to RAM. I have attached a screenshot of such situation. As you can see, there is no NM applet either in tray or in the slid-up applet with other tray items.


STEPS TO REPRODUCE
1. Suspend system to RAM.
2. Resume from suspend.
3. Do points 1 and 2 until NM applet dies.
4. If it dies, suspend again and resume, NM applet most likely will reappear.

OBSERVED RESULT
Sometimes NM applet is not reachable after resuming.

EXPECTED RESULT
NM applet is always visible in the system.

SOFTWARE/OS VERSIONS
GNU/Linux, KDE Plasma: 
(available in About System)
Operating System: Kubuntu 23.04
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.8
Kernel Version: 6.2.0-24-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: System76
Product Name: Darter Pro
System Version: darp7

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-10-25 20:59:56 UTC
*** Bug 475597 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2023-10-25 21:01:06 UTC
*** Bug 475957 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2023-10-25 21:01:09 UTC
*** Bug 476070 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2023-10-25 21:02:42 UTC
Cannot reproduce in Plasma 6 with `systemctl restart NetworkManager` which is how folks were able to reproduce this in Plasma 5, so it looks like it's been fixed. It may have been ultimately caused by an issue in Qt 5 that's now fixed in Qt 6.
Comment 5 qwrules 2023-10-26 06:43:12 UTC
This is not resolved. The plasma-nm works after resume for ethernet connections, but WiFi functionality never comes back.
Comment 6 Ilan 2023-10-26 06:47:38 UTC
(In reply to qwrules from comment #5)
> This is not resolved. The plasma-nm works after resume for ethernet
> connections, but WiFi functionality never comes back.

This is exactly what I'm experiencing in Plasma 5, plasma-nm shows only  ethernet and wwan connections. List of Wifi AP and Wifi related settings are missing. See screenshot https://bugsfiles.kde.org/attachment.cgi?id=162495
Comment 7 Nate Graham 2023-10-26 21:39:21 UTC
My assertion is that the issue is fixed in Plasma 6. I would expect it to still be broken for you in Plasma 5, since that's the version people are reporting it against.
Comment 8 qwrules 2023-10-26 21:47:22 UTC
What's the point of marking the issue solved if to confirm it solved we have to wait almost half a year for Plasma 6 to be released?
Plus, the issue we report here is not the same as  the original OP.
Comment 9 Nate Graham 2023-10-26 21:49:21 UTC
(In reply to qwrules from comment #8)
> What's the point of marking the issue solved if to confirm it solved we have
> to wait almost half a year for Plasma 6 to be released?
Because that's how bug trackers work. Please read https://community.kde.org/Get_Involved/Issue_Reporting#Understand_what_the_resolution_statuses_mean.

> Plus, the issue we report here is not the same as  the original OP.
Both have the same root cause, which is why the different issues were marked as duplicates of this one.
Comment 10 Ilan 2023-10-27 11:10:30 UTC
(In reply to Nate Graham from comment #7)
> My assertion is that the issue is fixed in Plasma 6. I would expect it to
> still be broken for you in Plasma 5, since that's the version people are
> reporting it against.

Thank you for confirming that the issue is fixed. Will this fix be backported to plasma 5?
Comment 11 Nate Graham 2023-10-27 15:00:43 UTC
I'd imagine no, unless anyone can find the exact commit that fixed it either in plasma-nm's code or in Qt's code.
Comment 12 Nicolas Fella 2023-10-30 12:28:58 UTC
What version of NetworkManager are you running? You can check via "NetworkManager -V"
Comment 13 Nicolas Fella 2023-10-30 12:43:47 UTC
*** Bug 476323 has been marked as a duplicate of this bug. ***
Comment 14 Nicolas Fella 2023-10-30 12:45:04 UTC
https://bugs.kde.org/show_bug.cgi?id=476323 suggests that this is related to NetworkManager 1.44, and indeed I cannot reproduce this on Fedora 38 (NetworkManager 1.42) but can on Fedora 39 (NetworkManager 1.44)
Comment 15 qwrules 2023-10-30 18:09:50 UTC
1.44.2 here
Comment 16 K900 2023-11-02 11:40:47 UTC
I think I have an idea of what the issue is. Can affected people test this patch please? https://github.com/NixOS/nixpkgs/blob/a2b55199b433edabc434469346130391837cad8e/pkgs/development/libraries/kde-frameworks/nmqt.patch
Comment 18 Nate Graham 2023-11-02 16:29:12 UTC
Git commit ac2d8e0458b38dfd098793b9fdd5da4f07d79c17 by Nate Graham, on behalf of Ilya Katsnelson.
Committed on 02/11/2023 at 17:29.
Pushed by ngraham into branch 'master'.

Listen for both DBus service registration events and interface added events

The old method doesn't seem to work anymore with NM 1.44, so the widgets
break when NM is restarted (or simply started late).

This somewhat reverts fa472e6a5e2637a681f61e75cf0988bf847f46ed, but keeps
both methods in-place, and adds some extra sanity checks to make sure we're
not trying to call completely invalid interfaces.
FIXED-IN: 5.112

M  +25   -10   src/manager.cpp
M  +1    -0    src/manager_p.h
M  +14   -1    src/secretagent.cpp
M  +1    -0    src/secretagent.h
M  +4    -0    src/secretagent_p.h

https://invent.kde.org/frameworks/networkmanager-qt/-/commit/ac2d8e0458b38dfd098793b9fdd5da4f07d79c17
Comment 19 Nate Graham 2023-11-02 16:31:48 UTC
Git commit d9a938ddbfb5800503935926301ff2865ab77a6d by Nate Graham, on behalf of Ilya Katsnelson.
Committed on 02/11/2023 at 17:29.
Pushed by ngraham into branch 'kf5'.

Listen for both DBus service registration events and interface added events

The old method doesn't seem to work anymore with NM 1.44, so the widgets
break when NM is restarted (or simply started late).

This somewhat reverts fa472e6a5e2637a681f61e75cf0988bf847f46ed, but keeps
both methods in-place, and adds some extra sanity checks to make sure we're
not trying to call completely invalid interfaces.
FIXED-IN: 5.112


(cherry picked from commit ac2d8e0458b38dfd098793b9fdd5da4f07d79c17)

M  +25   -10   src/manager.cpp
M  +1    -0    src/manager_p.h
M  +14   -1    src/secretagent.cpp
M  +1    -0    src/secretagent.h
M  +4    -0    src/secretagent_p.h

https://invent.kde.org/frameworks/networkmanager-qt/-/commit/d9a938ddbfb5800503935926301ff2865ab77a6d
Comment 20 Nate Graham 2023-12-07 22:41:53 UTC
*** Bug 478143 has been marked as a duplicate of this bug. ***