May 3, 2014

Fix Baloo on KDE using the same trick as once used with Nepomuk

by orzel
Categories: Admin, Gentoo, KDE
Tags: ,
Comments: 26 Comments

update: this post made me banned from KDE planet in a very rough way

 

Nepomuk Problem

Since the  daunting day of the kde 4.0 release, I’ve been struggling with nepomuk. I’m no random user, i know about low-level programming, i/o bound, cpu bound stuff, and I kinda tried to have it working. I failed miserably and it kept on putting my powerful computers down. KDE people kept on denying the problem, typical answers would be “you don’t know how to read top”, “normal (sic) computers have more <whatever:cpu,ram,..>”.

Getting rid of Nepomuk

I don’t care about Nepomuk, so I tried to disable it. Still, Nepomuk stuff would appear in my top and eat memory, cpu and i/o. It’s been fixed since then, I don’t remember when but very late. Like, more close to now than to 4.0 release.

I’m using Gentoo, and I tried to have KDE installed without Nepomuk using the USE flag “-semantic-desktop”. It was supposed to be possible (through using autotools options), but it never worked. According to Gentoo packagers (I didn’t check), this was supposed to be possible, but actually, nope. My conclusion by the time was that KDE dependencies were a nightmare.

So… all of this to say that my typical fix for this mess have been for a very long time to remove relevant binaries from /usr/bin. Even though I don’t use KDE anymore, I still have to deal with KDE on the many computers I’m taking care of. It’s routine now for me to install/update KDE and

sudo rm /usr/bin/*nepomuk*

Since then, me and owners of those computers haven’t had those “computer hangs” problems anymore (i don’t say “were happy” because there were lot of other problems in KDE).

Baloo

Now comes KDE 4.13 and “baloo”. As a programmer and sysadmin, and also as a kind of packager, I like to use “vanilla” packages instead of patched ones. So I gave a chance to baloo. As everybody else (google for it), it was a complete mess. Moreover this new stuff can’t be disabled neither. So I’m back to my original fix, and I now

sudo rm /usr/bin/*baloo*

on all computers where I install/update KDE.

It’s not joke. I mean, there’s more to this that “I’m fed up and removed it all”. I actually do this, and this blog entry is a report that it actually works: baloo won’t bother you anymore, and it won’t break (any more, I mean) the remaining KDE parts. This is useful, it will change a system from “unusable” to “usable”.

I would propose Gentoo packagers to have USE=”-semantic-desktop” do exactly this, but I’m pretty sure this won’t be accepted 🙂


26 Comments »

  1. gaboo says:

    I’ve never had luck with nepomuk too and was like you disabling it. But since the 4.13 update, baloo works great here. It has even taken me several days to notice that it was enabled by trying a search in dolphin : and it was almost instant.

    I disagree on baloo, from my side the imrovements are so great it’s not even comparable.

  2. Great, this is the first report i read about it working well. And it’s on my blog ! 😉

  3. Fusselwurm says:

    Same as gaboo. Nepomuk made my machine scream, but Baloo I dont even notice.

  4. AK says:

    I just change permissions on nepomuk/akonadi/baloo.
    Something like chmod -x /usr/bin/baloo*

  5. Yes, works too 🙂

  6. Iskren Hadzhinedev says:

    I’d thought i’d also share my experience with baloo: First couple of weeks it was barely noticable on a machine with an empty HDD. After I moved all my data (including some gigabytes of source code) it started running slow as hell thanks to baloo_file and baloo_file_extractor. I stopped the process and finished my stuff, then resumed it and left it overnight. Next day everything was perfectly smooth. It actually saved my life, since my old hard disk was dead and I had to salvage some stuff from the thousands of recovered files with garbled filenames and the search was invaluable.

  7. I’m sure it’s useful.
    I also have a huge home, worth 140G with lot of text files / source code. find|wc -l in my ~/hg returns 430k for example. Maybe those that have no or few problems with baloo/nepomuk are those with a small home dir ?

    On the other side I’ve had problems with just all other computers I administrate, I’m sure at least some of them have a small homedir.

  8. GreatEmerald says:

    Moreover this new stuff can’t be disabled neither.

    Why do people keep making this false claim… Baloo has a settings menu, which has a way to exclude directories, and if you add your /home to it, suddenly Baloo has nothing to index: it’s disabled.

  9. I can answer your question : because it’s far from being obvious and nobody guess that. People expect something like a checkbox with a text having “disable” somewhere in it.

  10. Achim Bohnet says:

    For me baloo works great and I don’t notice it at all doing it’s background job (home with 120 K files and 485 GB) in the final 4.13 release. For me baloo is a very valueable and useful feature. I don’t want to miss it.

    P.S. I found two baloo problems in the rc releases. Reported, tested patches of Vishesh. Both bugs fixed in one day. Thx again Vishesh 🙂

  11. I can answer your question : because it’s far from being obvious and nobody guess that. People expect something like a checkbox with a text having “disable” somewhere in it.

    Upstream developers want you to use search. They want that data to make your workflow easy. You have to understand that you can’t cherry pick a system’s part and expect it to work great.

    Folks who want to disable it will have to go out of their way. Otherwise some folks might disable it and expect their whole system to work as it is. It won’t happen.

    A reasonable thing would be to report problems, the technical ones, to the upstream and avoid the dangerous philosophy of it has not worked in past and it will not work in future.

  12. KDE friend says:

    The claim that is just the same as nepomuk is probably too strong, but I agree in many respects.
    As a very advanced user with admin privileges an honestly trying to get it working you can still fail as it is notoriously difficult to debug. It does not even produce the most obvious debugging output such as displaying a message saying “Sorry nepomuk/baloo crashed trying to index the following files”. If you knew that you could at least add the respective directories to the exclusion list.
    In view of the above removing *obvious* configuration options from the settings dialog is misguided.
    In some configurations it just doesn’t work and therefore it should not be enabled by default.
    For my system with many PDF files in the home directory, after installing the new kde, baloo took all resources as you describe. It helped however to remove all the configuration and database files. Baloo apparently tried to continue with old nepomuk databases and failed. After doing that it does not crash my system anymore (However it does not index the interesting PDF files either). Of course you can’t do that as an admin for all users. Therefore there should definitely be an *additional* button in the settings dialog “reset baloo (will delete all existing database files)”.

  13. tosky says:

    The additional button for disabling it is enabled and it will be in the upcoming 4.13.1:
    http://commits.kde.org/baloo/77a4ec2cd7e59035efe895e12912c0695b11deef

    About some use cases where it’s not working properly: it’s a matter of time until user user feedback is collected in order to fix the various bugs.

  14. KDE friend says:

    About the button: I appreciate that some of the criticism is taken seriously. Ultimately, in open-source, it’s up to the developers if they decide to do this.

    About the user feedback: I was giving feedback in the past by writing bug reports for nepomuk. What happened was that the report stayed idle for some time and then it was considered outdated because nepomuk got updated many times since I reported. The problem is obvious. The bug is irreproducible for developers because they can’t run test with the same set of files and the same system. If not developers provide means to find out which of the files cause troubles, I am afraid my problems will persist. I understand that baloo keeps an exclusion list itself for files which didn’t work. But how can I see what’s in this list? There is too little configuration. Already nepomuk had too little.

  15. valentin says:

    Thanks!

  16. eric says:

    on my fresh new desktop, I’ve just imported the /home from my previous computer. Now fans are making much noise and I get between 90 and 100 % CPU usage because of baloo.
    I think it would have been smarter to limit the cpu consumption, even if it takes 3 or 5 more time to index everything.

    I’ll keep it like this for a while, if at the end of the day it’s still the same, I’ll kill this fat baloo…

  17. dj says:

    Changing their permissions is an option too. Has anyone thought of asking the KDE team if there is a donation amount (we pay them not to develop it), where they would make the sematic desktop, social desktop, the whole Akonadi PIM (Alternative: Thunderbird), Baloo semantic desktop optional or maybe we go to the Linux Distros and ask for a compiled version of KDE4 without Akonadi and Baloo architecture. There are PIM alternatives so Akonadi is not necessary. The weight of those two items is so very heavy and their features are for very specific groups of people and does not conform to the wonderful historical flexibility that KDE offered. A Kickstarter fund perhaps?

  18. The KDE team heavily relies on distributions (for testing, fixing bugs and such). I kinda blame distributions too for having the same approach as KDE and let such low quality pieces of software go through and reach final users. I’ve always thought distributions should ship KDE “enhanced” by stripping those ugly things. The core of KDE is in a lot better shape (imho), and that would give a quite good desktop environment once cleaned.

  19. andy says:

    Thank you for the information on how to disable this most notorious “functionality” of KDE. I’ve not migrated to Linux many years ago just to be treated as if was still using Windows.
    Shame on kde team for releasing such a lame excuse for a software as baloo.

  20. Harry S. Speer says:

    Thank you very much for this very useful post.

    I’m dealing with this in openSUSE 13.2 64-bit with KDE 4.14.6 and I used the above to disable baloo. Now I’m restaring linux and getting tracker running in 5 processes – tracker-extract, tracker-miner-apps, tracker-miner-fs, tracker-miner-user-guides, and tracker-store. I am using KSysGuard to view these and then Send Signal -> Suspend (STOP) these 5 processes. And this is *AFTER* I already used Configure Desktop and set Desktop Search and unchecked the box labeled “Enable Desktop Search” and then rebooted the PC and restarted linux.

    Geez. This is such a nuisance.

    And I tried uninstalling tracker but that took out other apps I wanted to keep, assumedly because of dependencies.

    I wish these programmers would get a clue and realize I do not want these running and want a relatively easy way to permanently and dependably disable them.

    *heavy sigh*

    Makes me feel like I’m running Windows all over again. I fled Windows and found Linux for my PC instead. Oh well. Some programmers never learn.

  21. Harry S. Speer says:

    Used Dolphin as root

    went to /usr/lib and found

    tracker-extract
    tracker-miner-apps
    tracker-miner-fs
    tracker-miner-user-guides
    tracker-store
    tracker-writeback

    6 programs

    using Dolphin as root, Properties, Permissions,
    unchecked “Is Executable” box in each of thse 6.

    closed Dolphin as root.

    Went to KSysGuard and did a “forcibly kill process”
    on all 6 tracker*

    restarted PC and restarted linux.

    Seems to have solved the problem. May have to repeat if these programs ever get updated. *sigh*

  22. Matthias says:

    Thanks for this: I just installed a ‘vanilla’ OpenSuse 13.2 and Baloo chrashed every time I logged in. I was trying to uninstall the package but it appears that there a millions of cross-references between the libraries, so I gave up I got almost used to the crashes. So I got rid of Baloo this way.

  23. Graham Nicholls says:

    Balo, Nepomuk, …
    Brilliant solutions in search of a problem.
    Admittedly I’m an advanced user, but I tend to organise my filesystem. No indexer required. If you want to go down the awful – truly awful – Apple route of hiding the standard Unix filesystem and imposing a directory structure on the users, then maybe an indexer is required. Otherwise, and I’m sure you’re very clever, baloo programmers (if you are, then why choose such an irritating name?), but go away and work on windows, please. Stop trying to make Linux (Poettering please note) like Windows.

    I don’t understand any use case for file indexers that is not better answered by using a directory structure. If you have one, and it outweighs the disadvantages of buggy software which crashes or uses 100% of CPU, then please tell me. Otherwise, go and program your “final year project” on windows, where you belong, and get the f*** off my computer.

  24. tosky says:

    For anyone reading this: you don’t need to destroy your system by fiddling with system files, as Baloo, which is *only* a file indexer in the Frameworks 5 world (kdepim/Qt5 uses its separate and independent indexing, despite some reference in the naming only – check the code) can be simply disabled with a click from KDE System Settings.

  25. You misread previous comments. Everybody is aware that we are supposed to be able to disable it. But for most (all) it doesn’t work. This is the reason for this article.

  26. Michael says:

    Came to this as baloo (what a braindead-name!) constantly either sucked up my i7 or (since yesterday) constantly crashed – and crashed plasma as well.
    Also fully agree with Graham Nicholls: indexers are useless and needless!

Leave a Reply

Your email address will not be published. Required fields are marked *