Bug 955233 - Software Updates applet shows "Network is offline"
Summary: Software Updates applet shows "Network is offline"
Status: RESOLVED WONTFIX
: 1004399 (view as bug list)
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: KDE Workspace (Plasma) (show other bugs)
Version: Leap 42.1
Hardware: x86-64 openSUSE 42.1
: P5 - None : Normal with 4 votes (vote)
Target Milestone: ---
Assignee: E-Mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1188690
  Show dependency treegraph
 
Reported: 2015-11-16 16:36 UTC by Forgotten User gmWlqx1p_8
Modified: 2021-07-25 13:21 UTC (History)
9 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User gmWlqx1p_8 2015-11-16 16:36:30 UTC
The applet occasionally shows that the "Network is offline" even though there's an active connection to the internet.
There's no other connection enabled.
This results in inability to check for updates.
It usually goes back to normal after a reboot.

YaST -> Online Update works fine every time.
Comment 1 Chenzi Cao 2015-11-17 10:13:07 UTC
Hi Mike, are you using KDE or Gnome?
Comment 2 Forgotten User gmWlqx1p_8 2015-11-17 10:42:35 UTC
(In reply to Chenzi Cao from comment #1)
> Hi Mike, are you using KDE or Gnome?

I'm using  KDE Plasma 5.
Comment 3 Forgotten User gmWlqx1p_8 2015-11-23 16:23:31 UTC
(In reply to Mike Iliopoulos from comment #2)
> (In reply to Chenzi Cao from comment #1)
> > Hi Mike, are you using KDE or Gnome?
> 
> I'm using  KDE Plasma 5.

Update:

The applet always goes back to normal after a logout.
Comment 4 Forgotten User _AcwqRqvKw 2015-11-25 19:44:57 UTC
I also have this problem and a workaround is to execute "pkcon" with KRunner (I am using KDE Plasma 5 with Opensuse Leap, too).
Comment 5 Forgotten User MovfeAfRtI 2015-12-08 00:14:41 UTC
I can confirm both the problem (Apper shows "Network is Offline", even though I have a wired connection) and the solution (running "pkcon" from a command line).

I'm running OpenSUSE Tumbleweed.
Comment 6 Forgotten User 97x9v9Rtge 2016-01-27 22:02:11 UTC
Hallo.

I just stumbled accross changelog for plasma 5.5.4 (here):
https://www.kde.org/announcements/plasma-5.5.3-5.5.4-changelog.php

Could it be they have this fixed in that release?:
https://bugs.kde.org/show_bug.cgi?id=358028

Maybe this is related? I will try to test that 5.5.4 release when it arrives in KF5 repos. Sounds indeed like this mentioned issue.

Thank you!

Greetings,
Comment 7 Forgotten User 97x9v9Rtge 2016-01-27 22:10:56 UTC
Omg! Sorry i searched for a bug i opened myselves and i did not watch properly. I did not want to post that Message in your thread. Please all apologies for this. I wrote the message into my bug now. 

Again, Sorry for my fault!
Comment 8 Wolfgang Bauer 2016-01-30 13:50:52 UTC
(In reply to Matthias Klostermair from comment #6)
> I just stumbled accross changelog for plasma 5.5.4 (here):
> https://www.kde.org/announcements/plasma-5.5.3-5.5.4-changelog.php
> 
> Could it be they have this fixed in that release?:
> https://bugs.kde.org/show_bug.cgi?id=358028
> 
> Maybe this is related? I will try to test that 5.5.4 release when it arrives
> in KF5 repos. Sounds indeed like this mentioned issue.

I backported that fix to the Leap 42.1 package.
Would be nice if somebody that is affected and running Leap could test it, it's available here:
http://download.opensuse.org/repositories/home:/wolfi323:/branches:/OBS_Maintained:/plasma-nm5/openSUSE_Leap_42.1_Update
(only plasma-nm5 itself needs to be updated)

Tumbleweed users, please report back whether 5.5.4 fixes it for you. For now, you can get it from KDE:Frameworks5, again it should work to just install plasma-nm5 from there in case you don't want to fully switch to that repo.
But it will appear in the TW main repo too at some time in the next weeks.

Please note that this could only help with NetworkManager of course. Nobody here specified whether they used NetworkManager or Wicked.

For the record, I cannot reproduce the problem here. Neither on 13.2 nor on Leap 42.1, neither with Wicked nor with NetworkManager.
Comment 9 Wolfgang Bauer 2016-01-30 20:28:15 UTC
(In reply to Wolfgang Bauer from comment #8)
> For the record, I cannot reproduce the problem here. Neither on 13.2 nor on
> Leap 42.1, neither with Wicked nor with NetworkManager.

Well, I actually was able to reproduce the problem now, by disabling automatic connection in NetworkManager and connecting manually after login.

Of course in this case, the network is indeed "offline" when the update applet is "started" (together with the desktop).
The applet takes this state from packagekitd.
When the network is activated, packagekitd is supposed to notice that and tell the applet that the state has changed.

BUT: in openSUSE, packagekitd shuts itself down after 15 deconds of idleness, to not block YaST/zypper forever.
As it is not running, it of course cannot notice the network becoming online, and cannot notify the applet.

Running pkcon manually explicitly starts packagekitd, which then notifies the applet that the system is online.

So all in all this is again related to Bug#899755...

Not sure what we can do to fix that though.
If the applet would poll packagekitd (i.e. restart it) regularly all the time, people will complain as well I suppose, and it would somehow defeat the purpose of packagekitd shutting itself down.

Maybe it would be enough if it would show the "Check for updates" button even in case it is offline? Users would at least be able to "turn it on" again.
Or maybe we should just disable that check for being online/offline in the applet.
Personally I'd go with the second approach I think (that's also Appers behavior if I am not mistaken). Displaying "Network offline" by the updater isn't probably very interesting for the user anyway. If there are no updates to be installed, there are no updates to be installed, period.

Opinions are welcome of course.
Comment 10 Wolfgang Bauer 2016-01-30 21:13:11 UTC
(In reply to Wolfgang Bauer from comment #9)
> Or maybe we should just disable that check for being online/offline in the
> applet.

PS, changing line #102 in /usr/share/plasma/plasmoids/org.kde.plasma.pkupdates/contents/ui/main.qml
from
        return PkUpdates.isNetworkMobile ? checkOnMobile : PkUpdates.isNetworkOnline

to
        return PkUpdates.isNetworkMobile ? checkOnMobile : true

works quite well on a quick test.
(people that want to try it can just make the change locally on their system, those are just text files)

The applet even does display "Network Offline" if it checks for updates and there's no network connection.

One disadvantage: it will popup an error message immediately on login, so we should probably also delay the first check for updates (as Apper did).
Comment 11 Forgotten User 97x9v9Rtge 2016-01-30 23:35:42 UTC
Sorry if i intervent with that now:

Should not Networkmanager notify the plugin instead the plugin checking Networkmanager?

Greetings,
Comment 12 Wolfgang Bauer 2016-01-30 23:47:16 UTC
(In reply to Matthias Klostermair from comment #11)
> Sorry if i intervent with that now:
> 
> Should not Networkmanager notify the plugin instead the plugin checking
> Networkmanager?

???
What "plugin" are you talking about here?

The update applet gets notified by PackageKit. That's unrelated to NetworkManager, except that PackageKit maybe asks NetworkManager about the online state if NM is used. I don't know.

But how/why should NetworkManager by itself notify all other applications about the network state, even if those applications are not even running?

Again, the problem (as I see it) here is that packagekitd is not even running and therefore cannot see the network state and notify the applet that it changed.

And the applet is just a simple frontend to PackageKit (packagekitd). It doesn't interact with NetworkManager at all.
Comment 13 Forgotten User 97x9v9Rtge 2016-01-30 23:58:24 UTC
My thought was on that dispatcher service within Networkmanager.  Its inside Networkmanager and can notify services when new connections are established. It looks a little like sysvinit scripts.

Thats something like a central knob that can execute actions whenever you do something with Networkmanager.

Ok thats nothing about wicked and would probably be a big breakdown in the way all that works.

Why isnt there a central knob in linux wether it is online or offline. All do something different to try to find out if theres connection or not, as it seems.

sorry for OT (dont need to answer this).

Greetings,
Comment 14 Wolfgang Bauer 2016-10-13 22:36:30 UTC
*** Bug 1004399 has been marked as a duplicate of this bug. ***
Comment 15 Tomáš Chvátal 2018-04-13 15:02:10 UTC
This is automated batch bugzilla cleanup.

The openSUSE 42.1 changed to end-of-life (EOL [1]) status. As such
it is no longer maintained, which means that it will not receive any
further security or bug fix updates.
As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
openSUSE, or you can still observe it under openSUSE Leap 15.0, please
feel free to reopen this bug against that version (see the "Version"
component in the bug fields), or alternatively open
a new ticket.

Thank you for reporting this bug and we are sorry it could not be fixed
during the lifetime of the release.

[1] https://en.opensuse.org/Lifetime