From 6da1bd7e5438cd449eddf5f35cfc7d75bd7cc649 Mon Sep 17 00:00:00 2001 From: Timon Schelling Date: Tue, 15 Oct 2024 15:01:53 +0000 Subject: [PATCH] fix: add workaround for nvidia kernel module Kernel parameter `initcall_blacklist=simpledrm_platform_driver_init` is used to prevent the driver from hitting the renamed (and thus not linked) codepath. Remove after https://github.com/NVIDIA/open-gpu-kernel-modules/pull/692 and similar are merged and build in nixpkgs-unstable. This also disables tty output and thus hides boot logs. --- src/system/hardware/gpu/nvidia/system.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/system/hardware/gpu/nvidia/system.nix b/src/system/hardware/gpu/nvidia/system.nix index 87f0c6f..179d0f6 100644 --- a/src/system/hardware/gpu/nvidia/system.nix +++ b/src/system/hardware/gpu/nvidia/system.nix @@ -10,7 +10,15 @@ in }; config = lib.mkIf cfg.enable { services.xserver.videoDrivers = [ "nvidia" ]; - boot.kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" "nvidia_drm.fbdev=1" ]; + boot.kernelParams = [ + "nvidia.NVreg_PreserveVideoMemoryAllocations=1" + "nvidia_drm.fbdev=1" + + # TODO: remove after https://github.com/NVIDIA/open-gpu-kernel-modules/pull/692 + # and similar are merged and build in nixpkgs-unstable. + # WARNING: this disables tty output and thus hides boot logs. + "initcall_blacklist=simpledrm_platform_driver_init" + ]; hardware.nvidia = { modesetting.enable = true; powerManagement = {