I am using NixOS with plasma 6 running Wayland. I am getting a lot of issues with games and Electron apps not working at all.
This is my current Nvidia.nix file that I’m importing.
{ config, lib, pkgs, ... }:
{
options = {
# Define any custom options here if needed.
};
config = {
boot.kernelParams = [ "nvidia_drm.fbdev=1" "nvidia-drm.modeset=1" "module_blacklist=i915" ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
environment.systemPackages = with pkgs; [
libva-utils
vdpauinfo
vulkan-tools
vulkan-validation-layers
libvdpau-va-gl
egl-wayland
wgpu-utils
mesa
libglvnd
nvtop
nvitop
libGL
];
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
forceFullCompositionPipeline = true;
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.production;
};
};
}
Any advice?
There are some known issues running Electron based apps on Wayland
e.g: All nividia drivers crash or do not work - #3 by KeifferMonster
IldenH
3
Try using the 555 driver.
https://wiki.nixos.org/wiki/Nvidia#Determining_the_correct_driver_version
It is currently under the beta package.
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
555 is now out of beta, and landing in NixOS unstable as nvidiaPackages.latest
shortly:
https://nixpk.gs/pr-tracker.html?pr=322963
IldenH
5
The wiki should be updated when this happens. Currently it doesn’t even mention the “latest” option.
1 Like
How do I define 555 as the package I want if I am on NixOS 24.05?
I have been using nix for a while now but have never touched flakes or anything like that
You can use any driver version even before it has reached nixpkgs. In this case:
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.58";
sha256_64bit = "sha256-bXvcXkg2kQZuCNKRZM5QoTaTjF4l2TtrsKUvyicj5ew=";
sha256_aarch64 = "sha256-7XswQwW1iFP4ji5mbRQ6PVEhD4SGWpjUJe1o8zoXYRE=";
openSha256 = "sha256-hEAmFISMuXm8tbsrB+WiUcEFuSGRNZ37aKWvf0WJ2/c=";
settingsSha256 = "sha256-vWnrXlBCb3K5uVkDFmJDVq51wrCoqgPF03lSjZOuU8M=";
persistencedSha256 = "sha256-lyYxDuGDTMdGxX3CaiWUh1IQuQlkI2hPEs5LI20vEVw=";
};
1 Like
This did it. Everything seems to work great now on 555. Thanks!
For reference 555.58
is latest
in NixOS unstable
branch atm.
{ config, ... }:
let
unstable = import <nixos-unstable> {
config = {
allowUnfree = true;
};
};
in
{
boot.kernelPackages = unstable.linuxPackages_latest;
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
...
};
}