Search This Blog

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.

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.