Hyprland: Crash when waking up laptop from suspend while using external monitor.

Started getting these crashes after getting an external monitor (I disabled laptop screen if that matters). I don’t know exactly when the crash happens, but when I wake from suspend I see crash in tty, so it’s probably some time after my laptop suspends or right before waking it up. hyprlandCrashReport525.txt

_Originally posted by @rszyma in https://github.com/hyprwm/Hyprland/issues/2745#issuecomment-1663883384_


I’m reposting this in a new issue, because crash reports I get are consistent with their content, while the 2 other crash reports in #2745 are entirely different. Also steps to reproduce slightly different in my case.

Some other crash reports (notice that they all have similar log tail): hyprlandCrashReport65117.txt hyprlandCrashReport741.txt hyprlandCrashReport744.txt hyprlandCrashReport574.txt


Some additional notes:

  • The crash sometimes happens, sometimes not. I’d say that it’s about 70% of times when leaving my laptop suspended overnight.
  • I’ve tried systemctl suspend and then waking up immediately, but then the crash don’t show up. From my testing it seems that the crash can happen only after my laptop is suspended when it’s asleep for at least ~1 minute.
  • The monitor I use is this. I haven’t tried reproducing with other monitors.
  • The crash no longer happens when I enable laptop monitor.

Monitors config I use:

monitor=eDP-1,disable
monitor=HDMI-A-1,1920x1080@180,0x0,1

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 5
  • Comments: 20 (12 by maintainers)

Most upvoted comments

can yall test -git from today

Works great, from my side as well! Thank you @vaxerski. However, Swaylock is still crashing from time to time, but i don’t think this is a hyprland issue.

Will do in 2 hours, and let you know

Same thing can be observed on my setup. I have two external monitors and additionally run kanshi to auto enable/disable my monitors.

I also added exemplary two reports hyprlandCrashReport152128.txt hyprlandCrashReport181356.txt


Some additional notes:

The crash sometimes happens, sometimes not. I’d say that it’s about 70% of times when leaving my laptop suspended overnight.

Same behavior

I’ve tried systemctl suspend and then waking up immediately, but then the crash don’t show up. From my testing it seems that the crash can happen only after my laptop is suspended when it’s asleep for at least ~1 minute.

Same behavior

The monitor I use is this. I haven’t tried reproducing with other monitors.

I use one LG Ultrawide 32 Inch (via usbc) and one vertical LG 28 Inch (slightly different refresh rates)

The crash no longer happens when I enable laptop monitor.

Not tested

Kanshi config

profile home {
	output "LG Electronics LG ULTRAWIDE 0x0004A32C" mode 3440x1440@59.973Hz position 0,0
	output "LG Electronics LG ULTRAGEAR 110MALFNX072" mode 2560x1440@59.951Hz 
  output "eDP-1" disable
}


profile undocked {
    output "eDP-1" enable position 0,0
}

And in addition i use this shell script to enable my laptop monitor on disconnect (if I do that via kanshi hyprland crashes as well)

#!/bin/sh

handle() {
  if [ "$1" = "monitorremoved>>eDP-1" ]; then
    return
  fi

  connected_mons=$(hyprctl monitors | grep Monitor | wc -l)
  case $1 in
    monitoradded*) echo "Monitor added $1, now $connected_mons" ;;
    monitorremoved*)
      echo "Monitor removed $1, now $connected_mons"
      hyprctl keyword monitor eDP-1,$mon2info
      ;;
  esac
}

socat -U - UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done

In my hyprland config the monitors are setup in the following way:

monitor=,preferred,auto,auto
monitor=desc:LG Electronics LG ULTRAWIDE 0x0004A32C, 3440x1440@59.973, 0x0, 1.0 # ULTRAWIDE HOME
monitor=desc:LG Electronics LG ULTRAGEAR 110MALFNX072, 2560x1440@59.951, 3440x-550, 1.0, transform,3 #VERTICAL HOME

env = mon2info,3840x2160@60.007000,0x0,2.5 # needed for enabling

Maybe this further helps to track down the issue.

@CoolnsX same here