I have been having an issue for the past little bit where whenever I shutdown or reboot my Nixos installation, it will shut down like normal until shutdown is reached, where the screen will go black but the computer will stay running indefinitely, doing a long beep once every 30 seconds or so.
When I check journalCTL I don’t see anything suspicious, but then again I am newer to Linux and Nixos. I have tried changing the driver for the GPU, as well as changing the nix-channel to older releases to try and see if the version was the issue. I am usually on nix-unstable. I have also tried changing different Nvidia options in the config as outlined in the troubleshooting area of the Nvidia page on the Nixos wiki. All of this was to no avail. I know it is the Nvidia driver, as when I comment out services.xserver.videoDrivers = ["nvidia"]; I can sucessfully shutdown my system on the next shutdown.
I am currently running a Asus 5070 GPU, AMD Ryzen 9 5900XT (16 core, 32 thread), Gigabyte B450M DS3H V2 motherboard, and 16Gb corsair DDR4 DRAM.
I have posted about this issue previously, but I resolved it before the error was fixed due to a personal confusion. I have seen a few posts of similar behavior on other forums, but they were also unresolved. Any help or ideas on why this is happening would be greatly appreciated.
Here is my config minus user information.( I created a new config just to try and debug)
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
#boot.loader.systemd-boot.enable = true;
nixpkgs.config.allowUnfree = true;
# boot.loader.grub.efiSupport = true;
# boot.loader.grub.efiInstallAsRemovable = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
boot.loader.grub.useOSProber = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware.nvidia.nvidiaPersistenced = true;
# networking.hostName = "nixos"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
hardware = {
# Most wayland compositors need this
nvidia.modesetting.enable = true;
};
hardware.graphics = {
enable = true;
#enable32Bit = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
nixpkgs.config.nvidia.acceptLicense = true;
hardware.nvidia = {
#enabled = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "595.71.05";
sha256_64bit = "sha256-NiA7iWC35JyKQva6H1hjzeNKBek9KyS3mK8G3YRva4I=";
sha256_aarch64 = "sha256-XzKloS00dFKTd4ATWkTIhm9eG/OzR/Sim6MboNZWPu8=";
openSha256 = "sha256-Lfz71QWKM6x/jD2B22SWpUi7/og30HRlXg1kL3EWzEw=";
settingsSha256 = "sha256-mXnf3jyvznfB3OfKd657rxv0rYHQb/dX/Riw/+N9EKU=";
persistencedSha256 = "sha256-Z/6IvEEa/XfZ5F5qoSIPvXJLGtscYVqjFxHZaN/M2Ts=";
};};
#boot.kernelParams = [ "nvidia-drm.fbdev=1" ];
boot.initrd.kernelModules = ["nvidia"];
boot.extraModulePackages = [config.boot.kernelPackages.nvidia_x11];
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
services.pulseaudio.enable = true;
# OR
services.pipewire = {
enable = false;
# pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
#programs.firefox.enable = true;
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
librewolf
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "24.11"; # Did you read the comment?
}
And journalctl from last shutdown: