Bug 232100 - KDE processes writing to icon-cache files "prevents the disk from going to powersave mode."
Summary: KDE processes writing to icon-cache files "prevents the disk from going to po...
Status: RESOLVED WORKSFORME
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-25 12:43 UTC by Dennis Schridde
Modified: 2020-10-07 05:50 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2010-03-25 12:43:26 UTC
Version:            (using KDE 4.4.1)
Installed from:    Ubuntu Packages

Following are several lines of output from powertop, while doing effectively nothing (despite staring at the output of powertop or writing this bugreport) with my computer:

The program 'flush-8:0' is writing to file 'kde-icon-cache.index' on /dev/sda1.
 This prevents the disk from going to powersave mode.

The program 'plasma-desktop' is writing to file 'kde-icon-cache.lock.lN2736' on /dev/sda1.
 This prevents the disk from going to powersave mode.

The program 'plasma-desktop' is writing to file 'kde-icon-cache.lock.QP2736' on /dev/sda1.
 This prevents the disk from going to powersave mode.

The program 'konqueror' is writing to file 'kde-icon-cache.lock.Th3204' on /dev/sda1.
 This prevents the disk from going to powersave mode.

Running powertop for a longer time will result in lots of such messages. To me it seems not immediately necessary to frequently write to such cache files, and create lock files, if the icon theme does (almost) never change.

Kubuntu 10.04_beta1 / Lucid
 kdebase-workspace 4:4.4.1-0ubuntu6
Comment 1 Dennis Schridde 2010-03-27 09:45:30 UTC
The program 'plasma-desktop' is writing to file 'plasma_theme_air-netbook.index' on /dev/sda1.
This prevents the disk from going to powersave mode.
Comment 2 Dennis Schridde 2010-03-27 12:02:39 UTC
Possibly related:

[/usr/bin/akonadi_maildir_resource] akonadi_maildir_resource_0(5724): Failed to lock file "/var/tmp/kdecache-$USER/kpc/kde-icon-cache.lock" , last result = 1

[/usr/bin/akonadi_nepomuk_contact_feeder] akonadi_nepomuk_contact_feeder(5727): Failed to lock file "/var/tmp/kdecache-$USER/kpc/kde-icon-cache.lock" , last result = 1
Comment 3 Michael Pyne 2010-03-27 16:31:09 UTC
Simply grabbing an icon from the cache, even if it's already cached and didn't need to be grabbed from disk, will result in updating the index file for the cache to update the usage count and last access time (similar to the behavior of filesystems without the noatime mount option)

It's possible to just add a flag to stop that I suppose, but probably easier at this point to not load icons unnecessarily when idle (although I don't know that is actually what's going on!)
Comment 4 Stefan Brüns 2010-03-30 12:28:50 UTC
(In reply to comment #3)
> It's possible to just add a flag to stop that I suppose, but probably easier at
> this point to not load icons unnecessarily when idle (although I don't know
> that is actually what's going on!)

There is a bug in qpixmapcache (or qpc is used with a different scope). qpc evicts entries from the cache after some time, even if the items are in use, when the set of items is stable (e.g., you only use the same 3 pixmaps all the time). I am currently working on a new implementation for qpc which does not show this behaviour.
Comment 5 Vladimir Prus 2010-09-29 15:14:33 UTC
Is there any progress on this? KDE 4.5.1 as shipped by Kubuntu still has this annoying behaviour.
Comment 6 Michael Pyne 2010-09-30 00:20:25 UTC
No one has submitted any patches. The implementation of the icon cache has shifted over to KSharedDataCache in the meantime. Perhaps the best route is to add an internal (i.e. not part of the public API) option to KSharedDataCache::find() to not update the use count on access (similar to noatime in mount) and then have KSharedDataCache::Private not update use counts if PowerDevil says we're on "powersave".
Comment 7 gerlos 2010-10-19 17:23:18 UTC
I'm experiencing the same behaviour on my KDE 4.5.1 system running on Kubuntu 10.04.
Comment 8 Nate Graham 2020-09-29 22:24:24 UTC
Is this still a problem in recent versions of Plasma 5, like 5.19 or later?
Comment 9 Dennis Schridde 2020-09-30 05:51:25 UTC
(In reply to Nate Graham from comment #8)
> Is this still a problem in recent versions of Plasma 5, like 5.19 or later?

I doubt it.
Comment 10 Dennis Schridde 2020-10-07 05:50:56 UTC
(In reply to Dennis Schridde from comment #9)
> (In reply to Nate Graham from comment #8)
> > Is this still a problem in recent versions of Plasma 5, like 5.19 or later?
> 
> I doubt it.

I just tried to check this, but powertop 2.13 no longer provides this kind of information.

I also found a machine that still has a spinning hard drive.  I can hear that the drive goes into standby and is woken up again immediately thereafter.  Without a tool to analyse which program is responsible, I do not think we stand a chance to improve this.