1

A while ago, I posted a message about strange activity on my computer. Since, I did find a couple of new symptoms which seem to point to fontconfig and friends (fc-cache). I considered this sufficient to post a new question.

Though I don't have direct proof yet, I noticed that the /-partition, where the OS is installed, was filling up slowly. Of course, I first checked the probable suspects, such a s log files, /tmp remnants, etc. Old trusty xdiskusage however pointed me to a huge /var/cache/fontconfig directory (I mean huge. tens of thousands of entries, some entries dating back 6 months). The directory was occupying GBs of disk space (even though each file only was 120-odd bytes long).

Sensitized, I checked the number of files regularly, and found it increased continually, even during normal use (I thought fc-cache only ran on boot or when files change in the font directories).

So I ran fc-cache -r -v. (-r according to man is supposed to clean up):

Erase all existing cache files and rescan

and got the following report:

/usr/share/fonts/OTF: caching, new cache contents: 78 fonts, 0 dirs
/usr/share/fonts/TTF: caching, new cache contents: 544 fonts, 0 dirs
/usr/share/fonts/Type1: caching, new cache contents: 115 fonts, 0 dirs
/usr/share/fonts/Speedo: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/Speedo: failed to write cache
/usr/share/fonts/cyrillic: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cyrillic: failed to write cache
/usr/share/fonts/misc: caching, new cache contents: 125 fonts, 0 dirs
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: caching, new cache contents: 0 fonts, 1 dirs
/root/.fonts/Library: caching, new cache contents: 0 fonts, 0 dirs
/root/.fonts/Library: failed to write cache
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 3 dirs
/usr/local/share/fonts/m: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/p: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/t: caching, new cache contents: 1 fonts, 0 dirs
/root/.fonts/Library: skipping, looped directory detected
/usr/local/share/fonts/m: skipping, looped directory detected
/usr/local/share/fonts/p: skipping, looped directory detected
/usr/local/share/fonts/t: skipping, looped directory detected
/var/cache/fontconfig: cleaning cache directory
/var/cache/fontconfig: invalid cache file: R-le64.cache-7
/var/cache/fontconfig: invalid cache file: 523f903ec8d4564459770c546e0d49d6-le64.cache-7
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: failed

The questions I couldn't find an answer to:

  • Which activities cause [what I suspect to be] fc-cache to run while I am normally using the machine? (I noticed that starting a larger program, such as GIMP, or mplayer, seem to create a lot of new entries in the cache directory. For more info on the activity, see the link at the top)

  • "looped directory detected": I checked the fonts (and directories). None are symlinks... What does this mean?

  • "invalid cache file" seems to point to a filename which has a different format as the rest. Maybe I have a mixed-up installation?

UPDATE Still confused but I installed fontconfig 2.13.91 (instead of 2.13.1) and emptied the /var/cache/config directory completely. During normal work inside X no more heavy activity nor extra files being generated in the cache directory. Also, fc-cache now reports it succeeded.

Still:

  • Nothing is being generated in the cache directory, which doesn't seem correct. Is it?
  • For some reason, after reboot, the sheer size of the cache directory (even though empty) caused problems. Only after rmdir and mkdir did the system correctly boot...

1 Answer 1

0

Probably a dirty solution, but it helped me:

I first deleted the fontconfig cache folders than reinstalled the fontconfig packages and lastly rebooted.

I have no fancy fonts on my system, I did not understand why the caches grows beyond 1 GB. On a small 368er laptop that seems inappropriate.

1
  • Thanks. The problem resolved itself here - don't ask ;) By the way, I don't think that the fonts themselves are cached but rather the 'rendered' images... And I can imagine that a lot of fonts at several sizes can occupy loads of space.
    – jcoppens
    Jan 31, 2023 at 20:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .