GNOME Wayland on NVIDIA?

Hello folks!

I got a new laptop that happens to have dual GPUs: Intel and NVIDIA:

nix shell nixpkgs#pciutils -c lspci | grep -E 'Graphics|GPU'
00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe Graphics] (rev 04)
00:06.0 PCI bridge: Intel Corporation Raptor Lake PCIe 4.0 Graphics Port
03:00.0 3D controller: NVIDIA Corporation GA107GLM [RTX A500 Laptop GPU] (rev a1)

I’ve read there have been a lot of improvements recently in NVIDIA, even open source upstream drivers! I managed to set it up with PRIME in NixOS 24.11. I can even log into a GNOME Wayland session! (That’s much more than what I could do years ago).

However, when I’m on that GNOME Wayland NVIDIA session, I cannot open any apps, except some that automatically work on XWayland if needed (brave, vscode, firefox).

If I open GNOME native apps such as kgx or gnome-control-center from the app launcher or from the command prompt at Alt+F2, they won’t open. Instead, they’ll log this error message in the journal:

WL: error in client communication

So, it seems like I’m a very small step away from getting an actual working session, but I still have to go back to X11. And I don’t like X11 because I lose 3-finger touchpad shortcuts that I use a lot in Wayland.

So do you guys have any clues on how to fix that error?

Thanks!

This seems similar to Problem with Wayland after nvidia install and configuration(kinda) - #10 by eljamm to me. Try updating the driver version:

hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
  version = "565.77"; # latest
  sha256_64bit = "sha256-CnqnQsRrzzTXZpgkAtF7PbH9s7wbiTRNcM0SPByzFHw=";
  sha256_aarch64 = "sha256-LSAYUnhfnK3rcuPe1dixOwAujSof19kNOfdRHE7bToE=";
  openSha256 = "sha256-Fxo0t61KQDs71YA8u7arY+503wkAc1foaa51vi2Pl5I=";
  settingsSha256 = "sha256-VUetj3LlOSz/LB+DDfMCN34uA4bNTTpjDrb6C6Iwukk=";
  persistencedSha256 = "sha256-wnDjC099D8d9NJSp9D0CbsL+vfHXyJFYYgU3CwcqKww=";
};

The update was backported to 24.11 in #363040, so after it reaches the nixos-24.11 branch, you can just delete the changes above.

1 Like

Amazing! So it was just a matter of updating the driver.

I applied this fix (just because it was shorter) and it worked: Applications (gnome related possibly) don't work after update · Issue #353990 · NixOS/nixpkgs · GitHub

1 Like