Bug 386342 - Hidden wi-fi network is duplicated in kcm
Summary: Hidden wi-fi network is duplicated in kcm
Status: RESOLVED FIXED
Alias: None
Product: plasma-nm
Classification: Plasma
Component: kcm (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-30 03:18 UTC by Patrick Silva
Modified: 2017-11-13 07:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
d-bus monitor (33.86 KB, text/plain)
2017-10-30 16:20 UTC, Patrick Silva
Details
plasma-nm debug (1.70 KB, text/plain)
2017-10-30 16:23 UTC, Patrick Silva
Details
d-bus monitor (90.49 KB, text/plain)
2017-10-31 17:33 UTC, Patrick Silva
Details
plasma-nm debug (794 bytes, text/plain)
2017-10-31 17:34 UTC, Patrick Silva
Details
Proposed patch to workaround this problem (2.78 KB, patch)
2017-11-02 10:29 UTC, Jan Grulich
Details
Proposed patch to fix this issue (2.79 KB, patch)
2017-11-02 10:33 UTC, Jan Grulich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2017-10-30 03:18:27 UTC
I use opensuse krypton, plasma-nm 5.11.90git.20171029T033943~7553bbf9-15.1

open "connections" in system settings
create a new wi-fi network, check "hidden network" in "wi-fi" tab, enter a connection name and your network SSiD, set your password, click "save" button
click on wi-fi icon in system tray and active your just created wi-fi connection
when the connection is stabilished, a second wi-fi connection appears in kcm:
first connection name is the name that you entered in "connection name" field
second connection name is your hidden wi-fi network SSiD
Comment 1 Jan Grulich 2017-10-30 07:10:02 UTC
Can you please provide information described here:
https://techbase.kde.org/Projects/Solid/Plasma-nm#My_connection_in_the_applet_shows_wrong_information
Comment 2 Patrick Silva 2017-10-30 14:45:34 UTC
Weird, but I can't reproduce while d-bus monior is running.

When d-bus monitor is NOT running,
I noticed the problem changes according kwallet status...
kwallet enabled: connection is duplicated in kcm
kwallet disabled: connection is duplicated in wi-fi tray icon
Comment 3 Patrick Silva 2017-10-30 16:20:45 UTC
Created attachment 108644 [details]
d-bus monitor

ok, tested on neon user edition, plasma 5.11.2.
On neon the problem is always the same, no matter if kwallet is enabled or not:
wi-fi connection is duplicated in system tray icon.
Comment 4 Patrick Silva 2017-10-30 16:23:31 UTC
Created attachment 108645 [details]
plasma-nm debug
Comment 5 Jan Grulich 2017-10-31 07:53:47 UTC
I need complete dbus-monitor output, you seem to have your terminal limited to certain amount of lines. Also please try to reproduce the issue when dbus-monitor is running and briefly describe what connection name you used and what is the name of the hidden AP.
Comment 6 Patrick Silva 2017-10-31 11:38:59 UTC
Sorry, what is "AP"?
Comment 7 Jan Grulich 2017-10-31 11:42:05 UTC
AP = Access point
Comment 8 Patrick Silva 2017-10-31 17:33:41 UTC
Created attachment 108655 [details]
d-bus monitor

New steps to reproduce

open "connections" in system settings
create a new wi-fi network,
enter a connection name,
in "wi-fi" tab check "hidden network" and enter your network SSiD,
click "wi-fi security" tab, select "ask for this password every time",
click "save" button
click on wi-fi icon in system tray and active your just created wi-fi connection
when the connection is stabilished, a second wi-fi connection appears in menu of the wi-fi icon from system tray:
first connection name is the name that you entered in "connection name" field
second connection name is your hidden wi-fi network SSiD

tested on neon user edition, plasma 5.11.2
hidden AP name: 56Kbps
connection name: provider7
Comment 9 Patrick Silva 2017-10-31 17:34:12 UTC
Created attachment 108656 [details]
plasma-nm debug
Comment 10 Jan Grulich 2017-11-01 10:41:42 UTC
I think I know what's going on and not sure if this is actually a bug in NetworkManager. You seem to have the AP named 56Kbps to appear three times. For the first time it appears and when it's reported by NM it's without SSID and that causes the device to advertise there is an available connection (provider7). Given we don't know the SSID we cannot remove additional AP from the list you see in the applet, but it wouldn't be shown in the applet anyway because it is missing SSID which would be used as name, but it is present in the model, just not shown. Then we get another signal from NM that there is a new AP, this time we know its SSID and we would try to merge it with a connection which is relevant to this AP, but the connection is already associated with previous AP, even if it's the same one and if we don't merge it with a connection, the new AP will be added to the model and shown in the applet.

I'll try to come up with some workaround for this.
Comment 11 Jan Grulich 2017-11-02 10:29:47 UTC
Created attachment 108676 [details]
Proposed patch to workaround this problem

Can you please test the attached patch?
Comment 12 Jan Grulich 2017-11-02 10:33:50 UTC
Created attachment 108677 [details]
Proposed patch to fix this issue

Minor correction in the patch.
Comment 13 Patrick Silva 2017-11-02 11:05:05 UTC
(In reply to Jan Grulich from comment #11)

> Can you please test the attached patch?

I don't know hpw to apply patches. Sorry.
Comment 14 Jan Grulich 2017-11-03 08:34:28 UTC
I pushed it to a branch called "hidden-networks". Would you be able to at least compile plasma-nm from git? Or if you don't know how I can give you instructions.
Comment 15 Patrick Silva 2017-11-03 11:12:29 UTC
Give me instructions please.
Comment 16 Jan Grulich 2017-11-03 11:35:45 UTC
Instructions are actually written in README. You just need to clone it and check README.

1) git clone https://anongit.kde.org/plasma-nm.git
2) cd plasma-nm && git checkout hidden-networks

And then follow instructions from README. You will also have to install all dependencies, but many distributions have their package utility with support to install dependencies, e.g. with dnf in Fedora you can use "dnf builddep plasma-nm".
Comment 17 Patrick Silva 2017-11-03 12:28:53 UTC
Compile process fails on neon dev unstable, output...

CMake Error at CMakeLists.txt:12 (find_package):
  Could not find a package configuration file provided by "ECM" (requested
  version 1.3.0) with any of the following names:

    ECMConfig.cmake
    ecm-config.cmake

  Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"
  to a directory containing one of the above files.  If "ECM" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/stalker/plasma-nm/build/CMakeFiles/CMakeOutput.log".
See also "/home/stalker/plasma-nm/build/CMakeFiles/CMakeError.log".


cmakeerror.log says "Compiler: CMAKE_CXX_COMPILER-NOTFOUND"
Comment 18 Jan Grulich 2017-11-03 12:57:18 UTC
You need to install extra-cmake-modules, gcc and other dependencies needed for that. As I said, I believe that Neon (apt) provides a way how to install dependencies you need for building certain package.
Comment 19 Patrick Silva 2017-11-03 13:31:56 UTC
hummm, "apt build-dep plasma-nm" fails to install build dependecies.
Comment 20 Patrick Silva 2017-11-04 00:23:20 UTC
ok, after enable sources repositories I installed build dependencies successfully.
I confirm that your patch fixes this issue.
Comment 21 Jan Grulich 2017-11-13 07:36:15 UTC
Ok, I'll push the fix to master and will see if it doesn't break something.
Comment 22 Jan Grulich 2017-11-13 07:43:26 UTC
Git commit 911d84dc3024b6dc2991429ba1b2ce43106b071f by Jan Grulich.
Committed on 13/11/2017 at 07:43.
Pushed by grulich into branch 'master'.

Do not duplicate hidden wireless networks

M  +25   -0    libs/models/networkmodel.cpp

https://commits.kde.org/plasma-nm/911d84dc3024b6dc2991429ba1b2ce43106b071f