Edit: I got the proprietary driver loaded. New problem: X doesn’t start.
I started using NixOS yesterday and I anticipated some trouble because I use an NVIDIA GPU. On Arch I switched to the proprietary driver; and it served me well with minimal trouble. On Nix, I sometimes see glitches, and more often than that, it just crashes. Looking at logs, I see Noveau. This is annoying because I went to the Nix Wiki and pasted in the snippet that should have enabled the proprietary drivers.
(Here)[System Crash log · GitHub] is my journalctl output after the crash.
Here’s also the output of neofetch
OS: NixOS 23.11.4761.5bf1cadb72ab (Tapir) x86_64
Host: Dell Inc. 09KPNV
Kernel: 6.1.79
Uptime: 1 hour, 5 mins
Packages: 853 (nix-system)
Shell: bash 5.2.15
Resolution: 1920x1080
DE: none+i3
WM: i3
Theme: Breeze [GTK2/3]
Icons: breeze [GTK2/3]
Terminal: kitty
Terminal Font: monospace 11.0
CPU: Intel Xeon W3550 (4) @ 3.201GHz
GPU: NVIDIA GeForce GTX 660
And here’s the snippet from my config that should have enabled the correct drivers:
# Load nvidia driver for Xorg and Wayland
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# of just the bare essentials.
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of
# supported GPUs is at:
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
open = false;
# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
};
services.xserver.videoDrivers = ["nvidiaLegacy470"];
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
I don’t even know where to begin debugging this, so any help is appreciated.