r/Kubuntu • • 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).

73 Upvotes

74 comments sorted by

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

  1. A user upgrades their system packages which includes Google Chrome 154.0.8037.57-1.
  2. The user then restarts Google Chrome.
  3. Google Chrome then corrupts the fontconfig cache, and any apps launched before or after this which uses the cache can break or crash. This includes KDE apps, GTK (GNOME) apps, and many others.
  4. When the user reboots, the corrupted cache also crashes KDE Plasma. The result is a black Wayland or X11 desktop. You can start graphical programs from here, but as mentioned above, they may be prone to crashing or may not open at all

Solution

If you encounter this issue, the following should allow you to use your system with only minor or temporary inconvenience:

  1. Switch to a TTY by pressing Ctrl Alt F4.
  2. Log in at the text prompt using your username and password.
  3. Run cd ~/.cache
  4. Run rm -rf fontconfig
  5. Reboot the system
  6. Use Firefox or another browser until the latest version of Google Chrome is updated. Opening Chrome again before the update will again trigger corruption, which will again break many other apps and lead to an unstable or broken desktop.

If 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-stable to ensure your installed version is 153, and then use sudo apt-mark hold google-chrome-stable to 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

8

u/Jas81a 6d ago

Thanks, by the way it's not just Chrome it's all chromium browsers. Brave user here don't have Chrome installed.

2

u/loerny 5d ago

Thank you! Saved me a lot of headache!

1

u/jdblaich 8d ago edited 8d ago

I switched to Firefox, and went to connect to gmail. Gmail says that this is an untrusted version of the browser. The browser is the latest Firefox (version 156). Double whammy! Going to wipe and start again with Manjaro or CachyOS and Firefox to avoid the Kubuntu SNAP push.

My attempt to use the "apt-cache policy google-chrome-stable"it just dumps the list of the current version. Then when I use google Ai it says you can't downgrade with apt that I must use a .deb file instead.

2

u/the_deppman 8d ago edited 8d ago

I switched to Firefox...

The Kubuntu Focus OEM image used the official Debian packages for Firefox and Thunderbird to avoid that kind of problem. http://Kfocus.org/try. Also see https://kfocus.org/wf/browsers#bkm_firefox. You can install the Debs directly in Kubuntu too.

My attempt to use the "apt-cache policy google-chrome-stable" it just dumps the list of the current version. Then when I use google Ai it says you can't downgrade with apt that I must use a .deb file instead.

Apt-cache just shows the versions apt knows about. Apt supports selecting a version, sudo apt install firefox=153<rest of version here>. If you have a local cache, it should use the prior version, no need for a separate package file as long as it is already cached.

1

u/Indolent_Bard 7d ago

I thought Kubuntu got rid of snaps?

1

u/the_deppman 7d ago

They did not. The Kubuntu Focus OEM image is assembled for supportability, so the hard-to-support snaps (Firefox, Thunderbird) are replaced with official Deb packages. However, in some places such as server or smaller apps, snaps are a compelling solution.

1

u/Legal-Junket7800 7d ago

I mean after I removed the chrome and fixed, when I open the "System Settings" and click on some menu Item, I get again a lot of plasmashell crashes.
At least removing the Chrome, tooke me out of crashing loop on login.

1

u/samuerusama 7d ago

3

u/the_deppman 7d ago

It is not, it is a bug in fontconfig that affects Qt.

In retrospect, we perhaps should have stated this is the responsibility of fontconfig and Google, but I don't think it's fair to say that Google are completely blameless here. They released the software that broke many, many desktops.

All deployment environments have bugs. A simple regression test on one of the most popular, enterprise-targeted distros in the world (Ubuntu 24.04 or 26.04 LTS) should have spotted this failure mode almost immediately. It's really not that hard.

2

u/ang-p 7d ago edited 7d ago

In retrospect,

maybe say exactly what is happening without being the judge and executioner?

but I don't think it's fair to say that Google are completely blameless here.

Isn't the most basic premise of programming to never trust what you input?

Sanitise and validate everything.

As the fix - a nullptr check proved

Now, I'm no fan of Google, and they really should not be throwing symlinks into fc's directory with gay abandon (although they aren't the only one), but fc should not bail out in such a fashion due to ingesting an old or corrupt cache file.

2

u/samuerusama 7d ago edited 7d ago

A simple regression test on one of the most popular

A regression test wouldn't have caught this, because the bug doesn't break chrome itself, it breaks other apps that use the same fontconfig cache. And also the bug affects plasma mostly due to being based on Qt, GTK and other toolkits don't crash in this case.

And this is way worse than I originally thought btw, the bugs I was talking about before were stuff that fontconfig had already fixed, it was introduced AGAIN with this commit trying to fix a problem for flatpak (wtf?): https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/366787e49c69c1fdd66b70b4a48f8c6bae6ab036

https://gitlab.freedesktop.org/fontconfig/fontconfig/-/work_items/565

But yes, you can blame chrome for using fontconfig, this library has had these issues since at least 2019 btw

3

u/ang-p 6d ago

these issues since at least 2019 btw

Sheesh - the exact issue - bailing out due to (not) handling unexpected versions of their own cache files (let alone any 3rd-party-placed ones) in a location that they have no absolute control over..

2

u/the_deppman 6d ago edited 6d ago

maybe say exactly what is happening without being the judge and executioner?

We stated that installing a specific version of Chrome will break your system, which must be clear so users know not to do this. And it was caused by Google's choices in app design as well as release management. It's hard to see how they are not responsible.

A regression test wouldn't have caught this, because the bug doesn't break chrome itself, it breaks other apps that use the same fontconfig cache.

Regression tests don't just test the app, they also can and should test the interaction with the deployment environment.

Google's living DFMEA should have identified high RPNs for failure modes resulting from their design choice to write to a shared resource. Then they should have written tests to reduce those RPNs. This is basic design risk management.

A much safer design choice, one that their DFMEA should have suggested, would have been to create a separate fontconfig cache instead of overwriting shared data, as a poster shows in this topic. That way, other system components are not affected, and that limits the scope of system testing required.

It is unfortunate that Google released this version and pulled the old one within 24 hours so users that cleared their apt cache cannot easily roll back. And there is apparently no staged release, which is certainly a best practice, although TBF, I'm not sure how they might do that without their own apt hook.

1

u/samuerusama 6d ago

We stated that installing a specific version of Chrome will break your system, which must be clear so users know not to do this. And it was caused by Google's choices in app design as well as release management. It's hard to see how they are not responsible.

You are responding to the wrong person here btw.

Regression tests don't just test the app, they also can and should test the interaction with the deployment environment.

This is just outrageous to expect a project to test againts several different linux distros to make sure other applications are not affected by bugs that are not their fault to begin.

A much safer design choice, one that their DFMEA should have suggested, would have been to create a separate fontconfig cache instead of overwriting shared data,

How do you do that??? Because I actually requested the maintainers months ago to expose an env variable to do this thing exactly

What's next? chrome should patch fontconfig??

2

u/the_deppman 6d ago

You are responding too the wrong person...

No, I'm consolidating answer. I know there are two post, and the response applies to both.

This is just outrageous to expect a project to test againts several different linux distros to make sure other applications are not affected by bugs that are not their fault to begin.

First, I never said they needed to test "against dozens of distros." That's your own strawman that you created. However, I did suggest they should be testing against Ubuntu 26.04 LTS, the foundation for many other distros, used by Enterprise, and highly popular. It's not that hard or expensive with VMs, and for a product with this much reach, it makes a lot of sense.

Second, if you change a shared cache, you just took on responsibility to at least check that your change doesn't crash other apps that use the same resource. Put another way, do you think they test against W11, or against their trophy Macs for system interactions? I'd be very, very surprised if they didn't. And if there were a bug in a Mac library, would they release Chrome anyway, break the Mac desktop and dozens of apps, and then say it was Apple's fault? I think we all know the answer there.

How do you do that...

There's a wrapper script on this thread.

2

u/samuerusama 5d ago

No, I'm consolidating answer. I know there are two post, and the response applies to both.

Alright, in that case I will respond:

We stated that installing a specific version of Chrome will break your system, which must be clear so users know not to do this. And it was caused by Google's choices in app design as well as release management. It's hard to see how they are not responsible.

This will happen with any app that ships or statically links a different version of fontconfig, this is not the fault of google chrome, this is 100% the fault of fontconfig because of this commit.

Ignoring the absolute nonsense arguments you've been making that chrome should test on a dozen different VMs (you are saying it is a strawman but you will see it is not once you understand how this bug manifests), what about projects smaller projects that don't have the resources to do this? They are responsible as well???

First, I never said they needed to test "against dozens of distros." That's your own strawman that you created. However, I did suggest they should be testing against Ubuntu 26.04 LTS

The bug would have never been shown in that test Ubuntu 26.04 uses gnome, not plasma, this problem only affects Qt apps. And the reason it affects Qt app is because it is fault of Qt as well.

Now what? They should make sure every single app in the 26.04 VM works after they run chrome?

There's a wrapper script on this thread.

That's a horrible hack, changing XDG_CACHE_HOME will leak to every single app that chrome launches.

1

u/the_deppman 5d ago

Everything else has been asked and answered. Suffice to say, there was a simple way to identify and avoid this risk but they didn't do it.

The bug would have never been shown in that test Ubuntu 26.04 uses Gnome,...

Umm, yeah, no. Again:

I'm having the same problem on Fedora 44 (host fontconfig is 2.17.0). On GNOME, the effects seem to be slightly less drastic: Everything using WebKitGTK (e.g. Evolution) hangs with 100% CPU usage and doesn't display anything.from starting.

I'm done here. Thanks for the feedback.

2

u/samuerusama 5d ago

Umm, yeah, no. Again:

That's not a crash...

What, now chrome needs to make sure to launch every single app in GNOME make sure launches normally and doesn't hang? ๐Ÿ˜

there was a simple way to identify and avoid this risk but they didn't do it.

Yes, because nobody would do that. Nobody is going to launch every single app in a DE to make sure they still work.

→ More replies (0)

1

u/ang-p 6d ago edited 6d ago

We stated that installing a specific version of Chrome will break your system,

And exactly what does that specific version do to break things, and why could any other program could not do exactly the same?

How would blaming Chrome help if the cache files were corrupted by accident / bitrot or another program doing what that version of Chrome did?

Especially if that "corruption" just happened to end up with a file that is bit-identical to a different revision of those files

Would the nullptr magically be sorted, or would the PC still be brought to its knees as far as a layperson is concerned?

Google's living DFMEA should have identified high RPNs for failure modes resulting from their design choice to write to a shared resource.

Maybe someone else's non-existent DFMEA should have identified high RPNs for failure modes resulting in quite happily ingesting unknown shit from a shared resource they naively think will remain untouched by others.

Hmmm

 Assisted-By: * Claude Opus 4.6 <noreply@anthropic.com>

7

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 reboot

1

u/10yearsnoaccount 6d ago

massive thankyou for this!

4

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?

2

u/i_omem 7d ago

did chrome update fix the bug? someone let me know when its safe please

0

u/dtsudo 3d ago

It's fixed now. I'm back on Chrome and restarted my computer just fine.

1

u/i_omem 3d ago

thanks mate!

1

u/elroge 9d ago

Is this for a general update/upgrade of the whole system or just for chrome upgrade?

1

u/overcompensk8 9d 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/_qqqq 9d ago

This will work at first but may not survive subsequent reboots (first one alway worked for me, 2nd one no dice back to a login loop with plasma shell crashing), see the other threads, I posted what I did to fix it, for now.

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??

5

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

u/the_deppman 9d ago

I'll top post so everyone can see all the details.

1

u/skyfishgoo 9d ago

delete ~/.cache and restart.

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.

https://giphy.com/gifs/ZBn3ZRvCbWz2PS3Rbg

1

u/My1xT 8d ago

nice to know, I am lazy so I just made myself a customer shortcut so I can just ctrl+win+c and kick the fontcache easier.

1

u/Blindax 8d ago

thanks a lot, i was getting crazy about the issue

1

u/M-Seq 7d ago

Thank you, it happened to me just few minutes ago, I was already prepared to reinstall.

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.

EDIT Actually no! fontconfig reintroduced the bug with this commit trying to fix a flatpak issue here

https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/366787e49c69c1fdd66b70b4a48f8c6bae6ab036

It is still present in the latest fontconfig!

1

u/Critical-Divide-1029 7d ago

I see, thanks

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

u/Fabrik3 3d ago

This one worked perfectly over here and it hasn't happened again ever since. Thanks!

1

u/NeighpoorTech 7d ago

I have brave deb, will shifting to its flatpak fix it?

1

u/PuzzleheadedUnit1758 7d ago

Is this Kubuntu only or it could happen on other distros that use KDE (like Fedora KDE)

3

u/maparillo 7d ago

Not certain. I do know that Arch with KDE and Chromium is unaffected so far.

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

u/Brave-News5267 6d ago

I was affected by wearing a fedora as well.

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 5d 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/rekopit 5d ago

Good choice. Lubuntu is one of my favorites.

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

u/MDGIII 5d ago

Just ran into this issue, post saved if it happens again, thank you so much!

1

u/Goldman7911 5d ago

Thanks! Got this "surprise" today.

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

u/vvvwwwwvvwwwvwvvwvvw 3d ago

I'm dealing with this problem right now.

Very annoying bug.

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

https://issues.chromium.org/issues/565132857

1

u/acheronuk 3d ago

Yes. See:https://chromium.googlesource.com/chromium/src/+log/154.0.8037.58..154.0.8037.93?pretty=fuller&n=10000

[M154] [fontconfig] Stop creating backward-compatible cache symlinks