Bug 426540 - plasma-nm icon vanishes sometimes after wake-from-sleep
Summary: plasma-nm icon vanishes sometimes after wake-from-sleep
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networks widget (show other bugs)
Version: master
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-14 21:07 UTC by Joshua J. Kugler
Modified: 2024-12-23 18:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua J. Kugler 2020-09-14 21:07:00 UTC
SUMMARY
I am running Plasma version 5.18.5 on Kubutnu 20.04. I am seeing a bug that has been present for a long time (multiple releases of KDE and Kubuntu). The icon for the network control panel in the tray will often vanish (usually after a wake from sleep). I have to kill plasmashell and invoke it to get it back.

STEPS TO REPRODUCE
1. Wake/sleep/wake/sleep several times

OBSERVED RESULT
Eventually, when waking up, the plasma-nm icon will no longer be in the panel, and it will not be in the hidden icons either.

EXPECTED RESULT
plasma-nm icon to always be there.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
This could be confirmation bias, since it's when I *want* the NM panel, but it seems to do it more when I wake from sleep, and the wireless network I was on is no longer there.

Any tips on what I could gather for your analysis would be appreciated! :)
Comment 1 Joshua J. Kugler 2020-09-14 21:21:04 UTC
tsdgeos in #kde-devel mentioned that a possible cause might be a kded crash, and "plasma-nm doesn't seem to be smart enough to restart itself properly."

The next time it does it, I will try to gather syslog and .xsession-errors output.
Comment 2 Nate Graham 2020-09-14 21:34:27 UTC
That's odd. Could also be Systray-model-related shenanigans.
Comment 3 Konrad Materka 2020-09-25 18:03:58 UTC
I don't think it is a problem in systemtray model itself. I last releases it was changed several times, including one major rewrite.
plasma-nm is "dbus-activable", this means that applet is shown when there is corresponding service running. It is possible that on suspend/wake the "org.freedesktop.NetworkManager" is disappearing and appearing again, but there are some timing issues.

Joshua,

* 5.18.5 is pretty old can you upgrade to newer version?

* when icon is not present, can you try:
1. Open settings of System Tray. Right click on expander arrow or button in the popup (in latest Plasma)
2. Go to Entries, find Networks (Automatic load). Disable it (by selecting "Disabled", save settings and then enable again (for example by selecting "Shown when relevant").
3. Please report the result of this test.
Comment 4 Joshua J. Kugler 2020-09-25 18:26:13 UTC
Konrad -

Thanks for you reply!

I will give that test a try as soon as it next vanishes.

As to the version, I'm on Kubuntu 20.04, and I'm running the latest in kubuntu-ppa/backports/. It seems There was a decision to bump the required version of Qt in KDE, so there are no newer KDE/Plasma packages for Focal. Kubuntu 20.10 isn't out yet, so to upgrade Plasma, as far as I know, I'd have to do a LOT of compiling. :) If you know of simpler way, I'm all ears!
Comment 5 Joshua J. Kugler 2020-09-28 18:02:51 UTC
I vanished again. So, this is what I did:

1. Right clicked on expander arrow, and selected "Configure System Tray.
2. Found "Networks (Automatic Load)
3. Changed to Disabled
4. Clicked Apply
5. Changed networks to Always shown.
6. Hit apply
7. It's back.

Agh...I did not pay attention to what it was before I changed it. It may have been "Shown when relevant."  I'll keep an eye on it.
Comment 6 Konrad Materka 2020-09-28 19:12:31 UTC
Thanks, that's what I expected.

When it will happen again, can you also try running from console:
sudo systemctl restart network-manager.service

This should also make network icon appear.

Unfortunately I don't know how to implement permanent solution, yet.
Comment 7 Jan Grulich 2020-09-29 05:52:12 UTC
I do not think it's kded crashing, the applet might wrongly re-check whether NetworkManager DBus service is running. That's what makes it auto-loaded. And it's actually not the applet itself, but it's Plasma code somewhere checking DBus services specified in desktop files.
Comment 8 Konrad Materka 2020-09-29 14:14:39 UTC
Jan Grulich, you are correct. My mistake, I wanted to change component of different issue :)
Comment 9 Joshua J. Kugler 2020-09-30 16:33:00 UTC
Welp...it vanished again. I did try

sudo systemctl restart network-manager.service

from the terminal, and it brought back the icon.
Comment 10 Joshua J. Kugler 2020-10-26 19:33:20 UTC
Just a data point. Vanished again.

sudo systemctl restart network-manager.service

brought it back.
Comment 11 Scott Farrell 2021-04-18 01:57:16 UTC
Hi.  I am having the exact same issue with Kubuntu 20.04 (5.18.5).  I never experienced this issue with the version in Kubuntu 18.04.  The only way to fix is to set icon to disabled, apply, then always shown apply or the command line sudo systemctl restart network-manager.service.  It's super annoying but seeing I can use the command line to fix is far faster than doing the systray edit apply apply fix at least.
Comment 12 Joshua J. Kugler 2022-08-04 17:17:14 UTC
Any updates as to this being fixed in a later version? Hopefully will upgrade to Ubuntu 22.04 soon so curious if this is fixed yet.

Also, is there a command-line equivalent to hide/show the network icon? `sudo systemctl restart network-manager.service` does work, but it would be nice if I could bring it back without restarting my network. :)
Comment 13 Joshua J. Kugler 2023-05-23 23:38:01 UTC
I am running KDE Neon these days. Currently at Plasma 5.27. I have not seen the network icon disappear since I started using it.

Just FYI. :)
Comment 14 Nate Graham 2023-05-24 15:13:05 UTC
Yay, let's call it fixed until it happens again. I suspect this was ultimately due to a too-old NetworkManager version or something.
Comment 15 Joshua J. Kugler 2023-07-15 07:05:05 UTC
Sorry to report, this happened again. Resume from hibernate. KDE Neon, Plasma 5.27.6
Comment 16 Ben Cooksley 2024-12-23 18:26:02 UTC
Bulk transfer as requested in T17796