Bug 22218 - net_applet does not display the menu anymore when you right-click on it
Summary: net_applet does not display the menu anymore when you right-click on it
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: Mageia 9
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard: MGA8TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-18 17:46 CET by Patrick G
Modified: 2021-05-21 02:48 CEST (History)
7 users (show)

See Also:
Source RPM: drakx-net-2.54-1.mga8.src.rpm
CVE:
Status comment:


Attachments
net_applet no right click menu after boot (991.78 KB, video/webm)
2020-07-24 10:34 CEST, Aurelien Oudelet
Details

Description Patrick G 2017-12-18 17:46:22 CET
Description of problem:
Since a recent update (less than 2 weeks),net_applet does no more displays the menu when you right-click on it.
It seems that bug #20911 appears again.
As Frédéric Buclin said in #20911, killing & restarting the applet from a shell make right-clicks to work fine. But the applet launched when the session starts does not display the context menu when right-clicking on it.

The mgaonline applet is not affected (it shows menu when right-clicked.

For info, list of packages updated since 2 weeks :
rsync-3.1.2-1.1.mga6.x86_64                   dim. 17 déc. 2017 19:36:24 CET
openssl-1.0.2n-1.mga6.x86_64                  dim. 17 déc. 2017 19:36:23 CET
lynx-2.8.8-1.rel2.6.1.mga6.x86_64             dim. 17 déc. 2017 19:36:23 CET
lib64openssl-engines1.0.0-1.0.2n-1.mga6.x86_64 dim. 17 déc. 2017 19:36:23 CET
lib64openssl1.0.0-1.0.2n-1.mga6.x86_64        dim. 17 déc. 2017 19:36:22 CET
firefox-fr-52.5.2-1.mga6.noarch               mar. 12 déc. 2017 13:48:53 CET
firefox-52.5.2-1.mga6.x86_64                  mar. 12 déc. 2017 13:48:52 CET
lib64xfont1-1.5.2-1.2.mga6.x86_64             sam. 09 déc. 2017 20:19:35 CET
lib64xfont2_2-2.0.1-4.2.mga6.x86_64           sam. 09 déc. 2017 20:19:34 CET
lib64xcursor1-1.1.14-6.1.mga6.x86_64          sam. 09 déc. 2017 20:19:34 CET
grub2-mageia-theme-2.02.0-1.mga6.noarch       sam. 09 déc. 2017 20:19:34 CET
ffmpeg-3.3.5-1.mga6.tainted.x86_64            sam. 09 déc. 2017 20:19:34 CET
grub2-common-2.02.0-1.mga6.x86_64             sam. 09 déc. 2017 20:19:33 CET
lib64avformat57-3.3.5-1.mga6.tainted.x86_64   sam. 09 déc. 2017 20:19:32 CET
lib64avfilter6-3.3.5-1.mga6.tainted.x86_64    sam. 09 déc. 2017 20:19:32 CET
grub2-efi-2.02.0-1.mga6.x86_64                sam. 09 déc. 2017 20:19:32 CET
lib64swscaler4-3.3.5-1.mga6.tainted.x86_64    sam. 09 déc. 2017 20:19:31 CET
lib64postproc54-3.3.5-1.mga6.tainted.x86_64   sam. 09 déc. 2017 20:19:31 CET
lib64avresample3-3.3.5-1.mga6.tainted.x86_64  sam. 09 déc. 2017 20:19:31 CET
lib64avcodec57-3.3.5-1.mga6.tainted.x86_64    sam. 09 déc. 2017 20:19:31 CET
lib64swresample2-3.3.5-1.mga6.tainted.x86_64  sam. 09 déc. 2017 20:19:30 CET
lib64avutil55-3.3.5-1.mga6.tainted.x86_64     sam. 09 déc. 2017 20:19:30 CET
lib64ijs1-0.35-124.mga6.x86_64                dim. 03 déc. 2017 18:25:46 CET
lib64apr-util1_0-1.5.4-8.mga6.x86_64          dim. 03 déc. 2017 18:25:46 CET
ghostscript-module-X-9.22-1.mga6.x86_64       dim. 03 déc. 2017 18:25:46 CET
thunderbird-fr-52.5.0-1.mga6.noarch           dim. 03 déc. 2017 18:25:45 CET
lib64webkit2gtk-gir4.0-2.18.3-1.mga6.x86_64   dim. 03 déc. 2017 18:25:45 CET
lame-3.100-1.mga6.x86_64                      dim. 03 déc. 2017 18:25:45 CET
harddrake-ui-17.88.1-1.mga6.x86_64            dim. 03 déc. 2017 18:25:45 CET
harddrake-17.88.1-1.mga6.x86_64               dim. 03 déc. 2017 18:25:45 CET
ghostscript-9.22-1.mga6.x86_64                dim. 03 déc. 2017 18:25:45 CET
drakxtools-curses-17.88.1-1.mga6.x86_64       dim. 03 déc. 2017 18:25:44 CET
drakxtools-17.88.1-1.mga6.x86_64              dim. 03 déc. 2017 18:25:44 CET
thunderbird-52.5.0-1.mga6.x86_64              dim. 03 déc. 2017 18:25:43 CET
drakxtools-backend-17.88.1-1.mga6.x86_64      dim. 03 déc. 2017 18:25:43 CET
xdg-utils-1.1.2-1.1.mga6.noarch               dim. 03 déc. 2017 18:25:40 CET
lib64tiff5-4.0.9-1.mga6.x86_64                dim. 03 déc. 2017 18:25:39 CET
lib64mp3lame0-3.100-1.mga6.x86_64             dim. 03 déc. 2017 18:25:39 CET
lib64javascriptcore-gir4.0-2.18.3-1.mga6.x86_64 dim. 03 déc. 2017 18:25:39 CET
lib64gs9-9.22-1.mga6.x86_64                   dim. 03 déc. 2017 18:25:39 CET
webkit2-2.18.3-1.mga6.x86_64                  dim. 03 déc. 2017 18:25:38 CET
lib64webkit2gtk4.0_37-2.18.3-1.mga6.x86_64    dim. 03 déc. 2017 18:25:37 CET
ghostscript-common-9.22-1.mga6.x86_64         dim. 03 déc. 2017 18:25:36 CET
lib64javascriptcoregtk4.0_18-2.18.3-1.mga6.x86_64 dim. 03 déc. 2017 18:25:35 CET


Version-Release number of selected component (if applicable):
drakx-net-applet-2.32.1-1.mga6.rpm


<OT> I want to reopen bug #20911 but can't do it, so I fill this new bug </OT>

How reproducible:


Steps to Reproduce:
1.
2.
3.
Patrick G 2017-12-18 17:48:23 CET

CC: (none) => patrick.g.mga

Comment 1 Frédéric "LpSolit" Buclin 2017-12-19 00:03:34 CET
There has been no update of drakx-net since August 1, so something else broke your session. What's your desktop environment? GNOME, Plasma, ...? I cannot reproduce your issue using Plasma on Mageia 6 and drakx-net-2.32.1-1.mga6.
Marja Van Waes 2017-12-19 07:58:03 CET

Assignee: bugsquad => mageiatools
CC: (none) => marja11

Comment 2 Patrick G 2017-12-19 15:26:37 CET
Hi,

Thanks for your quick answer.

Sorry for forgetting system info. Here they are :

kernel : 4.9.56-desktop-1.mga6 #1 SMP Thu Oct 12 22:55:31 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
on Intel core I7-4790K CPU
with graphic card NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
Driver : NVRM version: NVIDIA UNIX x86_64 Kernel Module  384.98  Thu Oct 26 15:16:01 PDT 2017

Using KDE environment :
plasmashell 5.8.7
KDE Frameworks : 5.32.0
Qt : 5.6.2

I haven't installed anything manually and I haven't changed anything in configuration since months.


I have noticed that drakx-net is unchanged.
So I suppose there is some interaction with one of the other updates.
That's why I give the list of recent ones.

I notice than the update just prior the list I gave concerns graphic driver : 

nvidia-current-doc-html-384.98-1.mga6.nonfree.x86_64 dim. 26 nov. 2017 13:48:23 CET
lib64krb53-1.15.1-2.2.mga6.x86_64             dim. 26 nov. 2017 13:48:23 CET
x11-driver-video-nvidia-current-384.98-1.mga6.nonfree.x86_64 dim. 26 nov. 2017 13:48:22 CET
krb5-1.15.1-2.2.mga6.x86_64                   dim. 26 nov. 2017 13:48:18 CET
ldetect-lst-0.3.7.3-1.mga6.x86_64             dim. 26 nov. 2017 13:47:29 CET
dkms-nvidia-current-384.98-1.mga6.nonfree.x86_64 dim. 26 nov. 2017 13:47:29 CET

But I'm pretty sure it works more recently.

Note that all the other icons correctly show menu when right-clicking on them.
That's made me choosing drakx-net package for the bug report :).
Comment 3 Thomas Andrews 2020-02-29 22:37:37 CET
I am seeing this on one of my M7 Plasma installs. Hardware: i5-2500, 16GB RAM, integrated Intel graphics, wired Internet connection. 

This is my main production install, used on a daily basis, and fully updated. I don't often use the net_applet context menu, so I have no idea how long this has been in effect. I only tried it because another user from Usenet complained of the same problem.

I tried creating a new user on this install, and he is also affected. However, another Plasma install on the same hardware, used primarily for testing purposes, also fully updated, DOES have a working net_applet context menu. Unfortunately, I'm not seeing it on other Plasma installs on other hardware, either, indicating it's going to be VERY difficult to duplicate.

Changing the version to 7, since M6 is EOL.

CC: (none) => andrewsfarm
Version: 6 => 7

Comment 4 Aurelien Oudelet 2020-07-21 13:56:45 CEST
I am also affected by this strange behaviour from net_applet.

Right after startup, his logo is OK. No right-click menu available.
If I kill it and restart it from a console, right-click is available.

Therefore, when right-click menu is available, sub-menus are displayed in wrong direction at first (ie) where display finished. Subsequent hovering the cursor on these menus, subs menus are displayed correctly.

uname -a
Linux mageia.localdomain 5.7.9-desktop-1.mga8 #1 SMP Thu Jul 16 09:02:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

net_applet version : drakx-net-applet-2.51-1.mga8.noarch

Desktop is Plasma 5.19.3

Mageia 8a1 Classic Installer Iso fresh installation.

Also, I have 2 connections available and configured
enp0s31f6 (Ethernet - Intel I219-V) 
wlp5s0 (WiFi - Intel WiFi 6 AX200)

Bug is present, whatever connection is in operation.

Also, in console, after relaunch net_applet, I can see these logs:

Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 539.

Network services launched at boot:
network.service
mandi.service
shorewall.service
shorewall6.service

CC: (none) => ouaurelien

Comment 5 Morgan Leijström 2020-07-21 17:36:30 CEST
I do not have this problem now but remember having experienced something like this in the past.

I run Plasma. I note that the right click menus for different icons for me appear at two different places, either at cursor, or at edge of tray. ( And one is a bit strange: Nextcloud menu starts one menu height too high if and only if panel is at bottom) 

What i mean is there may be some quirk possible to play with:

Try if it works when the panel is at other edges of screen?

CC: (none) => fri

Comment 6 Aurelien Oudelet 2020-07-22 14:20:05 CEST
(In reply to Morgan Leijström from comment #5)
> I do not have this problem now but remember having experienced something
> like this in the past.
> 
> I run Plasma. I note that the right click menus for different icons for me
> appear at two different places, either at cursor, or at edge of tray. ( And
> one is a bit strange: Nextcloud menu starts one menu height too high if and
> only if panel is at bottom) 
> 
> What i mean is there may be some quirk possible to play with:
> 
> Try if it works when the panel is at other edges of screen?

Hello Morgan,
At other edges of screen, net_applet has same behaviour. I must relaunch it in order to have right-click menu.
Comment 7 Aurelien Oudelet 2020-07-23 21:22:28 CEST
I also remarked same behaviour for mgaapplet.

Just after system boot and log on my account, I would like to right-click on mgaapplet. I could not get it functioning by the time it waits to look for updates  (when icon is orange with 2 arrows).

Just after mgaapplet is ready (blue icon with tick or updates available), right-click is possible and I get a menu under mouse cursor on desktop.
---------------------------------------------

To return to net_applet, after system boot and log on to desktop, network is running and functioning.
If network is disconnected (unplug wire from computer for Ethernet OR switch off WiFi Network on my Freebox), net_applet reacts, change his status, right-click menu appears magically! Network is reconnected and right-click menu is still available for the rest of session.

I will publish tomorrow a video showing the bug.
Comment 8 Aurelien Oudelet 2020-07-24 10:34:46 CEST
Created attachment 11761 [details]
net_applet no right click menu after boot

This is a short video make with peek.

You can see that net_applet has no right-click menu functioning after system boot.
It runs fine after unplugg/pluging wire connection.

(or "killall net_applet" and do "net_applet &" in Konsole)

Regards,
Comment 9 Aurelien Oudelet 2020-09-05 23:51:09 CEST
In Plasma session (Plasma 5.19.5, Mageia 8 B1 Cauldron),
Each attempts to right-click on net_applet after booting result in journal output:

plasmashell[2326]: Could not find DBusMenu interface, falling back to calling ContextMenu()

But menu does not appear. It does if connection is dropped, or activate/deactivate one.

Already assigned to maintainer.
(Packagers: Please set the status to 'assigned' if you are working on it)

Version: 7 => Cauldron
Source RPM: drakx-net-2.32.1-1.mga6.src.rpm => drakx-net-2.51-1.mga8.src.rpm
Whiteboard: (none) => MGA7TOO
Keywords: (none) => Triaged
Target Milestone: --- => Mageia 8
Severity: normal => major

Comment 10 Frédéric "LpSolit" Buclin 2021-01-19 23:11:48 CET
I cannot reproduce this problem using Plasma and Mageia 7. I didn't try with Cauldron. How long do you wait between login and right-clicking on the icon?

CC: (none) => LpSolit

Comment 11 Thomas Andrews 2021-01-20 01:24:41 CET
Doesn't seem to matter on my affected machine. Right after the boot, or hours after, same thing.

It's interesting to watch, though. After the boot, right click on the icon once, nothing. Left click, and the Network Center comes up. Tell it to disconnect from the wired connection, and as soon as the icon changes, the context menu pops up - without right-clicking a second time. Reconnect, and from then on the context menu pops up with every right-click.
Comment 12 Frédéric "LpSolit" Buclin 2021-01-20 12:07:49 CET
Interesting. The problem you describe was supposed to be fixed by a commit I did in 2017 in both net_applet and mgaapplet. Could you test something for me? In /usr/bin/net_appplet at line 314, increase the value of the timeout from 100 (milliseconds) to something bigger, e.g. 1000 or 5000 (i.e. 1 or 5 seconds) and see if this fixes the problem for you. This is the last line of the code below:

# NOTE: Must be called after checkNetworkForce() above to make sure that
# the menu has already been created, else set_context_menu() will complain.
# When net_applet is launched automatically when opening a new session, there
# seems to be some latency with DBus and/or DBusMenu, and when this method
# is called too early, it seems to be blocked. So we add a timer here to call
# it again to make sure that right-click events will be correctly handled by
# DBusMenu.
Glib::Timeout->add(100, sub { $icon->set_context_menu($menu); 0 }) if $is_sni;
Comment 13 Aurelien Oudelet 2021-01-20 13:50:27 CET
M8 + Plasma 5.20.4 x86_64
WiFi configured within DrakX when installing.

First boot: net_applet gives a green WiFi icon. Connection is OK.
No right-click menu.
Seen in a Konsole with "journalctl -f" when right-clicking:

janv. 20 13:34:33 mageia.local plasmashell[2392]: Could not find DBusMenu interface, falling back to calling ContextMenu()

So, I think there is a race condition when user logs on: SNI is not available when net_applet starts. But it is available later.
Killall net_applet and do $ net_applet & and you have the right-click context menu and no longer this above notification.

I think the issue is that /etc/xdg/autostart are all loaded at the same time and there is a race to expose to dbus the notification system

/etc/xdg/autostart/xembedsniproxy.desktop is loaded at the same time that

/etc/xdg/autostart/net_applet.desktop

Keywords: Triaged => (none)
Source RPM: drakx-net-2.51-1.mga8.src.rpm => drakx-net-2.54-1.mga8.src.rpm

Comment 14 Aurelien Oudelet 2021-01-20 14:02:24 CET
I added :
Glib::Timeout->add(100, sub { $icon->set_context_menu($menu); 0 }) if $is_sni;

to

Glib::Timeout->add(5000, sub { $icon->set_context_menu($menu); 0 }) if $is_sni;

and rebooted. No change.

Note:
If Plasma has systemsettings5 => Startup and Shutdown => Desktop Session set to "Restore previous session"
AND you have done killall net_applet && net-applet &, you do have the right-click menu upon logon.

If it is set to "Restore previous session" WITHOUT killall blabla => NO right-click menu.

If it is set to "Start with an empty session" => NO right-click menun even if you did killall blabla last session.
Comment 15 Thomas Andrews 2021-01-20 17:22:50 CET
Yes, my affected system is set to "Start with an empty session." But so are my other systems, and none of them are showing this. Speculation follows:

The affected system has / and /home residing on an ssd, while an unaffected system on the same hardware resides on a rust drive. 

The affected system, with a i5 2500, is my fastest hardware.

All of the other unaffected hardware is connecting via wifi, so they show a different icon in the panel. Some have / and /home residing on an ssd, others only have rust drives.

I'm wondering if the above differences, which would result in differences in timing, might explain why there might sometimes be a race condition and sometimes not.
Comment 16 Aurelien Oudelet 2021-01-28 18:11:52 CET
My 2 cents on this bug:

It is a race condition: KDE startups immediately setting ENV variables as
KDE_FULL_SESSION and XDG_CURRENT_DESKTOP=KDE and launching immediately all
/etc/xdg/autostart/*.desktop files.

BUT SNI (KDE system notifications) is not immediately available.
You can even see it by complains about own Plasma/KDE umbrella Applications in system log:

DiscoverNotifier[2262]: kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP

korgac[2285]: kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP

So, there is a bug against kf.notifications.

net_applet wants a SNI available and DBus Connections on it.

You can even see this complain about plasmashell:
plasmashell[2243]: DBusMenu disabled for this application

It is the only DBus application on this system.
Later, when you try a right-click you got:
plasmashell[2243]: Could not find DBusMenu interface, falling back to calling ContextMenu()

Looking at upstream bugs reports about systray: Theses two should be looked:
1) https://bugs.kde.org/show_bug.cgi?id=383202
2) https://bugs.kde.org/show_bug.cgi?id=425315

But, the listIcons.sh script proposed at 2) above correctly lists net_applet as registered KSNI client. So it is not 2) a good candidate.

1) System tray icon's context menu isn't updated properly in plasma/x11
Bugreport upstream has a potential fix for Plasma there.
Ping Nicolas L.

CC: (none) => mageia

Comment 17 Nicolas Lécureuil 2021-01-28 18:28:03 CET
patch added in cauldron.
Comment 18 Aurelien Oudelet 2021-05-21 02:48:40 CEST
(In reply to Aurelien Oudelet from comment #16)
> 
> Looking at upstream bugs reports about systray: Theses two should be looked:
> 1) https://bugs.kde.org/show_bug.cgi?id=383202
> 2) https://bugs.kde.org/show_bug.cgi?id=425315
> 
> But, the listIcons.sh script proposed at 2) above correctly lists net_applet
> as registered KSNI client. So it is not 2) a good candidate.
> 
> 1) System tray icon's context menu isn't updated properly in plasma/x11
> Bugreport upstream has a potential fix for Plasma there.
> Ping Nicolas L.

Note that https://bugs.kde.org/show_bug.cgi?id=383202 is fixed upstream for Plasma 5.22 release.

But, I do think this issue is still valid, something prevents net_applet to export his menu through a dbus connection.

plasmashell[2243]: DBusMenu disabled for this application

It is the only DBus application on this system.
Later, when you try a right-click you got:
plasmashell[2243]: Could not find DBusMenu interface, falling back to calling ContextMenu()

Whiteboard: MGA7TOO => MGA8TOO
Target Milestone: Mageia 8 => Mageia 9
Hardware: x86_64 => All


Note You need to log in before you can comment on or make changes to this bug.