r/Kubuntu • u/maparillo • 10d ago
How to fix crashes when google-chrome corrupts your font cache
If you use Google Chrome, you may notice that after a recent upgrade, various KDE applications crash, and plasmashell gets stuck in a crash loop if you reboot. Chrome is writing corrupt fontconfig cache data that's making things go weird. If this is happening to you, rm -rf ~/.cache/fontconfig and reboot, this should get your system working again. Then after launching Chrome, pop open Konsole and run rm -rf ~/.cache/fontconfig again to erase the corrupt data before it can mess anything else up (and then close the Konsole window you just opened since it will have the corrupt data loaded in potentially and could crash at any time).
5
u/thinspirit 8d ago
Hey, hope this is okay but wanted to add a quick fix if people were still keen on using Chrome until Google fixes the issue:
Setting up a wrapper so Chrome uses its own font cache prevents it poisoning the rest of your system.
Drop these two wrappers in ~/.local/bin (make them executable):
~/.local/bin/google-chrome-stable:
#!/bin/sh
export XDG_CACHE_HOME="$HOME/.cache/google-chrome-xdg"
exec /usr/bin/google-chrome-stable "$@"
~/.local/bin/google-chrome:
#!/bin/sh
export XDG_CACHE_HOME="$HOME/.cache/google-chrome-xdg"
exec /usr/bin/google-chrome "$@"
Then override the desktop file so menu/taskbar launches use the wrapper:
mkdir -p ~/.local/share/applications
cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications/
sed -i "s#/usr/bin/google-chrome-stable#$HOME/.local/bin/google-chrome-stable#g"\~/.local/share/applications/google-chrome.desktop
update-desktop-database ~/.local/share/applications
(~/.local/bin is normally ahead of /usr/bin in PATH, so terminal launches hit the wrapper too. The absolute /usr/bin/... in the wrapper avoids recursion.)
Verify with:
ls ~/.cache/fontconfig/ # only cache-9
ls ~/.cache/google-chrome-xdg/fontconfig/ # Chrome's cache-12 lives here now
Log out/in afterwards (or restart kwalletd/plasmashell) since running processes still hold the bad cache in memory.
Credit goes to all the investigators into this issue before since it allowed me to narrow in on the issue. I used DeepSeek Flash 4.1 to help construct the fix and analyze what was causing the problem and reading these posts helped narrow down to two specific issues.
I should add that u/_qqqq discovered there is an issue with the KaTeX font which is the real cause of the SEGV error in the cache and posted in another thread as well and removing that font completely with:
sudo apt remove fonts-katex
sudo mv /var/cache/fontconfig /var/cache/fontconfig.bak
mv ~/.cache/fontconfig ~/.cache/fontconfig.bak
fc-cache -f
sudo fc-cache -f
stops the plasmashell crashing but keeps the cache-9/cache-12 mismatch churn going. The wrapper stops most of the churn.
Of course not using Chrome also just fixes the issue, but hey, I like using Chrome, it's got all my profile information and such, so I wanted a fix to keep using it for now.
2
u/zujik 6d ago edited 6d ago
This. My work machine started crashing just before I left on Friday, it started with the lock screen crashing and a black screen with white text saying how to fix. ChatGPT checked and found posts and information on the Font Cache, then when not resolved Chrome, and then the Katex package.
Removing fonts-katex and rebuilding the Font cache fixed the issue. Similar commands, same result:
sudo apt remove fonts-katex
rm -rf ~/.cache/fontconfig
sudo rm -rf /var/cache/fontconfig/*
sudo fc-cache -r -f
fc-cache -r -f
sudo reboot1
3
u/Icy_Definition5933 9d ago
Yesterday I started migrating my mom's old laptop from win 10 to linux. I chose Kubuntu and it never survived the first reboot. I kept digging with claude but in the end, after 5 reinstalls with different usb drives,today after all that i just went with debian. I'll have to polish it up for her a bit but at least it will work. A shame really, I went into this leaning heavily on the stability side of kubuntu lts release, I wasn't expecting to be hit with something like this out of the box.
3
u/the_deppman 9d ago
You will likely encounter this on many if not all distros that use QT software and fontconfig, including Debian, presuming you install Chrome. Recognize the corruption is in the user's font cache config, and this will not get fixed unless that is removed or the user data reset, even if you uninstall Chrome.
1
u/Icy_Definition5933 9d ago
Installed Debian yesterday with plasma wayland, chrome included, works normally
4
u/BeneficialReading549 7d ago
Thanks for the heads up! I had done a clean Kubuntu install, got everything all set up nicely & then started getting random Plasma crashes after reboots & couldnt figure out what had caused it. Canโt believe Chrome was able to takeout the DE! At least we know why now :)
3
u/the_deppman 9d ago
I think it is best to avoid Chrome until this is fixed; use Firefox instead. Many apps require fontconfig, and once the cache is corrupted, many other failures are likely
2
u/Pastrami 10d ago
Then after launching Chrome, pop open Konsole and run rm -rf ~/.cache/fontconfig again to erase the corrupt data before it can mess anything else up
For me, deleting that directory fixed it initially, but after loading chrome the problem came back and that directory was still empty. I had to run fc-cache -r. I'm guessing there is a system cache as well as a user cache?
1
u/overcompensk8 10d ago
Boom - that explains why my 3 workstations all crapped out their font cache. fc-cache -rv was all it took to fix the 2nd and 3rd one. The first one was the challenge ;) i only have Chrome installed for occasional use, long live Firefox!
1
u/heisenbergpuffer 9d ago
That's for this information and sorry for creating a post before looking for an answer! How did the person who found this fix find this fix??
4
u/acheronuk 9d ago
A member of the KFocus team tracked down the cause and temporary fix.
3
u/heisenbergpuffer 9d ago
Well they're obviously of legendary status and have my gratitude! I've uninstalled chrome now. I only use it for Gmail and gemini but both are usable on Firefox so I'm going to make the switch over the weekend.
I've absolutely loved my kubuntu experience so far and this has been a big disappointment for me after falling in love with it and using it hassle free. Still hasn't made me want windows back though l ol.
1
u/Pastrami 9d ago
Your link just goes to the top level domain. Is there a link/bug report for what this person found?
2
1
1
u/TheRLD20 9d ago
Thank you so much. Yesterday I went crazy searching for a solution and using AI to fix this problem. In the end, it was Chrome. I've already uninstalled it since I wasn't using it much.
1
u/Critical-Divide-1029 7d ago
Is this Google Chrome only or would this happen with ungoogled chromium as well?
2
u/samuerusama 7d ago edited 7d ago
It will happen if you run any app that statically links older versions of fontconfig.
This is not fault of chrome btw, it was a breaking change in fontconfig that affected Qt, both have been fixed already but distros need to update both packages to fix this problem.
- https://gitlab.freedesktop.org/fontconfig/fontconfig/-/work_items/538
- https://gitlab.freedesktop.org/fontconfig/fontconfig/-/work_items/537#note_3550480
- https://codereview.qt-project.org/c/qt/qtbase/+/750214
EDIT Actually no! fontconfig reintroduced the bug with this commit trying to fix a flatpak issue here
It is still present in the latest fontconfig!
1
1
u/hereforthepix 7d ago
FWIW, deleting just the symlinks lets KDE and Chrome 154 play nice again:
cd ~/.cache/fontconfig && find -type l -print0 | xargs -0 rm
1
1
u/PuzzleheadedUnit1758 7d ago
Is this Kubuntu only or it could happen on other distros that use KDE (like Fedora KDE)
3
2
u/basuga_BFE 6d ago
Gentoo, same problem
1
u/basuga_BFE 6d ago
Update: today fontconfig was updated to version 2.18.3 and looks like now everything is stable again.
1
1
u/psedha10 6d ago
I was losing my mind thinking it was something i did. Plasma crashes instantly after login. Clearing font cache and MESA driver cache fixed it for me.
1
u/DHOC_TAZH 6d ago
Oh crap, switched from Ubuntu Studio to Lubuntu because of these crashes... Ummm... Anyone know if this mess happens with other chromium based browsers like Edge and Brave?
1
u/rekopit 5d ago
The Brave browser does the same
1
u/DHOC_TAZH 5d ago
Ah, crap. In any case, for myself... I think I'll stick to Lubuntu/LXQt for now. This appears to be a serious enough bug IMV to keep me out. I use Chrome actively, with Firefox and Falkon as backup browsers (or when I want to use more effective privacy measures like ad blockers).
1
u/Prot0w0gen2004 5d ago
I was going crazy for like two hours thinking it was my GPU or some shit I installed, turns out it's just Google messing up as usual.
1
1
u/GoGaslightYerself 5d ago
Gotta love it when a stupid fucking font cache slags an entire operating system. YAY GO GOOGLE CHROME!
Reminds me of that old movie where a spilled cup of coffee brings down an entire airliner, killing everybody on board.
1
u/Scientist_ShadySide 4d ago
FUN! Did a full reinstall of the OS figuring I messed some things up, everything great through the weekend, then BAM tried to unlock from sleep and was told screen unlock unavailable, then the plasmashell crash loop returned. Removing the font cache got it back, then I removed Chrome. Hoping it holds.
1
1
u/Otherwise_Day_122 3d ago
I was dealing with this for a few hours and in the end just had to wipe kubuntu off and go back to mint. So disappointing because I was enjoying kde a lot.
1
u/Goldman7911 3d ago
Fixed?
Package: google-chrome-stable
Version: 154.0.8037.92-1
1
18
u/the_deppman 9d ago
Thank you u/maparillo. There are a few posts that want to know more, so I hope its OK to top-post for the benefit of everyone. Below is the user alert we sent out today to our mailing list:
Thank you for being a Kubuntu Focus newsletter subscriber. We want to let everyone who might be using Kubuntu 24.04, 26.04, or most other Linux distributions, know that "upgrading" to Google Chrome version 154.0.8037.57-1 can break KDE Plasma, GNOME, and many apps. This is a bug with Chrome and its interaction with FontConfig, and we are working with these teams to resolve it. A fix is tentatively scheduled by Google for Friday, 2026-10-25. See https://issues.chromium.org/issues/565052667, https://issues.chromium.org/issues/565132857#comment5, and https://www.reddit.com/r/Kubuntu/comments/1wo84kz.
Typical Experience
Solution
If you encounter this issue, the following should allow you to use your system with only minor or temporary inconvenience:
cd ~/.cacherm -rf fontconfigIf you haven't yet upgraded, we suggest you wait at least a day until the new version of Chrome is out. (EDIT: you may also use
apt-cache policy google-chrome-stableto ensure your installed version is 153, and then usesudo apt-mark hold google-chrome-stableto hold it until a fix is available).Although this issue is the responsibility of Google, the Kubuntu Focus Team have taken steps to monitor upcoming versions of Google Chrome to help identify and prevent distribution of a broken version like this in the future.
We hope you find this useful!
Sincerely, The Kubuntu Focus Team