Search This Blog

Tuesday, May 31, 2011

Plasma NM: bugs fixed after 4.6.3

Well, the number of crashes is decreasing, that is a good signal :-)

Following my last post about bugs fixed in Plasma NM, here is the list of bugs fixed between 4.6.3 release date (May 6th) and 4.6.4 release date (June 10th):

. Fix NM version number check.
. Always shows the "Create connection" button in the interface added notification for modem interfaces. Until now it was only shown when there was no modem connection.
275163: Fix changing adapter display type disables networking system
275159: Disables "Show More" button instead of hidding it if there is no wireless interface available.
275160: Defaults to wired tab in ManageConnectionWidgets if wireless is disabled.
274702 275161:  Try to prevent opening kwallet when there is no secret to retrieve.
274797: Set right widget's width to fixed size to prevent unneeded graphical layout resizes.
146159 182984: Import VPN connections from configuration files. Only VPNC is implemented so far, but the hooks for other VPN types are in place now.
. Fix initial default route icon's state when starting kded module and a connection is already active.
274860: Change networkmanagement_shell into a singleton to prevent calling the edit connection dialog multiple times.
274859: Disable "Low signal strength" notification by default and increase the interval between "Low signal strenght" notifications to 5 minutes.
274846:  Backport fix for disconnecting auto-connect connections when compiled against Solid < 4.7.0.
. Fix some issues when entering wireless channel manually instead of using the spinbox buttons.
. Add text in main window to warn when using Plasma NM with wrong NM version.
274161: Prevents crash when configuring 3G modem.
273894: Prevent crashes when closing kcmshell too fast after closing the connection editor.
. Fix two crashes when editing IPv4 config.
273955: Prevents dangling pointer crash.
266268: Try to adjust plasmoid size automatically.
273265: Fix crash on editing connections in KCM module.
. Update main CMakeLists.txt file to indicate that now we need at least NetworkManager-0.8.1. That is because of the IPv6 implementation, which first appeared in 0.8.1.
. Fix UUID check for DUN and NAP services in networkmanagement_configshell which prevented adding new Bluetooth connections.
272942: Change the automatic launching of Mobile Connection Wizard into a notification.
157384: Allow automatically set connection's BSSID to the BSSID of the AP selected in scanwidget.
272841: Fix crash when clicking on the VPN interface.
254155: Prevent graphical artifact during tab transition in m_interfaceDetailsWidget.
228298: Show correct WEP key type (Passphrase/Hex) when editing/showing connection secrets.
272774: Wrap interface label in InterfaceItem class, now only the first line is displayed.
. Several memory leak fixes.

Sunday, May 15, 2011

Plasma NM: NM-0.9 (WORKING)

Hi all, as I said in another post I have spent last Saturday (May 14th) and Sunday (May 15th) trying to improve NetworkManager-0.9 support in Plasma NM. The situation before May 14th was a follow: networkmanagement/master compiles/works with NM-0.8.1 and above. Branch networkmanagement/nm09 compiles against NM-0.8.x but needs several hacks to work with NM-0.9. Plasma NM uses Solid's NetworkManager and ModemManager backends from kde-workspace repository. Since 4.6.0 the NetworkManager backend uses the ModemManager backend for Bluetooth/Gsm network interfaces.

I have heard of two other attempts to bring/improve NM-0.9 support to Plasma NM. The first one is from Fedora guys and even them admit that it is not ideal. The other is from Will Stephenson, the Plasma NM maintainer and who most people here already know, including me, hi Will :-). Well, I do not know how much time Will's libnm-qt is going to take to be ready to be used in Plasma NM so I am doing what I proposed last month:

  1. Create the new Solid's NM-0.9 backend outside kde-workspace repository so that we could change it freely without KDE's freature freeze/ABI restrictions. (DONE)
  2. Make it compile against NM-0.8.999. (DONE)
  3. Remove #ifdef COMPILE_MODEM_MANAGER_SUPPORT and #ifdef NM_0_8 from the source code. (DONE)
  4. Make everything compile/work when the old NM-0.7 backend from KDE SC 4.{6,7} is installed. (DONE)
  5. Create code to import existing NM-0.8 connections to NM-0.9. (DONE)
  6. Make it really work with NM0-0.8.999. (DONE)
  7. Convert code to use libnm-qt instead of Solid::Control::*Nm09. (DONE)
  8. Improve support for Pppoe (Pots in NM-0.9 terminology), Cdma and IPv6. (TO BE DONE)
  9. Implement the new interface types: LTE, Wimax and OlpcMesh. (TO BE DONE)
Item #3 means Plasma NM requires at least KDE SC 4.6.0 to compile now. Item #4 means I can connect to my VPNC, ethernet, WPA wifi and 3G/Gsm connections, probably bluetooth is also working since it is very similar to 3G/Gsm, but I have not tested it. Item #6 depends on NetworkManager guys since Pppoe support is still in progress there. Item #7 may take a long time since I do not have any of those equipaments to do tests, the same is true for Cdma and IPv6.

Update: VPN works now after Ilia Kats implemented the secrets agent from NM-0.9 specification, Lukáš Tinkl changed the DBus types used to (de)marshall objects in QtDBus, and I created the SecretsObject needed to get the secrets from kwallet/kconfig and fixed another bug that prevented the secret types ("always ask", "saved", "not required") to work properly.

Secrets (passwords, Gsm PIN, wifi/vpn encryption keys) can now be saved in KDE session using kwallet (encrypted) or in (plain text) Plasma NM's configuration file. When creating or editing a connection check the checkbox "System connection" to make them be saved in (plain text) NM configuration files. The default is to save them in KDE session, which means a connection with secrets requires Plasma NM running to work. Connections without secrets work without Plasma NM running reggardless if the "System connection" checkbox is checked or not. Maybe we can improve the user interface to make that clearer.

The new backend is going to support only NM-0.9 and it keeps the old Solid::Control namespace. I have just duplicated the classes used in NM-0.7 backend with a Nm09 suffix to distinguish them, so Solid::Control namespace is more inflated now, sorry hehe. The new headers for Solid::Control::*Nm09 classes are installed in $KDEDIR/include/solid/controlnm09 to do not clash with the old ones in KDE SC. When Will finishes his libnm-qt we are going to remove the Solid::Control namespace (at last), which probably is going to happen before KDE SC 4.7.0 release.

I commited the code to nm09 branch in May 16th. If you are a programmer and want to help fix the remaining bugs please test it. If you are a user that wants a rock solid network connection just wait until we fix the most obvious bugs, this code is not for you yet. Expect crashes, instability and missing features when using this code. Update: thanks to whoever fixed the connection editing problem :-)