A few days ago, I switched my desktop to NixOS from Arch Linux. On Arch, I was using a NVidia GTX 1070 with an AMD Ryzen 7 5700G iGPU. I was able to use X11 with LeftWM using the NVidia proprietary drivers.
After switching to NixOS I installed the nvidia proprietary drivers and my second screen (the one connected to the motherboard) stopped working. I’ve tried various desktop environments and window managers, yet nothing works. The only luck I’ve had was KDE Plasma 6 with wayland. With this setup both monitors work.
I really need my nvidia drivers to work, since I use this PC for gaming.
A brief (yet non-exhaustive) overview of what I’ve tried.
-
Enabling/disabling nvidia DRM (using kernel command line params as well as
hardware.nvidia.modesetting.enable
) -
I’ve set the xserver videoDrivers to [“nvidia”], [“nvidia” “modestting”], [“nvidia” “amdgpu”] and many more.
-
I’ve switched kernels and nvidia driver versions.
-
I’ve tried Wayland and X11. As I said, I only got my second monitor to work with KDE Plasma 6 on Wayland. On X11 nothing seems to work.
A list of the DM/WMs I’ve tried: GNOME, Plasma 6, LeftWM, Hyprland, awesome, i3, sway.
The relevant configuration parameters I have as of now:
...
boot.kernelParams = [ "nvidia_drm.fbdev=1" "nvidia_drm.modeset=1" ];
...
hardware.cpu.amd.updateMicrocode = true;
hardware.enableRedistributableFirmware = true;
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
uname -a: Linux nixos 6.6.32-hardened1 #1-NixOS SMP PREEMPT_DYNAMIC Sat May 25 14:22:56 UTC 2024 x86_64 GNU/Linux
$ lspci | grep -E 'VGA|3D'
01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)
08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c8)