Search This Blog

Wednesday, July 27, 2011

Plasma NM: bugs fixed after 4.6.5


Below is the list of bugs fixed between 4.6.5 release date (July 5th) and 4.7.0 release date (July 27th). If you want to read the list of bugs fixed before that read my last post bugs fixed in Plasma NM.

. Changes networkmanagement_configshell to update an existing bluetooth connection instead of adding a second one.
. Force NM to update a connection when it's name changes instead of creating a new connection file in /etc/NetworkManager/system-connections/ with the name uuid.
. Set correct uuid when updating connection.
278231: Fix problem with modem HUAWEI E220 not working without auto-connect attribute
. Fix notifications localization.
. Fix user being unable to launch configshell from plasmoid after running ManageConnectionWidget from within Plasma.
253317: Fix edit connection dialog blocks plasma.
. Fill in the file name filter in kfile dialog when importing VPN configurations so that users can know what file extensions are supported.
276406: Fix closing network manager config window before dismissing policykit prompt results in crash.


And for nm09 branch:

277889: Fixes crash when editing connections.
194099: Support for importing/exporting OpenVPN connections.
. Changes networkmanagement_configshell to update an existing bluetooth connection instead of adding a second one.
. Force NM to update a connection when it's name changes instead of creating a new connection file in /etc/NetworkManager/system-connections/ with the name uuid.
. Fix NM-0.8's connection importer which was broken since last month.
. Set correct uuid when updating connection.
. Fix show passwords checkbox in vpnc widget
278231: Fix problem with modem HUAWEI E220 not working without auto-connect attribute.
. Initialize VPN buttons only once per session in ManageConnectionWidget.
. Fix notifications localization.
. Fix user being unable to launch configshell from plasmoid after running ManageConnectionWidget from within Plasma.
253317: Fix edit connection dialog blocks plasma.
. Add support for all the options NM vpnc plugin supports.
269951277354: Port all VPN-Plugins which support this to the new secrets flags system. Add auth-dialogs for OpenVPN and PTTP. Fix some minor bugs.
271491: Calculates connection list item's height based on default font height. Minimum height is 28 pixels.
. Improves error message report when importing VPN configuration file.
219118: Add support for vpnc hybrid authentication.
. Disables hidden item until hidden essid is fully working. It seems NM-0.9 can dectect them by itself, so I think we will not need to use this in.
. Fill in the file name filter in kfile dialog when importing VPN configurations so that users can know what file extensions are supported.
. Do not "showMore" when wireless is disabled.
251214: Show error if Gsm PIN/PUK unlock fails.
246327: Add option to show network speed in KB/s or KBits/s in interface details widget.
182451: Indicate active connections in Manager Connections widget. Still does not work for VPN connections.


Recommend snapshots:

For master branch: bb6e3b82dd23f05df8d875627622195e291b5a6d
For nm09 branch: eb9a97abe1cb8dc848939514b5ead0be2a92cecc

E-sata, solid, and udisks (part 2)


In my first post about e-sata, solid and udisks I wrote about how to hack udisks to inform solid that a disk attached to a specified sata port is actually a removable disk. Udisks-1.0.3 includes a modified patch that allows to do that without applying the patch ourselves. We still need to add the udev rule to indicate which sata port is to be considered "non system internal". The udev rules is slightly diferent from the one I wrote about in my last Solid post:

File /etc/udev/rules.d/99-esata.rules
DEVPATH=="/devices/pci0000:00/0000:00:1f.2/host4/*", ENV{UDISKS_SYSTEM_INTERNAL}="0"

Change the DEVPATH to match your e-sata port. You can find it using the command:

Code
evolucao ~ # find /sys/devices/ -name sdb
/sys/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sdb


Then reload udev rules after creating/editing the file above: udevadm control --reload-rules

Now the bad news: udisks includes several attributes to a disk, among then are "system internal" and "removable". Removable means removable media (like optical discs, card readers, etc). System internal means the device is "fixed" to the computer, it cannot be removed without turning the computer off, like sata disks. E-sata is in between those two, for sure it is not system internal and technically it is not removable media according to udisks criteria too.

Currently Solid uses udisks' eject command to eject e-sata disks but since an e-sata disk is not removable media and the disk has not actually been removed (detached from the e-sata port) udisks signals that a new disk is available and kded remounts the disk right after the eject command succeeds (bug #277517).


We could use udisks' detach command instead of eject, but udisks seems to refuse to use it with devices with removable flag set to false, which is the case for e-sata disks. Anyway, sometimes we just want to unmount the partition but not turn the disk off, in that case udisks' detach command is inadequate since you will need to turn the disk off and on to use it again.

I think:  1. Solid should stop using udisks' eject command for e-sata partitions (/dev/sdb1, /dev/sdb2, etc) and use the umount command instead. 2. For the entire e-sata disk (/dev/sdb) we should use udisks' detach command, but that will only work when 3. someone fixes udisks to allow executing the detach command for all non system internal devices and not only for the removable ones.

We can do #1 right now. #2 requires some GUI to call the detach command, something that can be used in device notifier plasmoid. #3 is upstream bug :-/

When I have more time I will try to solve this, but for now I am busy and with a dead line approaching, so if someone wants to take the task to fix this problem feel free to do it.

Friday, July 15, 2011

Some clarifications about Plasma NM usage

I was reading this blog post and felt that I had to explain some things to Plasma NM users. Firstly, the easiest way to add a wifi connection is by clicking on the tray icon, then on the connection name, fill in the encryption key (if necessary) and click Ok. Three clicks, the same number as MacOS like the other blog's owner described.

When you click on the tray icon and there is no wifi connection configured the "Show More" button is automatically toggled:



Clicking on my home network:


Writing encryption key and set it to connect automatically:


And after clicking on Ok button:



Here you can see that the "Show More" button is not toggled anymore because now there is a wifi connection configured. This is done to prevent the connection list to be crowed. You can always list all APs available by clicking on the "Show More" button.

One obvious problem in the connection list is that it is not sorted in any way. I already tried to solve this problem but I will have to refactor some internal classes before I can implement it efficiently. Toggling the connection list is CPU intensive because the way it is implemented.

Quoting same statements from the other blog:

"You connect not by clicking on an available network, you do it by clicking network manager."

This is not true, you can click on the available network too. The bug that prevent it from working was fixed three months ago. What must be your problem is that your distribution, OpenSuse, includes a very old Plasma NM snapshot from November of last year in OpenSuse 11.4. There have been dozens of bugs solved since then, including that one. If you want to use a more up to date Plasma you must upgrade your OpenSuse packages or compile Plasma NM by yourself. Honestly I prefer to compile it, it is easy and even today OpenSuse and other distributions are a bit slow to catch up with all the bugfixing that is going on in Plasma NM. For instance, the packages in the link above are more than two months old now, if you take into account there have been two KDE SC releases during that period that is a bit old.

If you want to compile Plasma NM by yourself do the following:
  1. install git, make, g++, cmake, qt devel libs, kdelibs devel, kde-workspace devel, NetworkManager devel and their dependencies.
  2. Execute: git clone git://anongit.kde.org/networkmanagement.git
  3. mkdir networkmanagement/build
  4. cd networkmanagement/build
  5. cmake -DCMAKE_INSTALL_PREFIX=/usr ..
  6. make
  7. make install
  8. That is it.

If you want to use the NM-0.9 execute 'git checkout nm09' before step #5.

"Later, to finish the process, I need to hit OK a couple of times and then I get back to the desktop. But I am not connected yet. I need to go back to the Wireless icon on the system tray and now I am able to see the new connection I added through the prior steps. Once I click on it, the setup will finally end by connecting to the wireless network."

You did not checked the "Connect automatically" checkbox. NetworkManager will not connect automatically without that. I wrote NetworkManager because it is NetworkManager daemon and not Plasma NM (nor nm-applet) that triggers the auto-connection process. Only the manual connection process is triggered by NM's clients (Plasma NM, nm-applet, etc). Some people have already complained about the connection editing process, but I do not plan to change it anytime soon.

One user commented in the other blog: "I also still have problems with knetworkmanager/plasmoid, mostly because of creating new connections. for example I am still unable to create "system connections", because that checkbox is greyed out, and there is no possibility (perhaps except login as root) to activate it."

This is not a Plasma NM bug, it is your distribution that disabled "system connection" checkbox. We have nothing to do with it. Ubuntu is one distribution I know that does disable the "system connection" checkbox.

Another user mentioned the fact that kwallet asks for password to open it. Well, you can disable kwallet's password and that is it. But what would be cool is if kwallet is opened when user logs in kdm. Well, someone is working it: KDE bug about single sign-on. Unfortunately things are too calm in that bug entry. I hope the guy that has been working on that bug has not given up.

Another problem we from Plasma NM face is the fact the NetworkManager specification lacks some details that are crutial to make things work properly, specially with VPN. NetworkManager thoroughly tests all connection parameters and invalidades the connection if one check fails. The problem is that there is no documentation about the tests. The only way we can know for sure which setting is allowed in a connection is reading NetworkManager's source code, which is not easy to read. After several times having to resort to reading NM's source code I can say I am getting used to it. Two weeks ago I even sent a patch to NM mailing list to partially fix this nasty bug. Now I just need NetworkManager's maintainers to apply the patch or improve it and finally fix the problem that prevents Plasma NM nm09 to change connection secrets (encrpytion keys, passwords, etc). We follow NM-0.9's specification but it seems NM daemon does not when it calls the secret agent to save the old secrets instead of the new ones. If you are wondering why this problem does not happen with nm-applet, I also would like to know why. The fact that nm-applet and NetworkManager share the same developers makes things easier for nm-applet, of course.

Plasma NM still have several bugs to fix and features to implement. We are working on them when possible, some are more easier to fix so they are being fixed first. From time to time we implement a new feature in the nm09 branch, if it is easy to backport it we backport it to master, where NM-0.8 code is. I know, we need to move the NM-0.8 code from master to a nm08 branch, someday we are going to do it.

By the way, last Wednesday was my anniversary :-D in the International day of Rock, oh yeah!!! hehe.

Monday, July 4, 2011

Plasma NM: bugs fixed after 4.6.4


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


269951: Save username from VPN configuration instead of defaulting to system's user name.
. Correctly initialize the Wireless80211WidgetBand spinbox.
. Use correct method to enable mobile broadband modems, this one works with non-root users.
273762: Fill in Wireless80211Widget and WirelessSecuritySettingWidget with access point info when selecting one in ScanWidget.
269250: Makes kded module starts to emit notifications only after the plasmoid has been created.


And for nm09 branch:

. Send an error DBus reply to NM if secrets retrieval fails.
226028: Add OpenConnect VPN plugin.
276631: Fix crash while configuring wifi.
. Do not insert empty usernames in VPN settings, which would invalidate the connection.
269951: Change Nm08 connection importer to read the "UserName" setting. The VPN connection's configuration must be set to use this setting or NM will refuse the connection.
276189: Fix crash.
. Add Plasma NM version in kcm window.
. Use correct method to enable mobile broadband modems, this one works with non-root users.
. Update strongswan plugin for strongswan 1.2, add key direction to openvpn.
. Add missing hashing algorithms to openVPN.
. Add missing openVPN options.
. Allow band and channel selection for infrastructure networks, add automatic options for band and channel.
. Fix/update VPN NAT mode traversal.
273762: Fill in Wireless80211Widget and WirelessSecuritySettingWidget with access point info when selecting one in ScanWidget.
149030: move secrets from one storage to another if the storage type is changed and delete secrets in old storage.
269250: Makes kded module starts to emit notifications only after the plasmoid has been created.
. Let user decide if he/she wants to store GSM PIN or type it in every time. The default is not save the PIN.
. Fix reparsing configuration when secretstorage is called.
. Make VPN connections work.

Some observations about nm09 branch: