Search This Blog

Sunday, April 8, 2012

Plasma NM 0.9.0.1

Well, I still have not fixed the infamous "networkmanagement's kded module crashes when opening kwallet" bug I mentioned in the last release. The main reason for this release is to fix the translations that were being taken from master branch instead of nm09 branch.

Plasma NM 0.9.0.1
SHA256Sum: ed5aaff8ed7d52f2541eca27f5bf15792cd97f8e7f8014c0fe9ab8e73f2cab2f

Kubuntu packages:
https://launchpad.net/ubuntu/precise/+package/plasma-widget-networkmanagement

OpenSuse Packages:
http://download.opensuse.org/repositories/KDE:/Unstable:/SC/openSUSE_12.1/i586/

Changelog:

. fix translations.
297309: Return Gsm and Cdma providers lists case-insensitively sorted in Mobile Connection Wizard.
296740: Do not send the interfaceRemoved signal if NM stopped or crashed. If it has crashed we can crash too if we send the interfaceRemoved signal here.
. Check if libnm-util and libnm-glib are installed before compiling.
. Also import/export routes when importing/exporting VPN connections.
292477: Add to kcm module, in "Other" tab, option to select if Plasma NM should ask for GSM Pin on modem detection or when activating a gsm connection. The last one is what most users want but some modems do not work with this mode.

The following languages have more than 80% of strings translated:

ca cs da de el es et hu it km lt nb nds nl pl pt pt_BR sk sv uk zh_TW

OBS: the number of translated languages is lower now because the translations now come from nm09 branch instead of master branch.

Monday, March 26, 2012

LAkademy 2012

In 2010 I participated in the first Akademy-br organized by Sandro Andrade with support from KDE e.V. It was a great time for me to meet new faces of the KDE community in Brasil. It as also during Akademy-br 2010 that I started to work on Knetworkmanager and later in Plasma NM. Last year we did not succeed in realizing the second Akademy-br :-(. This year we not only received again support from KDE e.V. but we are expanding: instead of a Brazilian event we are organizing a Latin America event with participation of KDE developers from Argentina, Colombia, Peru and, of course, Brasil :-D

I would like to thank KDE e.V. for supporting LAkademy 2012. The event is going to take place in Porto Alegre city (south of Brasil) from April 27th to May 1st. The event is going to be more like a sprint than a Akademy since our focus is in contributing code to KDE and spread the KDE community in this part of the world.

Sunday, March 4, 2012

Desktop Freezes in 4.8.x

Hi all,

As I wrote in Plasma NM 0.9.0 release post the main reason for 0.9.0 release was bug #287002 "panel freezes". You problaby have noticed the freezing problem after upgrading to 4.8.0, me too.

The source of the problem is the fact that kded is sometimes frozen by one or more of its modules. Plasma NM < 0.9.0 used to do several synchronous calls to networkmanagement module in kded, specially to get the signal strengh of wifi access points and 3G connections. You can imagine how often wifi access points (all access points in range, even the ones you are not connected to) can trigger signal strengh... signals :-/ Yes, every often.

Any delay in kded causes freezes in Plasma NM's plasmoid and since any plasmoid can also freeze the entire plasma-desktop process the problem is propagated to the entire desktop. I have heard a lot of complaints about kded and Plasma being susceptible to freezes caused by one of their modules (plasmoids in Plasma case), you do not need to repeat them in the comments section of this post. Any Plasma developer is aware of the problem by now, I just do not know if anybody is working on fixing it, so do not ask me.

Several weeks ago I pushed a commit to make Plasma NM use asynchronous API to retrieve data from networkmanagement module. There is also a commit to kde-workspace to do the same for the Solid ModemManager backend, the same change went to QtModemManager as well. This last commit will be in kde-workspace 4.8.1. Those changes seem to easy the problem but, of course, it does not solve it since other plasmoids trying to contact kded will also cause freezes in the desktop.

In bug #287002 it is stated that apper is one of programs that freezes kded. Just as a notice I have never used apper. Until now everybody that has disabled apper's kded module reported that it fixes the freezing problem. You can try it yourself, just go to systemsettings -> Startup and Shutdown -> Service Manager, locate the "apper" service, stop it and uncheck the checkbox in "Use" column for that service. Then click on the "Ok" button.

It is curious that only with 4.8.0 those problems become visible. Plasma NM uses synchronous calls to contact kded since the begining, in 4.4.x time. That is even before I started to use Plasma NM. I guess several other programs do use synchronous DBus API. You can check that by looking for the QDBusReply object declaration and waitForfinished() calls in your source code. If you are using them you should really think about how to avoid them, specially if your program is a plasmoid and/or contact a kded module.

Monday, February 27, 2012

Plasma NM 0.9.0


Well, I would like to have fixed bug "networkmanagement's kded module crashes when opening kwallet" before this release but I have not been able to reproduce it, so I have not figure out how to fix it. I am doing this release basically to push the changes to make Plasma NM resilient to problems when contacting kded, which is the cause of "desktop freezes" bug.

Since I do not have more release candidate numbers left after rc4 I had to use 0.9.0, so here it goes:

Plasma NM 0.9.0
MD5Sum: e39fbc01166c8019104a03c03af890e4
SHA1Sum: ed5aaff8ed7d52f2541eca27f5bf15792cd97f8e7f8014c0fe9ab8e73f2cab2f

Kubuntu packages:
https://launchpad.net/ubuntu/+source/networkmanagement/0.9.0-1ubuntu1

Changelog:

294777: Fix "Last Used label resets to Never after a minute".
. Use preferences-system-network as KCM icon.
. Enable/Disable OK button when prompting user for secretes, and fix WEP key validator.
293711: Add about data for kcm modules.
293691: Use localized provider's name and plan in Mobile Connection Wizard.
293045: Mark GSM password as NotRequired if it is empty.
. Add warning messages to debug possible dangling pointer.
209464: Fix wifi hidden network support.
293068: Allow creating cdma connections when no cdma device is plugged.
. Don’t show GSM Access technology in tray icon while connecting as it obscures the connecting progress bar.
290964: Fix and workaround graphical artifacts caused by upgrading to KDE SC 4.8.0.
287002, 282022, 286424: Use asynchronous DBus API in plasmoid and kded module communication.

The following languages have more than 80% of strings translated:

ar ca ca@valencia cs da de el es et hr hu it km lt nb nds nl pa pl pt pt_BR ru sk sv uk zh_CN zh_TW

Sunday, February 26, 2012

QML'izing Plasma NM

Some weeks ago another guy from Brazil (I am also from Brazil) contact me interested in me mentoring him in GSoc. His name is Arthur de Souza Ribeiro and since Alex Fiestas had already asked me to mentor someone to implement a nicer QML plasmoid for Plasma NM I accepted the task :-) I also already wanted to try QML in Plasma NM but changing Plasma NM GUI and fixing all the other problems not related to the GUI is not being easy without help. Since Ilia Kats is also busy with his Ph.D. in biology I am a little lonely doing the Plasma NM stuff. From time to time I still receive usefull patches, so it is not completely lonely :-)

I already added my GSoc proposal to the ideas page and subscribed to  
kde-soc-mentor@kde.org, now is wait and see if the proposal will be accepted or not. Meanwhile I already passed some material for Arthur to study and pushed a commit to add a #ifdef to show a QML view instead of the current popup.

Just to make it clear: the plasmoid is the system tray icon, what you see when clicking on the system tray icon is just the plasmoid's popup. What my #ifdef does is make the plasmoid (the system tray icon) show a QML view instead of the current QGraphisWidget popup. The current QML view just shows my name :-)

Friday, February 24, 2012

New QML Shutdown Dialog in 4.9.0

After some time here is me blogging again. I have been very busy working so no time for Plasma NM and the other KDE stuff. On the other hand one of the KDE stuff is now in kde-workspace master to be released with KDE SC 4.9.0 :-D

Early this month I pushed the QML shutdown dialog implementation I did for basysKom:


The looking is almost the same as the old one, but if you program in QML you can change it. I think you can also use Qt Creator to create new themes for ksmserver.

The default theme above resides in $(kde4-config --path data --locate ksmserver/themes/default/). There are four .qml files, one .js and one .desktop there. main.qml is the most important one. Basically main.qml is the dialog and the only requirement for it is emitting the signals to actually trigger actions:

    signal logoutRequested()
    signal haltRequested()
    signal suspendRequested(int spdMethod)
    signal rebootRequested()
    signal rebootRequested2(int opt)
    signal cancelRequested()
    signal lockScreenRequested()

spdMethod is one of values of the enum Solid::PowerManagement::SleepState (StandbyState, SuspendState or HibernateState). StandbyState is rarely used nowadays but still supported.

The opt parameter in rebootRequested2 contains the index of the chosen boot option in the reboot menu (more on that later). The rebootRequested() reboots the system without changing grub's configuration. The other signals are self-explanatory.

Some important information are passed as QML properties from the C++ ksmserver to the dialog:
  • bootManager: string identifying the boot manager installed on the computer. It can be "Grub", "Grub2", "Burg", etc.
  • choose, sdtype, maysd: those are the same parameters (in the same order) used with "qdbus org.kde.ksmserver /KSMServer logout x y z" and KWorkSpace::requestShutDown(ShutdownConfirm, ShutdownType, ShutdownMode). Read /usr/include/kworkspace/kworkspace.h for the long explanation about them.
  • rebootOptions is a hash (associative array). rebootOptions["options"] is string list containing the OSs configured in grub. It is used to create the boot menu in the screenshot above. rebootRequested2 passes the index (starts from zero) of this string list as parameter. rebootOptions["default"] is the index of the current selected option in rebootOptions["options"].
  • ShutdownType and spdMethods are the Javascript versions of the enums KWorkSpace::ShutdownType (/usr/include/kworkspace/kworkspace.h) and Solid::PowerManagement::SleepState (/usr/include/solid/powermanagement.h). Added as convinience so that you do not need to use hardcoded integer values.

OBS: I think QML does not support passing other variables as default value for properties between { } like in the line:

contextMenu.append({itemIndex: spdMethods.HibernateState, itemText: i18n("Suspend to &Disk")})

spdMethods.HibernateState is equal to 4 but itemIndex is 1 when I read it. I had to use hardcoded values in shutdown button's menu to avoid this problem.

Sunday, February 5, 2012

DSL connections in Plasma NM

One of the things I would like to have working well in Plasma NM is DSL support. Unfortunatelly, I do not have easy access to any DSL provider so I cannot test the current support for DSL in Plasma NM. I do not even know if the support really works. I asked if it works in the bug entry about DSL support and only one person has answered saying it works so I assumed it does work.

Last week I was surffing the web and stumbled accross this post in a Brazilian forum (it is Brazilian Portuguese) explaining how to set up a DSL connection in Plasma NM. Basically Plasma NM really works with DSL, which is great, but there is a catch: you need to disable the auto-connect option for the wired connection that uses the same device that the DSL connection uses. Explaining: DSL works over ethernet (more common), wifi, and maybe over other devices. When the device (ethernet) is meant to be used with DSL you must disable the auto-connect feature in the wired connection associated to that device. First create a system DSL connection:


In the Ethernet tab restrict the connection to a specific ethernet device. If you have more than one ethernet device do not be afraid, the "eth0" below is just an user-friendly way to select the device, what Plasma NM really uses is the device's MAC address. If for example you have eth0 and eth1 in your system, then you restrict to eth0 but for some reason the system swaps eth0 for eth1, Plasma NM is smart enough to see that and it will automatically change the configuration to eth1.


Save the configuration by clicking on the Ok button and go to the Wired tab in Plasma NM's kcm (k control module):


Click on "Edit", the edit dialog will appear. Go to the connections's "Ethernet" tab and disable "Connect automatically" and check "System connection" to allow the system (NetworkManager) to use the connection without you need to open a KDE session first:



Save the configuration by clickling on the Ok button and try to connect. You can check if it is connected in Interface Details for the wired connection (I got this screenshot from the forum, that is why it is in Brazilian Portuguese):



Notice the "Nome do sistema" field (System name) showing "ppp0", that means the connection is really active.

For some reason nm-applet does not require changing the wired connection configuration, which sounds reasonable. But without a connection to test it will take me time to figure out how to make that work. Until then DSL users can use the configuration above.