hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.24k stars 759 forks source link

Suspend resume on Nvidia crashes Alacritty #6806

Open ethanh20009 opened 1 week ago

ethanh20009 commented 1 week ago

Regression?

No

System Info and Version

System/Version info ```sh ``` Hyprland, built from branch at commit 918d8340afd652b011b937d29d5eea0be08467f5 (flake.lock: update). Date: Tue Jun 25 12:06:02 2024 Tag: v0.41.2, commits: 4886 flags: (if any) System Information: System name: Linux Node name: archlinux Release: 6.9.7-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 28 Jun 2024 04:32:50 +0000 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD103 [GeForce RTX 4080] [10de:2704] (rev a1) (prog-if 00 [VGA controller]) 11:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev cb) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ======Config-Start====== Config File: /home/ethan/.config/hypr/hyprland.conf: Read Succeeded # _ _ _ _ # | | | |_ _ _ __ _ __| | __ _ _ __ __| | # | |_| | | | | '_ \| '__| |/ _` | '_ \ / _` | # | _ | |_| | |_) | | | | (_| | | | | (_| | # |_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_| # |___/|_| # # ----------------------------------------------------- # ----------------------------------------------------- # Monitor # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/monitor.conf # ----------------------------------------------------- # Autostart # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/autostart.conf # ----------------------------------------------------- # Cursor # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/cursor.conf # ----------------------------------------------------- # Environment # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/environment.conf # ----------------------------------------------------- # Keyboard # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/keyboard.conf # ----------------------------------------------------- # Load pywal color file # ----------------------------------------------------- source = ~/.cache/wal/colors-hyprland.conf # ----------------------------------------------------- # Load configuration files # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/window.conf source = ~/dotfiles/hypr/conf/decoration.conf source = ~/dotfiles/hypr/conf/layout.conf source = ~/dotfiles/hypr/conf/misc.conf source = ~/dotfiles/hypr/conf/keybinding.conf source = ~/dotfiles/hypr/conf/windowrule.conf # ----------------------------------------------------- # Animation # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/animation.conf # ----------------------------------------------------- # Custom # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/custom.conf # ----------------------------------------------------- # Custom # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/ml4w.conf # ----------------------------------------------------- # Environment for xdg-desktop-portal-hyprland # ----------------------------------------------------- exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # ----------------------------------------------------- # Workspace Rules # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/workspace.conf # ----------------------------------------------------- # Autoload apps on start # ----------------------------------------------------- source = ~/dotfiles/hypr/conf/start-apps.conf Config File: /home/ethan/dotfiles/hypr/conf/monitor.conf: Read Succeeded source = ~/dotfiles/hypr/conf/monitors/default.conf Config File: /home/ethan/dotfiles/hypr/conf/monitors/default.conf: Read Succeeded # ----------------------------------------------------- # Monitor Setup # name: "Default" # ----------------------------------------------------- monitor=DP-1,highrr,2560x250,1 monitor=DP-2,highrr,0x0,1,vrr,2 Config File: /home/ethan/dotfiles/hypr/conf/autostart.conf: Read Succeeded # ----------------------------------------------------- # Autostart # ----------------------------------------------------- # Setup XDG for screen sharing exec-once = ~/dotfiles/hypr/scripts/xdg.sh # Start Polkit exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Load Dunst Notification Manager # exec-once = dunst exec-once = swaync # Load GTK settings exec-once = ~/dotfiles/hypr/scripts/gtk.sh # Using hypridle to start hyprlock exec-once = hypridle # Or use Swayidle to start swaylock, config is ~/.config/swayidle/config # exec-once = swayidle -w # Load network manager applet # START NM APPLET # exec-once = nm-applet --indicator # END NM APPLET # Load cliphist history exec-once = wl-paste --watch cliphist store # Initialize Wallpaper Engine exec-once = ~/dotfiles/hypr/scripts/init-wallpaper-engine.sh # Start ML4W Welcome App exec-once = ~/dotfiles/hypr/scripts/ml4w-welcome-autostart.sh Config File: /home/ethan/dotfiles/hypr/conf/cursor.conf: Read Succeeded exec-once = hyprctl setcursor Bibata-Modern-Ice 24 Config File: /home/ethan/dotfiles/hypr/conf/environment.conf: Read Succeeded source = ~/dotfiles/hypr/conf/environments/nvidia.conf Config File: /home/ethan/dotfiles/hypr/conf/environments/nvidia.conf: Read Succeeded # ----------------------------------------------------- # Environment Variables # name: "Nvidia" # ----------------------------------------------------- # https://wiki.hyprland.org/Nvidia/ env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORM,wayland # env = WLR_NO_HARDWARE_CURSORS,1 env = LIBVA_DRIVER_NAME,nvidia env = XDG_SESSION_TYPE,wayland env = GBM_BACKEND,nvidia-drm env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = __GL_VRR_ALLOWED,1 # env = WLR_DRM_NO_ATOMIC,1 env = NVD_BACKEND,direct # env = ELECTRON_OZONE_PLATFORM_HINT,auto env = __GL_GSYNC_ALLOWED,1 cursor { no_hardware_cursors = true no_break_fs_vrr = true } Config File: /home/ethan/dotfiles/hypr/conf/keyboard.conf: Read Succeeded # ----------------------------------------------------- # Keyboard Layout # https://wiki.hyprland.org/Configuring/Variables/#input # ----------------------------------------------------- input { kb_layout = gb kb_variant = kb_model = kb_options = numlock_by_default = true mouse_refocus=false # For United States # kb_layout = us # kb_variant = intl # kb_model = pc105 # kb_options = follow_mouse = 1 touchpad { natural_scroll = false } sensitivity = -0.5 # -1.0 - 1.0, 0 means no modification. } # ------------ # Tablet # ------------ input { tablet { output=DP-2 left_handed=true } } Config File: /home/ethan/.cache/wal/colors-hyprland.conf: Read Succeeded $background = rgb(08031F) $foreground = rgb(dcdad9) $color0 = rgb(08031F) $color1 = rgb(1168A3) $color2 = rgb(4C6597) $color3 = rgb(B36F99) $color4 = rgb(09ABDB) $color5 = rgb(35AED5) $color6 = rgb(62D6EF) $color7 = rgb(dcdad9) $color8 = rgb(9a9897) $color9 = rgb(1168A3) $color10 = rgb(4C6597) $color11 = rgb(B36F99) $color12 = rgb(09ABDB) $color13 = rgb(35AED5) $color14 = rgb(62D6EF) $color15 = rgb(dcdad9) Config File: /home/ethan/dotfiles/hypr/conf/window.conf: Read Succeeded source = ~/dotfiles/hypr/conf/windows/default.conf Config File: /home/ethan/dotfiles/hypr/conf/windows/default.conf: Read Succeeded # ----------------------------------------------------- # General window layout and colors # name: "Default" # ----------------------------------------------------- general { gaps_in = 10 gaps_out = 14 border_size = 2 col.active_border = $color3 $color4 $color3 30deg col.inactive_border = $background layout = dwindle } Config File: /home/ethan/dotfiles/hypr/conf/decoration.conf: Read Succeeded source = ~/dotfiles/hypr/conf/decorations/default.conf Config File: /home/ethan/dotfiles/hypr/conf/decorations/default.conf: Read Succeeded # ----------------------------------------------------- # General window decoration # name: "Default" # ----------------------------------------------------- decoration { rounding = 10 blur { enabled = true size = 6 passes = 2 new_optimizations = on ignore_opacity = truegly advised to do a full system upgrade right away if your system xray = true # blurls = waybar } active_opacity = 1.0 inactive_opacity = 0.8 fullscreen_opacity = 1.0 drop_shadow = true shadow_range = 30 shadow_render_power = 3 col.shadow = rgba(0,0,0,0.6) } Config File: /home/ethan/dotfiles/hypr/conf/layout.conf: Read Succeeded # ----------------------------------------------------- # Layouts # ----------------------------------------------------- dwindle { pseudotile = true preserve_split = true } master { new_status = master } gestures { workspace_swipe = false } Config File: /home/ethan/dotfiles/hypr/conf/misc.conf: Read Succeeded # ----------------------------------------------------- # Misc settings # ----------------------------------------------------- misc { disable_hyprland_logo = true disable_splash_rendering = true } Config File: /home/ethan/dotfiles/hypr/conf/keybinding.conf: Read Succeeded source = ~/dotfiles/hypr/conf/keybindings/default.conf Config File: /home/ethan/dotfiles/hypr/conf/keybindings/default.conf: Read Succeeded # ----------------------------------------------------- # Key bindings # name: "Default" # ----------------------------------------------------- # SUPER KEY $mainMod = SUPER # Applications bind = $mainMod, RETURN, exec, ~/dotfiles/.settings/terminal.sh bind = $mainMod, B, exec, ~/dotfiles/.settings/browser.sh bind = $mainMod, period, exec, emote # Windows bind = $mainMod, Q, killactive bind = $mainMod, F, fullscreen bind = $mainMod, E, exec, ~/dotfiles/.settings/filemanager.sh bind = $mainMod, T, togglefloating bind = $mainMod SHIFT, T, exec, ~/dotfiles/hypr/scripts/toggleallfloat.sh bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d bind = $mainMod, H, movefocus, l bind = $mainMod, L, movefocus, r bind = $mainMod, K, movefocus, u bind = $mainMod, J, movefocus, d bind = $mainMod SHIFT, L, movewindow, r bind = $mainMod SHIFT, H, movewindow, l bind = $mainMod SHIFT, K, movewindow, u bind = $mainMod SHIFT, J, movewindow, d bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow bind = $mainMod CTRL, right, resizeactive, 100 0 bind = $mainMod CTRL, left, resizeactive, -100 0 bind = $mainMod CTRL, up, resizeactive, 0 -100 bind = $mainMod CTRL, down, resizeactive, 0 100 bind = $mainMod SHIFT, G, togglegroup bind = $mainMod SHIFT, P, togglesplit bind = $mainMod SHIFT, S, swapsplit # Actions bind = $mainMod, PRINT, exec, ~/dotfiles/hypr/scripts/screenshot.sh bind = $mainMod CTRL, Q, exec, wlogout bind = $mainMod SHIFT, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh bind = $mainMod CTRL, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh select bind = $mainMod, SPACE, exec, rofi -show drun -replace -i bind = $mainMod CTRL, H, exec, ~/dotfiles/hypr/scripts/keybindings.sh bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh bind = $mainMod SHIFT, R, exec, ~/dotfiles/hypr/scripts/loadconfig.sh bind = $mainMod CTRL, F, exec, ~/dotfiles/scripts/filemanager.sh bind = $mainMod CTRL, C, exec, ~/dotfiles/scripts/cliphist.sh bind = $mainMod, V, exec, ~/dotfiles/scripts/cliphist.sh bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh bind = $mainMod CTRL, S, exec, ~/dotfiles/apps/ML4W_Dotfiles_Settings-x86_64.AppImage bind = $mainMod, N, exec, swaync-client --toggle-panel bind = $mainMod SHIFT, N, exec, swaync-client --close-all bind = $mainMod CTRL + SHIFT, N, exec, swaync-client --reload-css bind = $mainMod CTRL, 0, exec, hyprctl dispatch dpms off DP-1 bind = $mainMod CTRL, 9, exec, hyprctl dispatch dpms on DP-1 # Workspaces bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 bind = $mainMod CTRL, down, workspace, empty # Fn keys bind = , XF86MonBrightnessUp, exec, brightnessctl -q s +10% bind = , XF86MonBrightnessDown, exec, brightnessctl -q s 10%- bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% bind = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bind = , XF86AudioPlay, exec, playerctl play-pause bind = , XF86AudioPause, exec, playerctl pause bind = , XF86AudioNext, exec, playerctl next bind = , XF86AudioPrev, exec, playerctl previous bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle bind = , XF86Calculator, exec, qalculate-gtk bind = , XF86Lock, exec, hyprlock bind = , XF86Tools, exec, alacritty --class dotfiles-floating -e ~/dotfiles/hypr/settings/settings.sh # Passthrough SUPER KEY to Virtual Machine bind = $mainMod, P, submap, passthru submap = passthru bind = SUPER, Escape, submap, reset submap = reset # Custom remap input { # kb_options = caps:swapescape } Config File: /home/ethan/dotfiles/hypr/conf/windowrule.conf: Read Succeeded source = ~/dotfiles/hypr/conf/windowrules/default.conf Config File: /home/ethan/dotfiles/hypr/conf/windowrules/default.conf: Read Succeeded # ----------------------------------------------------- # Window rules # ----------------------------------------------------- windowrule = tile,^(Microsoft-edge)$ windowrule = tile,^(Brave-browser)$ windowrule = tile,^(Chromium)$ windowrule = float,^(pavucontrol)$ windowrule = float,^(blueman-manager)$ windowrule = float,^(nm-connection-editor)$ windowrule = float,^(qalculate-gtk)$ Config File: /home/ethan/dotfiles/hypr/conf/animation.conf: Read Succeeded source = ~/dotfiles/hypr/conf/animations/default.conf Config File: /home/ethan/dotfiles/hypr/conf/animations/default.conf: Read Succeeded # ----------------------------------------------------- # Animations # name "Default" # ----------------------------------------------------- animations { enabled = true bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 7, myBezier animation = windowsOut, 1, 7, default, popin 80% animation = border, 1, 10, default animation = borderangle, 1, 8, default animation = fade, 1, 7, default animation = workspaces, 1, 6, default } Config File: /home/ethan/dotfiles/hypr/conf/custom.conf: Read Succeeded # Add your additional Hyprland configurations here # # This is an additional key binding # bind = $mainMod CTRL, up, workspace, empty # # Example for xwayland xwayland { force_zero_scaling = true } # qt5ct environment variable # env = QT_QPA_PLATFORMTHEME,qt5ct env = MOZ_ENABLE_WAYLAND,1 Config File: /home/ethan/dotfiles/hypr/conf/ml4w.conf: Read Succeeded # ----------------------------------------------------- # ML4W configurations # ----------------------------------------------------- windowrulev2 = float,class:(com.ml4w.welcome) windowrulev2 = size 700 600,class:(com.ml4w.welcome) windowrulev2 = center,class:(com.ml4w.welcome) windowrulev2 = float,class:(ml4w-welcome.py) windowrulev2 = size 400 500,class:(ml4w-welcome.py) windowrulev2 = center,class:(ml4w-welcome.py) windowrulev2 = float,class:(com.ml4w.dotfilessettings) windowrulev2 = size 700 600,class:(com.ml4w.dotfilessettings) windowrulev2 = move 10% 20%,class:(com.ml4w.dotfilessettings) windowrulev2 = float,class:(ml4w-dotfiles-settings.py) windowrulev2 = size 400 500,class:(ml4w-dotfiles-settings.py) windowrulev2 = move 10% 20%,class:(ml4w-dotfiles-settings.py) windowrulev2 = float,class:(dotfiles-floating) windowrulev2 = size 1000 800,class:(dotfiles-floating) windowrulev2 = center,class:(dotfiles-floating) env = APPIMAGELAUNCHER_DISABLE,1 Config File: /home/ethan/dotfiles/hypr/conf/workspace.conf: Read Succeeded # ----------------------------------------------------- # Workspace config # ----------------------------------------------------- workspace = 1, monitor:DP-2, default: true workspace = 2, monitor:DP-2 workspace = 3, monitor:DP-2 workspace = 4, monitor:DP-2 workspace = 5, monitor:DP-2 workspace = 6, monitor:DP-1 workspace = 7, monitor:DP-1 workspace = 8, monitor:DP-1 workspace = 9, monitor:DP-1 workspace = 10, monitor:DP-1 Config File: /home/ethan/dotfiles/hypr/conf/start-apps.conf: Read Succeeded exec-once=[workspace 1 silent] ~/dotfiles/.settings/terminal.sh exec-once=[workspace 2 silent] ~/dotfiles/.settings/browser.sh exec-once=[workspace 6 silent] webcord ======Config-End========

Description

When I resume from suspend, I notice my alacritty client I've had open is no longer there where I had it open before I suspended the system. This is particularly bad in cases where I have unsaved work editing files and suspend causes those changes to be lost. Looking through logs I see Alacritty crashes on resume. I believe this to be an Nvidia specific issue as the issue does not occur on my amd radeon based system. Using Nvidia drivers below:

local/cuda 12.5.0-1
    NVIDIA's GPU programming toolkit
local/egl-wayland 2:1.1.13-2
    EGLStream-based Wayland external platform
local/lib32-nvidia-utils 555.58.02-1
    NVIDIA drivers utilities (32-bit)
local/libnvidia-container 1.15.0-1
    NVIDIA container runtime library
local/libva-nvidia-driver 0.0.12-1
    VA-API implementation that uses NVDEC as a backend
local/libvdpau 1.5-3
    Nvidia VDPAU library
local/libxnvctrl 555.58.02-1
    NVIDIA NV-CONTROL X extension
local/nvidia-container-toolkit 1.15.0-2
    NVIDIA container toolkit
local/nvidia-dkms 555.58.02-1
    NVIDIA drivers - module sources
local/nvidia-settings 555.58.02-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 555.58.02-1
    NVIDIA drivers utilities
local/opencl-nvidia 555.58.02-1
    OpenCL implemention for NVIDIA

How to reproduce

On Nvidia system: Open alacritty client, suspend system, wake system and login.

Crash reports, logs, images, videos

coredumpctl output alacritty.txt

in journalctl alacritty-journal.txt

zjeffer commented 1 week ago

Have you followed this section of the Arch wiki's Nvidia/TIips_and_tricks article? https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend

ethanh20009 commented 1 week ago

Yes, using the following parameters

cat /etc/modprobe.d/nvidia.conf
options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x3; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"

cat /etc/modprobe.d/nvidia-fbdev.conf
options nvidia_drm fbdev=1

cat /etc/modprobe.d/nvidia-gpu-firmware.conf
options nvidia NVreg_EnableGpuFirmware=0

cat /etc/modprobe.d/nvidia-power-management.conf
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp

cat /etc/modprobe.d/blacklist.conf
install i915 /usr/bin/false
install intel_agp /usr/bin/false
install viafb /usr/bin/false
install radeon /usr/bin/false
install amdgpu /usr/bin/false

in boot loader entry:

title   Arch Linux (linux)
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root=PARTUUID=fc<...> zswap.enabled=0 rw rootfstype=ext4 acpi_osi=! "acpi_osi=Windows 2009" mem_sleep_default=s2idle nvidia_drm.modeset=1 nvidia.NVreg_PreserveVideoMemoryAllocations=1

I have enabled nvidia suspend service and nvidia resume service. I'm not using nvidia-persistanced service.