Search This Blog

Monday, May 7, 2012

Plasma NM 0.9.0.2


Finally a (tentative) fix for the infamous "networkmanagement's kded module crashes when opening kwallet".

Plasma NM 0.9.0.2
SHA256Sum: 9b73b5bef72d010742f2e07ccb46a9c998e575e63fc77900128a9d1c316306f7

Kubuntu package:

https://launchpad.net/ubuntu/+source/networkmanagement/0.9.0.2-1ubuntu1

Changelog:

299205: Fix hidden wireless network creation.
298895: Do not send empty service field to NetworkManager or it will not create DSL/PPPOE connections.
283105: Remove stale secret requests to prevent crashes.
295545: Fix sorting by "last used" column and make sortings case insensitive in the kcm.

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

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

Also read some usefull information about Plasma NM in my past posts.

Saturday, May 5, 2012

LaKademy / FLISOL

During LaKademy last week the attendees of the event also went to FLISOL/POA to talk about what is happening in KDE. The talk was short, just 20 minutes, but it gaves us some insight of what some our users think about KDE software. We heard the usual complaints about the 4 series using more memory and being more unstable then the 3.5 series. Well, I have not asked which version the attendees use (no time for that), but I guess the 4.8 series is very stable for me (specially now that Alex Fiestas fixed this crash that was bugging me). Regarding the memory usage I think that depends on several factors, for example, I have two notebooks, one with a AMD Turion64 processor and the other with Intel Core i7. Both running Gentoo with packages compiled for each processor and for some reason the Intel one has a higher memory usage (in the order of 200 MB difference, most of that different in plasma-desktop process). I still have not had the chance to deeply investigate why that difference. Maybe some optimizations used to compile the software have something to do with that or it is just the memory type (the Turion64 uses DDR1 and the Intel DDR3).

Turning back to LaKademy, the most important thing I did there was helping my GSoC student on the details of how to integrate the C++ and QML parts of the new QML plasmoid for Plasma NM. I think he did good progress during the event. Read his blog for some details about that. We also did a promo section to discuss action to spread the KDE community, make KDE more visible to non-tech computer users and improve the Brazilian KDE website and/or create a Latin-america website.

Well, since I was not on vacation I also worked on Plasma Active stuff for basysKom. I worked on fixing one issue between Plasma Media Center and the metadata model in plasma-mobile repo, fixing some issues in the "Add Items" button on PA's home screen, making the new activity and Password dialogs comply to PA's HIG, improving the new busy indicator in all search fields used in PA, answered some questions about PA usage on PA's forum and bugs.kde.org, and pushed a patch to kdelibs KDE/4.8 branch to add cmake support to kdeclarative configuration. After LaKademy I pushed the changes to kde-workspace master to use the new kdeclarative cmake configuration, so git pull kdelibs if you find any compilation error related to kdeclarative library :-P Next repos to convert are kde-runtime and plasma-mobile, stay tuned. I also helped some of the attendees with questions regarding QML development, KDE configuration settings and Plasma Active itself.

Saturday, April 28, 2012

First day of LaKademy

Hello all, I am writing from Porto Alegre city (AKA POA). There is no directly fly to POA, so I yesterday want to São Paulo city (AKA Sampa) to take the next flight to my final destination. Because of the bad weather here in POA I had to wait three hours in Sampa to take the flight. I must say I am really disappointed by the mobile broadband connection of my cell phone provider (TIM) in Guarulhos airport. I couldn't connect once in 3G mode. I was able to connect in Edge anytime but it was terrible (15s ping 20-40% packet loss until it just did not pass any packet at all and I had to reset the connection). I just gave up trying to access the Internet after some time.

I have got to the hostel today at 01:15 am. Nice place, the building was reformed some weeks ago, so it looks like new. My first activities after here was get to know the new faces and meet my friends. Ah, there is
my GSoC pupil too :-) We talked about his GSoC, discussed the details of the next implementations he should do. He will talk more about that in his own blog post.

Fortunately, Porto Alegre is not that cold (yet), during the day it is just chilly. One the things I like in this city is that the food is usually cheap compared to other capital cities in Brazil :-) Unfortunately the beer is more expensive :-/ Overall, it has been a pleasure to meet the other KDE guys from Latin America. I will stop from here because we got go to FLISOL/Porto Alegre, bye.

Monday, April 23, 2012

GSoC here we go

No, I am not a student (not anymore), I am a mentor in this year GSoC :-). My first time as a mentor in GSoC. My idea to implement a QML plasmoid for Plasma NM generated two proposals in GSoC and one of them has just been accepted. Congratulations Arthur, now get the work started that I want to see everything ready by the LaKademy first day (next Friday) :-D

Other Brazilians were also accepted in GSoC this year, one of them (besides Arthur) is going to join us in LaKademy too. The others could not make it to LaKademy but we hope they will make KDE proud. Congratulations to all students accepted.

Saturday, April 21, 2012

Plasma Media Center running in Plasma Active

Yesterday I got some time to work on improving Plasma Media Center performance in the Plasma Active images provided by basysKom. Even when using opengl for rendering the performance in my VirtualBox installation and in real devices were not that good while using "gst-launch playbin uri=file:///" was visibly better.

After some research I have found this QVideoWidget class from QtMultimediaKit, which improved performance when it is used as QDeclarativeView's viewport.

For those who want to test PMC in Plasma Active (Meego or Mer) can downloaded it from my home project. If you use PA2 you need to first upgrade to a testing or devel package set since the packages were compiled against Qt 4.8.0 and PA2 uses Qt 4.7.4. To upgrade PA2 you need to do:
  • zypper refresh
  • zypper up
  • wait until zypper downloads a lot of MB of new packages and upgrade your system to a testing package set. If you have a slow connection I think you have better skip this process completely:-)
  • edit ~/.kde/share/config/kwin and change LayoutName=thumbnails to LayoutName=window_strip.
  • download PMC from my home project and install it: rpm -Uvh plasma-mediacenter-0.8.80+git20120421-1.i586.rpm
  • reboot the device

I created a video of PMC running in VirtualBox, but when I encoded it from theora to mp4 (using mencoder ) to uploaded it to youtube the audio and video were too desynchronized. I tried to fix the sync problem with no success, so no video this time.

Thursday, April 19, 2012

Plasma NM on Plasma Active Mer image

Those who follow Plasma Active development probably already know that we are working on shipping Plasma NM in PA Mer installation images. It is still not shipped now but who wants to test Plasma NM on our Mer x86 images can do the following:
  • zypper install plasmoid-networkmanagement
  • run: systemctl disable connman.service ofono.service; systemctl enable NetworkManager.service
  • edit ~mer/.kde/share/config/plasma-device-appletsrc and change org.kde.active.connman to org.kde.networkmanagement
  • edit /usr/bin/startactive and pre-pend the last command with "ck-launch-session". It should look like this: "ck-launch-session startactive.bin". This step is not necessary in images newer than April 18th.
  • reboot the device

This is how it looks like in my VirtualBox installation (no wireless for now, I am waiting for the USB wifi card I bought to arrive to start testing wifi in VirtualBox):




OBS1: NetworkManager does not compile against our Meego environment, so it cannot be installed in PA2.
OBS2: Plasma NM works on Arm but to edit/create/delete connections you need a special polkit package that is not available in the repository yet. So for now use these instructions only on x86.
OBS3: I know, it is not that touchscreen-friendly. I hope that changes after the GSoC project to create a QML version of Plasma NM is accepted and finished.

I will add those instructions to Plasma Active's wiki page as well.

Saturday, April 14, 2012

Bug #283105

Bug #283105 is the famous "networkmanagement's kded module crashes when opening kwallet". Today I finally reproduced it but there is no solution yet. I will need to refactor Plasma NM's secret agent to avoid the crash and other potential problems I have also found. I do not know yet when the problem will be fixed, the secret agent is a delicate part of Plasma NM, so any precaution is worth when changing something in there.

Explaining the problem further: NetworkManager uses the concept of secrets, which are the passwords and encryption keys used to establish one connection, of course, there can be connections without secrets. When NetworkManager does not have the required secrets cached it contacts any secret agent registered to it to provide those secrets. NetworkManager sorts the secret agents before trying to contact them, it tries first  the agents in the current console kit session, so now you know why console kit is a requirement for NetworkManager to work :-). As you probably figured out by now both Plasma NM and nm-applet implement secret agents.

The crash happens because of two things: 1. Plasma NM does not timeout a request for secrets, so the request is stays queued until it can be processed and it can only be processed after the kwallet is opened. 2. NetworkManager timeous requests, which is something logical to do (the timeout is about 2 minutes). Besides timing out requests NetworkManager also re-issues the request after some time (about 10 minutes) and that is our problem. When NetworkManager re-issues the request we queue it too, but did not remove the old one (now a stale request). When kwallet is finally opened Plasma NM's secret agent tries to process the stale request and the crash happens. The simple solution is removing the stale request after a timeout or when a request for the same connection comes in. I tested the latter yesterday and it works. However, the secret agent code, which was already difficult to understand, is now even more difficult to understand. I need to re-factor it to make things simpler.

In resume, to reproduce the bug you need to wait about 12-15 minutes after the kwallet's password popup appears and only then supply the password. You can see NetworkManager issuing the second secret request in its log, so you can just wait for that instead. If you supply the password within the first two minutes there will be no problem and that is probably the common case.

Although this bug is an obvious design flaw I will not put the blame on who wrote the code (it was not me, by the way). I will thank who wrote it because by the time it was pushed to Plasma NM's repo I was in a rush to fix other problems during the transition to NetworkManager 0.9. That code allowed Plasma NM to finally work with NetworkManager 0.9 and was one less problem for me to solve.