Monday, October 31, 2011

How To Get Kubuntu 11.10 Akonadi, Nepomuk, and Kontact All Working Correctly

Kubuntu users using 11.10 for the first time will quickly discover that there are some serious issues with the indexing system. The problem affects Kontact significantly and can cause your system to come to a crawl. Fortunately, these issues have been addressed but are not available in Canonicals standard repositories yet.

To fix the problem you need to add the KDE Backports repository and activate experimental updates.

If you are upgrading from Kubuntu 11.04 you will have to do a fresh upgrade in order to get a proper upgrade.

IN 11.04 - Backup all your Kontact Files: There is a major change in how Kontact handles, indexes and stores data between Kubuntu 11.04 and 11.10 the updated version of Kontact cannot read your files from 11.04 and you will have to export everything to be imported to the new version of Kontact later.

Boot the 11.10 CD-ROM or USB Drive Into Try Kubuntu Mode - Your going to have to do some file maitainance here first.

If you have one Linux partition mount that partition. Then use Alt+F2 key combination to open the run dialog box. Type in 'kdesu dolphin' to have root privelages in it. Navigate to the Linux partition and remove all files and directories except for the home directory.

Once that task is complete go into the home directory and then into your user directory. Tell dolphin to show hidden files and directories. You will need to remove them all. Remember that all hiiden files and directroies have a leading . before them. Example; your hidden directory that holds your KDE configuration files will have the name .kdesu

This will keep all your persnonal files intact while allowing Kubuntu 11.10 to get a fresh install. This is important since an upgrade install does not work well between 11.04 and 11.10.

If you are like me and have a separate Linux partition for home (i.e. mount point is /home) then just go into it and remove all the hidden files and folders in your user directory. You can reformat the other partitions when you do the install.

If there is more than one user on your system make sure that all necessary backups for them are done and also remove all their hidden files and directories in their user directories as well.

Once you have backed up all necessary data files and cleaned up the system as described then start the Kubuntu install.

Once Kubuntu 11.10 is installed and you have booted into your system you need to do the following:

Install the Kubuntu KDE Backports ppa - sudo add-apt-repository ppa:kubuntu-ppa/backports

Go to Applications >> Settings >> Software Sources in the menu. Click on the "Updates" tab and make sure that Pre-released updates (oneiric-proposed) and Unsupported updates (oneiric-backports) are selected. All boxes ubder "Install updates from:" should be checked.

Open Konsole and use the following commands:

sudo apt-get update
sudo apt-get upgrade

You will notice that your entire KDE install from the CD or Flash Drive install is going to be upgraded to version 4.7.2 allow this as this version has several bug fixes, including the ones needed to fix Akonadi, Nepomuk and Kontact.

After all updates have installed and the system reboots you can restore all your Kontact Data and go about getting your system setup back to where you want it.

One thing you need to know, the new version of Kontact does not play well with clamav or with spam filters (yet) so you should avoid using them for now. Otherwise you will find yourself waiting on Kmail (Kontact) constantly as it filters email everytime you run it. Kmail filters all email in your inbox everytime you download, startup or setup your personal filters. The new version of Kmail is not probably tagging files as already scanned so if its in your inbox its going to get scanned everytime Kmail does something.

Saturday, October 15, 2011

Remove Akonadia in Kubuntu

Having to make a decision on where to go with using Linux without using Unity led me back to KDE. Initially I installed Kubuntu 11.04 and was pleased with several of the features but when I upgraded to 11.10 I encountered severe issues.

I liked Kmail until I did the upgrade, unknowingly I had several backend issues due to changes in the KDE PIM suite, all caused by Akonadi.

From Wikipedia Akonadi is is explained as:

Akonadi is a storage service for personal information management (PIM) data and metadata named after the oracle goddess of justice in Ghana. It is one of the “pillars” (core technologies) behind the KDE SC 4 project, although it is designed to be used in any desktop environment. It is extensible and provides concurrent read, write, and query access.

Akonadi provides unique desktop-wide object identification and retrieval.[3] It functions as an extensible data storage for all PIM applications. In KDE 3 each PIM application had different data storage and handling methods, which led to several implementations of essentially the same features. Besides data storage, Akonadi has several other components including search, and a library (cache) for easy access and notification of data changes.

Akonadi communicates with servers to fetch and send data instead of applications through a specialized API. Data can then be retrieved from Akonadi by a model designed to collect a specific data (mail, calendar, contacts, etc.). The application itself is made of viewers and editors to display data to the user and let them input data. Akonadi also supports metadata created by applications.

Because Akonadi takes care of data storage and retrieval, which are traditionally the difficult parts of creating a PIM application, development of PIM applications is made much easier. In fact, the Mailody developer Tom Albers demonstrated how a mail reader could be created in only 10 minutes using Akonadi.

That's all fine and dandy, except for one huge and very important detail, its murder on the CPU resources. My duo core did not drop below 93% the whole time it was active. It severely affected my network speed, graphics, disk and memory access. When I setup Clam and Spamassasin in Kmail it bogged down so bad I couldn't use it. To make matters worse I couldn't shut it down without killing any KDE PIM service to boot. Finally, in Kubuntu anyway, removing it via apt would remove half of KDE as well. Oh I was not pleased by this.

There was no doubt Akonadi had to go. I removed all KDE PIM applications, which irked me bad because I did want them, but they were useless to me with Akonadi completely tied to them. Installed Thunderbird and manually removed all Akonadi bin files in /usr/bin/ and removed the akonadi folder in /usr/share/ (kdesu dolphin can do wonders)

Result is my average CPU state is back down below 10% when I'm not running intense Multimedia or graphic applications and still well below 50% when I do. In other words I can run my computer normally and not worry about overheating my CPU which Akonadi was definitely doing.

This is an example of a good idea badly implemented and released prematurely. If Akonadi stopped indexing and scanning its data base when PIM applications didn't need the service then it might have been useful. But between it and Neopuk there was no downtime for the CPU. Since I use a laptop that's just absolutely unacceptable. Bad enough there is still a power management bug in the Linux Kernel causing issues, I sure don't need a data base indexer causing even more of an issue and killing my battery even faster.

Yes I am staying with KDE (Kubuntu) but I won't be using Kontact. Which really is a shame because Thunderbird does not replace it completely. However, i can read my email, setup functional spam filtering and anti-virus scanning without making computer bog down so much that a 486 using Windows XP actually runs faster.

I'm all for shared resource technology, it makes a lot of sense. However, it shouldn't eat up resources like Akonadi does.