Hello im using an rtx4070 in my desktop and sometimes trying to resume from sleep fails. This tends to happen only when using gnome with gdm. I tried running sddm and the problem went away. Id prefer to stick with gdm just to keep my laptop and desktop running the same login manager as the laptop is running all amd and doesn’t have the issue. If i cant fix the issue on gdm can yall also recommend an alternative dm/login manager. thanks
Im using gdm and then niri or gnome as a secondary de
the issue presents only with gdm auto suspend on login or with gnome atleast to my knowledge systemctl suspend on niri works without issue.
gnome shell version 47.3
uname -a result Linux deskbox 6.12.12 #1-NixOS SMP PREEMPT_DYNAMIC Sat Feb 1 17:39:40 UTC 2025 x86_64 GNU/Linux
nvidia-smi result: NVIDIA-SMI 570.86.16
below is my nvidia.nix
type or p{
config,
lib,
...
}: {
# Add an option to enable or disable gaming-related configurations
options = {
nvidia.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable nvidia.";
};
};
config = lib.mkIf config.nvidia.enable {
#nvidia and open gl
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
#enable nvidia
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
# 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 = true;
# 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 = true;
# 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.
};
};
}
gnome and gdm configuration
{
config,
pkgs,
lib,
...
}: {
options = {
gnome.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "enable gnome";
};
};
config = lib.mkIf config.gnome.enable {
environment.gnome.excludePackages = with pkgs; [
gnome-tour
gnome-maps
epiphany # web browser
geary # email reader. Up to 24.05. Starting from 24.11 the package name is just geary.
evince # document viewer
gnome-music
totem
];
environment.systemPackages = with pkgs; [
adwaita-icon-theme-legacy
adwaita-icon-theme
gnome-tweaks
];
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
};
}
I get these errors sometimes trying to resume from sleep but i dont think these are the cause as when i would use kde with sddm i would get the same errors sometimes but pressing enter again or just waiting would allow then computer to resume successfully. As well with my setup currently using gdm for display manager and gnome and niri for de and wm depending on the day it will wake and show the text below but it fits the space of 1920*1080 leaving a black border while the tty(i think its a tty i fear i dont know too much about linux in general) and the only solution is to reboot.