Summary: | Wired connection default settings are misleading | ||
---|---|---|---|
Product: | [Plasma] plasma-nm | Reporter: | Dmitry <dmitriyvalter> |
Component: | editor | Assignee: | Jan Grulich <jgrulich> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | dennis.schridde, fabian, heri+kde, jgrulich, nate |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
See Also: | https://bugzilla.redhat.com/show_bug.cgi?id=1765490 | ||
Latest Commit: | https://commits.kde.org/plasma-nm/8b9eb87388cc521b9f0dcc9e81e9d565674a2529 | Version Fixed In: | 5.18.0 |
Sentry Crash Report: |
Description
Dmitry
2019-10-19 21:09:32 UTC
Git commit 14f7ab5e3c686f85de57c8845bedab54ca7cb71a by Jan Grulich. Committed on 20/10/2019 at 17:39. Pushed by grulich into branch 'Plasma/5.17'. Wired connection: default to Full duplex when duplex is not set M +2 -1 libs/editor/settings/wiredconnectionwidget.cpp https://commits.kde.org/plasma-nm/14f7ab5e3c686f85de57c8845bedab54ca7cb71a Proposed fix does not fix the issue itself, just mitigates the most extreme case. Behaviour is still broken due to: 1. Configuration is still changes implicitly: * before editing: NetworkManager does not set ethernet mode * after editing: NetworkManager sets 100 Mb/s FullDuples 2. In some cases (1) leads to UX regression * it makes connection over gigabit link slower * it makes connection over 100 HD link no longer working 3. In some rare cases it leads to faulty condition * in case of (https://bugzilla.kernel.org/show_bug.cgi?id=205067) it's impossible to configure/preserve via GUI a persistently working gigabit connection. The only fix I hae ideas about is implementing this as a separate mode of a connection like it works in XFCE, where not only "Manual" and "Auto" modes are present, but also "Ignored", which essentially is the described above mode. Implementing this fix may require adding come code into networkmanager-qt as plasma-nm uses it to interact with NetworkManager. (In reply to Dmitry from comment #2) > Proposed fix does not fix the issue itself, just mitigates the most extreme > case. > Behaviour is still broken due to: > > 1. Configuration is still changes implicitly: > * before editing: NetworkManager does not set ethernet mode > * after editing: NetworkManager sets 100 Mb/s FullDuples > 2. In some cases (1) leads to UX regression > * it makes connection over gigabit link slower > * it makes connection over 100 HD link no longer working > 3. In some rare cases it leads to faulty condition > * in case of (https://bugzilla.kernel.org/show_bug.cgi?id=205067) it's > impossible to configure/preserve via GUI a persistently working gigabit > connection. > > The only fix I hae ideas about is implementing this as a separate mode of a > connection like it works in XFCE, where not only "Manual" and "Auto" modes > are present, but also "Ignored", which essentially is the described above > mode. > > Implementing this fix may require adding come code into networkmanager-qt as > plasma-nm uses it to interact with NetworkManager. I just checked nm-connection-editor and they indeed have additional option, which is "Ignore", but in the code it doesn't make any difference. If the link negotiation is set to "Ignore" or "Automatic", it sets speed to 0 and duplex to unknown type, which is the same what we do in plasma-nm. (In reply to Jan Grulich from comment #3) > I just checked nm-connection-editor and they indeed have additional option, > which is "Ignore", but in the code it doesn't make any difference. If the > link negotiation is set to "Ignore" or "Automatic", it sets speed to 0 and > duplex to unknown type, which is the same what we do in plasma-nm. So, my bad, I've made wrong assumptions from networkmanager-qt code. However, the case is when no value is explicitly set in the connection beforehands, plasma-nm will apply UI defaults for speed/dulpex when user saves any other parameter e.g. DNS servers. Described above case is present on the video: https://youtu.be/8UOu76c-fNk Test was performed on a clear Plasma, Arch Linux (latest stable to 2019.10.22 morning) I opened a review request: https://phabricator.kde.org/D24866 I am coming here after, with Beniamino Galvani <bgalvani@redhat.com>'s help in https://bugzilla.redhat.com/show_bug.cgi?id=1765490#c13, it became clear that KDE Plasma NetworkManager interprets the data from NetworkManager wrongly: $ nmcli connection show $conn_uuid 802-3-ethernet.speed: 0 802-3-ethernet.duplex: -- 802-3-ethernet.auto-negotiate: no shows up as Auto Negotiate: No, Speed: 100Mbps, Duplex: Half in the KDE Plasma NetworkManager connection configuration dialogue. According to him, it *should* mean: Auto Negotiate: No, Speed: Link Default, Duplex: Link Default. (In reply to Dennis Schridde from comment #6) > I am coming here after, with Beniamino Galvani <bgalvani@redhat.com>'s help > in https://bugzilla.redhat.com/show_bug.cgi?id=1765490#c13, it became clear > that KDE Plasma NetworkManager interprets the data from NetworkManager > wrongly: > > $ nmcli connection show $conn_uuid > 802-3-ethernet.speed: 0 > 802-3-ethernet.duplex: -- > 802-3-ethernet.auto-negotiate: no > > shows up as Auto Negotiate: No, Speed: 100Mbps, Duplex: Half in the KDE > Plasma NetworkManager connection configuration dialogue. > > According to him, it *should* mean: Auto Negotiate: No, Speed: Link Default, > Duplex: Link Default. There's another layer of weirdness above that, as nmcli edit describe says: > When TRUE, enforce auto-negotiation of speed and duplex mode. > If "speed" and "duplex" properties are both specified, only that single mode > will be advertised and accepted during the link auto-negotiation process: > this works only for BASE-T 802.3 specifications and is useful for enforcing > gigabits modes, as in these cases link negotiation is mandatory. When FALSE, > "speed" and "duplex" properties should be both set or link configuration will > be skipped. I did some tests and if either .speed or .duplex are not set, "auto-negotiate: no" has no effect. Currently the KCM shows that as "100MiB/s Full-Duplex" and saving that has weird effects. This should all be solved with the review I opened while ago, feel free to review it: Review: https://phabricator.kde.org/D24866 Git commit 8b9eb87388cc521b9f0dcc9e81e9d565674a2529 by Jan Grulich. Committed on 05/12/2019 at 14:42. Pushed by grulich into branch 'master'. Wired setting: improve handling of link negotiation Summary: Adds option to ignore link-negotiation, also uses a combobox, similar to what nm-connection-editor is using, to give a choice only with sane values for speed. Test Plan: I tried to configure all possible combinations, all of them were saved correctly and loaded afterwards. Screenshot of updated wired setting: {F7648938} Reviewers: #plasma, #vdg, davidedmundson Reviewed By: #plasma, #vdg, davidedmundson Subscribers: davidedmundson, devurandom, ngraham, dvalter, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D24866 M +83 -121 libs/editor/settings/ui/wiredconnectionwidget.ui M +47 -27 libs/editor/settings/wiredconnectionwidget.cpp M +11 -0 libs/editor/settings/wiredconnectionwidget.h https://commits.kde.org/plasma-nm/8b9eb87388cc521b9f0dcc9e81e9d565674a2529 |