Chromium Blank Pages

So, around a week ago, I installed NixOS and used the default browser (pkgs.firefox) then had some trouble with it and then got Chromium. Chromium worked fine… at least for a day when suddenly something like this happened.


On other websites, this effect is much worse. To the point of the entire page being blank.

That was a bit annoying, so I tried using base pkgs.google-chrome-stable, which worked fine, until I started to use Electron apps (specifically pkgs.revolt-desktop) (which obviously use Chromium under the hood), which bugged out the same way Chromium did.

I have already tried setting environment.sessionVariables.NIXOS_OZONE_WL to 1.
I want to be able to find a fix for this. I am on an AMD GPU with an Intel CPU.

1 Like

I had never tried installing Electron itself, and for some reason that fixed both Chromium and pkgs.revolt-desktop. My new question is why does that fix Chromium, what does Chromium have to do with Electron? I believe Electron only uses the Chromium executable not the other way around.

The bug came back again. I tried making an Electron app for testing, and it worked fine. Other than that, nothing seems to be working. Except for VS Code which for some reason works correctly. Here is its user agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.78.2 Chrome/108.0.5359.215 Electron/22.5.2 Safari/537.36.
Here is the default Electron app’s user agent (default electron app works fine): Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.106 Electron/25.1.1 Safari/537.36.
Here is Chromium’s user agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36'.
I cannot seem to get pkgs.revolt-desktop’s user agent however.

I had this issue recently with Brave and Chromium. Closing the browsers and deleting the files in the GPUCache sorted things for me:

  • ~/.config/BraveSoftware/Brave-Browser/Default/GPUCache/
  • ~/.config/chromium/Default/GPUCache/
5 Likes

I just tried this solution, it worked very well for me. Thank you, was the actual cause just corrupted GPU cache?

The root cause is a bug introduced in a recent Mesa release. Here’s all the details which include links to upstream bugs:

Thanks @vloddot & @Wimpy ,
I just hit the same issue and this resolved it.
(Shout out to Linux Matters podcast, Martin discussing NixOS is part of the reason I recently switched to it).

1 Like

@akgrant Thanks for listening :smile:

Linux Matters episode 7 was just released, and I make a case for NixOS :snowflake: as an immutable Desktop Linux for anyone.

1 Like

Had this bug with google-chrome in Jan 2024, and solved by

rm -rf ~/.config/google-chrome/Default/GPUCache/

I had the same issue both with the google-chrome and the chromium packages, and can confirm that the proposed solution or removing the GPUCache works.

Minor addition: that Default is your Chrome profile. If you have several Chrome profiles (e.g. Profile 1), remove the GPUCache for all of them.