Bug 16014

Summary: net_applet shows "down" notification when interface comes up (Gtk3::Notify::Queue always displays the 1st msg)
Product: Mageia Reporter: Bit Twister <bittwister2>
Component: RPM PackagesAssignee: Olivier Blin <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: mageia, olav, thierry.vignaud, unruh
Version: CauldronKeywords: PATCH
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: MGA4TOO MGA5TOO
Source RPM: libnotify, drakx-net CVE:
Status comment:
Attachments: task bar message
log DBus errors
fix always displaying 1st bubble

Description Bit Twister 2015-05-22 15:38:30 CEST
Description of problem:

Task bar network message does not show enpxxx is up. You get the down message when the network nic goes down and when it comes up and it still says nic is down.

Problem is in Release 4 and 5.

Version-Release number of selected component (if applicable):


How reproducible: Always


Steps to Reproduce:
1. Create/run a virtual box guest
2. Quit the guest, select Save state
3. start guest again
4. note the two task bar network messages. Both indicate nic is down.
   Last message should indicate nic is up.



Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2015-05-23 13:34:50 CEST
Please give a screenshot or something so we can tell which software is responsible for the message.
Comment 2 Bit Twister 2015-05-23 14:10:41 CEST
Created attachment 6621 [details]
task bar message
Comment 3 David Walser 2015-05-27 16:43:10 CEST
OK your description is a bit inaccurate.  It doesn't "still say" that it's down, that's an old notification that you haven't yet dismissed.  In fact, the applet clearly shows that it's up.  What you're requesting is that it also send a notification when the interface comes up.  Changing this to an enhancement request.

CC: (none) => thierry.vignaud
Assignee: bugsquad => mageia
Summary: 4-5_rc: Task bar network message does not show enpxxx is up => net_applet does not send notifications when interface comes up
Source RPM: (none) => drakx-net
Severity: normal => enhancement

Comment 4 Samuel Verschelde 2015-05-27 16:47:39 CEST
I can confirm the reporter's issue in Mageia 4. When network comes back on, you instantly get the wrong notification, like it's come down instead of up.

Probably easy to fix but gives a bad impression.

Summary: net_applet does not send notifications when interface comes up => net_applet shows "down" notification when interface comes up
Severity: enhancement => major

Samuel Verschelde 2015-05-27 16:47:58 CEST

Whiteboard: (none) => MGA4TOO MGA5TOO

Comment 5 Bit Twister 2015-05-27 20:03:21 CEST
(In reply to David Walser from comment #3)
> OK your description is a bit inaccurate.  It doesn't "still say" that it's
> down, that's an old notification that you haven't yet dismissed.

I disagree, First notification was when nic was taken down and second one
is when it came up.

>  In fact, the applet clearly shows that it's up. 

Both messages show network is DOWN. 

Please show me where the applet "clearly shows it's up" ???

> What you're requesting is that it
> also send a notification when the interface comes up.  Changing this to an
> enhancement request.

As a matter of fact, run
  systemctl stop network
  note applet message indicates is down.
  clear/delete that message
  systemctl start network
  Note you still get network is down.
Comment 6 Thierry Vignaud 2015-05-27 20:10:55 CEST
It can also be a s2u defect

Source RPM: drakx-net => drakx-net, s2u

Comment 7 Bit Twister 2015-05-27 21:12:22 CEST
(In reply to Thierry Vignaud from comment #6)
> It can also be a s2u defect

The nic up status may also be what is causing bug 15901
Comment 8 Thierry Vignaud 2015-06-09 11:28:09 CEST
Care to test patch from bug #15737?

Depends on: (none) => 15737

Comment 9 Thierry Vignaud 2015-06-09 12:30:48 CEST
Actually the issue is that net_applet uses Gtk3::Notify::Queue
(and we've already talked about this at some point in the past)
This is a custom widget written by Blino that enqueues.
What happens is that net_applet queues a down msg then a up msg.
But the messages are never removed from the queue as the "closed" signal is not fired by current libnotify.
So when we try to show the 2nd msg, the widget actually displays the first one b/c
Blino, I think we should just reap Gtk3::Notify::Queue and use regular notifications.

Source RPM: drakx-net, s2u => drakx-net

Thierry Vignaud 2015-06-09 12:31:21 CEST

Summary: net_applet shows "down" notification when interface comes up => net_applet shows "down" notification when interface comes up (Gtk3::Notify::Queue always displays the 1st msg)

Comment 10 Thierry Vignaud 2015-06-09 13:16:19 CEST
Created attachment 6722 [details]
log DBus errors
Comment 11 Thierry Vignaud 2015-06-09 13:16:33 CEST
Created attachment 6723 [details]
fix always displaying 1st bubble
Thierry Vignaud 2015-06-09 13:16:48 CEST

Keywords: (none) => PATCH
Depends on: 15737 => (none)

Comment 12 Thierry Vignaud 2015-06-09 13:22:11 CEST
Unless someone steps up and reports the missing signal upstream
(The missing âcloseâ signal when notification times out is a violation of 
(http://www.galago-project.org/specs/notification/0.9/x408.html#signal-notification-closed), I'll commit this for mga6 and rip both Gtk[23]::Notify::Queue widgets
Comment 13 Thierry Vignaud 2015-06-09 13:26:40 CEST
Which seems unlikely as libnotify hasn't seen neither a release since 2003 nor a commit since early 2014...

BTW the reference bug I workarounded in 2nd patch should be actually fixed by a patch in libnotify.
See Fedora:
http://pkgs.fedoraproject.org/cgit/libnotify.git/tree/0001-notify_notification_set_image_from_pixbuf-ref-the-pi.patch

CC: (none) => mageia, olav
Source RPM: drakx-net => libnotify, drakx-net

Comment 14 Olav Vitters 2015-06-09 18:54:43 CEST
That Fedora patch has been in upstream git for various releases.
Comment 15 Thierry Vignaud 2015-06-09 20:40:52 CEST
Indeed but the call to Gtk3::Notify::Notification->new() does destroy our Gtk3::StatusIcon object. Might be an annotation bug...
Comment 16 w unruh 2015-06-10 21:34:20 CEST
I applied the above two patches (6722 and 6723), and also applied the s2u patch (bug 15737 and patch 6721). It seems to be working better as far as the notifications are concerned, but now if I disconnect from one SSID and reconnect to another, the net_applet icon disappears from the task bar. There is a space on the task bar for it, but there is no icon (the fan with the green arcs) displayed. If I disconnect, then the globe with the red x is displayed, but not the fan when it comes up.  It was displayed the first time I brought the wireless up, but not on subsequent times. 
(The green fan IS displayed on the notification messages, but not on the task bar.)

The problem seems to be s2u. When I replaced s2u with the old version, (with the wrong dbus messages) the "fan" got displayed again. 

But now the messages are messed up again. I had disconnected the wireless before I replaced s2u with the old one. When I reconnected, I again got the "Network is down on interfiace WiredEthernet)" notification, which is wrong on two accounts-- I never did d annything to the wired network, and the wireless network was up. 

So, there seems to be a weird interaction between s2u and these net_applet notifications. 

I then killed net_applet and ran it from the command line and when I brought down the wireless connection and then brought it back up again I got the attached  messages

CC: (none) => unruh

Comment 17 w unruh 2015-06-10 21:41:02 CEST
Opps-- cannot attach. got and error message that attchments.cgi is unavailable. 

Here are the messages cut and pasted.

planet:0[root]>killall net_applet
planet:0[root]>net_applet &
[1] 13481
planet:0[root]>Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.20.1/Gtk3.pm line 296.
Unable to read modalias from /sys/bus/usb/devices/3-1/3-1.1/modalias
got connection status event: link_down wlp3s0
>> ERR:The connection is closed at /usr/lib/perl5/vendor_perl/5.20.1/x86_64-linux-thread-multi/Glib/Object/Introspection.pm line 58.
got connection status event: interface_down wlp3s0
got connection status event: interface_down wlp3s0
got connection status event: interface_down wlp3s0
got connection status event: connection_start wlp3s0
got connection status event: link_up wlp3s0
got connection status event: connection_start wlp3s0
got connection status event: dhcp_request wlp3s0
got connection status event: dhcp_success wlp3s0
got connection status event: interface_up wlp3s0
>> ERR:The connection is closed at /usr/lib/perl5/vendor_perl/5.20.1/x86_64-linux-thread-multi/Glib/Object/Introspection.pm line 58.
Comment 18 w unruh 2015-06-18 19:22:26 CEST
The problem of the disappearing netapplet icon is still there. There is a space on the taskbar, which you can hover over and get the report, or click on and bring up network Center, but you cannot see anything. This is sporadic-- sometimes it is there for a few bootups in a day, and then the icon will suddenly appear again
Comment 19 Thierry Vignaud 2016-08-28 18:33:02 CEST
I've fixed this one in drakx-net-2.23
See http://gitweb.mageia.org/software/drakx-net/commit/?id=d0fe77265c37dc39ad8c7fbfccc204e1c6d5f4ad

Status: NEW => RESOLVED
Resolution: (none) => FIXED