Google Chrome not working after recent nixos-rebuild

Hi. Today I have run nixos-rebuild --switch and since then Google Chrome is not working. Im using hyprland and if I try to open chrome, I get only transparent window and errors in console:

 rstasta@nixos <U+E0B0> ~ <U+E0B0><U+E0B0><U+E0B0><U+E0B0> ♥ 10:07 <U+E0B0> google-chrome-stable
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
libva error: /run/opengl-driver/lib/dri/nvidia_drv_video.so init failed
[6292:6541:0420/100802.320556:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
[6292:6541:0420/100802.320621:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
[6292:6541:0420/100802.320661:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
Created TensorFlow Lite XNNPACK delegate for CPU.
Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors (tensor#141 is a dynamic-sized tensor).

UPDATE: After some test, working and broken version of system (nixpgs) have identical log in console, so none of those errors seem to matter

Couple of questions:

  • Does it work outside of Hyprland?
  • Does it work on other chrome-based browsers?
  • Appears to be related to Nvidia drivers from the looks of it. Were these updated by chance? Maybe a change to an earlier version is something to try?
  • It basically tells you to switch to open source nouveau drivers. Now while you might not want to run these permanently, does this actually work?

Just a few ideas to figure out who is actually the culprit here: Hyprland, Chrome, Nvidia or something else?

That problem with nouveau drivers is not the problem, it was there some time now, also the UPower. After some investigating, last nixpkgs that are working is this commit:

The next one:

is not for some reason (sorry, Im still learning nixos so Im not an expert). Also in the working version, the log after starting chrome is identical to the broken one, so none of those errors seem to matter

Also not working under Gnome

I’m having the same issue, it seems like the latest google chrome package is defaulting to x11 even with the “Preferred Ozone platform” flag set to wayland. Manually launching chrome with google-chrome-stable --ozone-platform=wayland makes it work properly, but I just rolled back to an earlier generation that had an older chrome package.

1 Like

Good, at least Im not alone in this? Is there something we can do? Report something somewhere so it is fixed and I don’t need to have nixpkgs pinned to specific commit?

Since as I said I am still newbie in nixos, is there some way to make system automatically run Chrome with that --ozone-platform=wayland flag? I mean when I run it from dmenu for example?

It seems there is an upstream issue causing this

~~ It looks like NIXOS_OZONE_WL = "1"; doesn’t set "--ozone-platform=wayland" for chrome anymore. ~~

I overrode my package for google-chome to fix it for now.

home.packages = with pkgs; [
(google-chrome.override {
      commandLineArgs = [
        "--enable-features=UseOzonePlatform"
        "--ozone-platform=wayland"
      ];
    })
 ];

Edit: Added nix-package issue `google-chrome` rendering broken on wayland, version M124 (124.0.6367.60) · Issue #306010 · NixOS/nixpkgs · GitHub

2 Likes