hyprwm / Hyprland

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

segfault when unplugging monitor #3067

Open primalmotion opened 1 year ago

primalmotion commented 1 year ago

Hyprland Version

Hyprland, built from branch main at commit 90c03e5bd2204ba6d1a0167c68f65b7a9231bef4 dirty (master: layout resize makes the wrong size changes (3064)). Tag: v0.28.0-89-g90c03e5b

Bug or Regression?

Regression

Description

Segfault when unplugging an external monitor

How to reproduce

Unplug the monitor

Crash reports, logs, images, videos

I can't attach it, github says something went really wrong.. pasting

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Well this is awkward.

Hyprland received signal 11 (Segmentation fault)

Version: 90c03e5bd2204ba6d1a0167c68f65b7a9231bef4
Tag: v0.28.0-89-g90c03e5b

System info:
    System name: Linux
    Node name: axion
    Release: 6.4.11-arch2-1
    Version: #1 SMP PREEMPT_DYNAMIC Sat, 19 Aug 2023 15:38:34 +0000

GPU:
    00:02.0 VGA compatible controller [0300]: Intel Corporation Comet Lake UHD Graphics [8086:9bca] (rev 04) (prog-if 00 [VGA controller])
    DeviceName: VGA compatible 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://bugs.archlinux.org/"
    PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
    LOGO=archlinux-logo

Backtrace:
    #0 | Hyprland(_Z12getBacktracev+0x62) [0x55af1cbfa4d2]
        ??
        ??:0
    #1 | Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x791) [0x55af1cbca651]
        ??
        ??:0
    #2 | Hyprland(_Z25handleUnrecoverableSignali+0x44) [0x55af1cb5bf94]
        ??
        ??:0
    #3 | /usr/lib/libc.so.6(+0x3e710) [0x7f675d63e710]
        ??
        ??:0
    #4 | /usr/lib/libwlroots.so.12032(+0x9a269) [0x7f675e2e2269]
        ??
        ??:0
    #5 | /usr/lib/libwayland-server.so.0(+0xb9ba) [0x7f675e2009ba]
        ??
        ??:0
    #6 | /usr/lib/libwayland-server.so.0(wl_client_destroy+0xab) [0x7f675e2010db]
        ??
        ??:0
    #7 | /usr/lib/libwayland-server.so.0(+0xc60e) [0x7f675e20160e]
        ??
        ??:0
    #8 | /usr/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7f675e200ae2]
        ??
        ??:0
    #9 | /usr/lib/libwayland-server.so.0(wl_display_run+0x27) [0x7f675e2012d7]
        ??
        ??:0
    #10 | Hyprland(main+0xac6) [0x55af1cb4b4f6]
        ??
        ??:0
    #11 | /usr/lib/libc.so.6(+0x27cd0) [0x7f675d627cd0]
        ??
        ??:0
    #12 | /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f675d627d8a]
        ??
        ??:0
    #13 | Hyprland(_start+0x25) [0x55af1cb5be35]
        ??
        ??:0

Log tail:
[LOG]  [hookSystem] New hook event registered: moveWorkspace
[LOG] Destroying workspace ID 3
[LOG] Removing monitor DP-1 from realMonitors
[LOG] Callback 55af1f0c20b8 -> 55af1f0c20b0,  removed.
[LOG] Callback 55af1f0c2120 -> 55af1f0c2118,  removed.
[LOG] Fading out a non-existent LS??
[LOG] LayerSurface 55af20323e80 unmapped
[LOG] Framebuffer created, status 36053
[LOG] Callback 55af203258e0 -> 55af203258d8, CWLSurface removed.
[LOG] CWLSurface 55af203258b0 called destroy()
[LOG] LayerSurface 55af20323e80 destroyed
[LOG] Callback 55af20325a98 -> 55af20325a90, layerSurface removed.
[LOG] Callback 55af20325960 -> 55af20325958, layerSurface removed.
[LOG] Callback 55af203259c8 -> 55af203259c0, layerSurface removed.
[LOG] Callback 55af20325a30 -> 55af20325a28, layerSurface removed.
[LOG] Callback 55af20325b00 -> 55af20325af8, layerSurface removed.
[LOG] LayerSurface 55af20261d70 arranged: x: 10000 y: 10000 w: 1920 h: 1080 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor eDP-1 layers arranged: reserved: 0.000000 0.000000 0.000000 0.000000
[LOG] Executing WAYLAND_DISPLAY=wayland-1 DISPLAY=:0 waybar
[LOG] Process Created with pid 2386
[LOG] Hyprctl: dispatcher exec : waybar
[LOG] Window 55af2030da20 unmapped (class neomutt)
[LOG] Unregistered late callbacks XDG
[LOG] Callback 55af2030da48 -> 55af2030da40, XDG Window Late removed.
[LOG] Callback 55af2030dbe8 -> 55af2030dbe0, XDG Window Late removed.
[LOG] Callback 55af2030dd20 -> 55af2030dd18, XDG Window Late removed.
[LOG] Callback 55af2030de58 -> 55af2030de50, XDG Window Late removed.
[LOG] Callback 55af2030ddf0 -> 55af2030dde8, XDG Window Late removed.
[LOG] Callback 55af2030dd88 -> 55af2030dd80, XDG Window Late removed.
[LOG] Callback 55af2030dec0 -> 55af2030deb8, XDG Window Late removed.
[LOG] Callback 55af2030dcb8 -> 55af2030dcb0, XDG Window Late removed.
[LOG] Framebuffer created, status 36053
[LOG] Unmapped was not focused, ignoring a refocus.
[LOG] Destroying the SubSurface tree of unmapped window 55af2030da20
[LOG] Callback 55af203106b0 -> 55af203106a8, Subsurface removed.
[LOG] Callback 55af203105e0 -> 55af203105d8, Subsurface removed.
[LOG] Callback 55af20310648 -> 55af20310640, Subsurface removed.
[LOG] Callback 55af20310198 -> 55af20310190, SurfaceTreeNode removed.
[LOG] Callback 55af20310200 -> 55af203101f8, SurfaceTreeNode removed.
[LOG] Callback 55af20310130 -> 55af20310128, SurfaceTreeNode removed.
[LOG] SurfaceTree Node removed
[LOG] Callback 55af2030e060 -> 55af2030e058, Toplevel removed.
[LOG] Callback 55af2030dff8 -> 55af2030dff0, Toplevel removed.
[LOG] Callback 55af2030e0c8 -> 55af2030e0c0, Toplevel removed.
[LOG] Callback 55af2030e270 -> 55af2030e268, CWLSurface removed.
[LOG] CWLSurface 55af2030e240 called destroy()
[LOG] Callback 55af2030db18 -> 55af2030db10, CWindow removed.
[LOG] Window 55af2030da20 destroyed, queueing. (class )
[LOG] Callback 55af2030dab0 -> 55af2030daa8, XDG Window removed.
[LOG] Callback 55af2030db80 -> 55af2030db78, XDG Window removed.
vaxerski commented 1 year ago

is this a regression? is this 100% reproducible or random?

primalmotion commented 1 year ago

it's a regression and 100% reproducible. this does not happen on latest tag

vaxerski commented 1 year ago

image ok then

git bisect please

primalmotion commented 1 year ago

This is what I found with bisect as the first bad commit

37128bfd43a3d86d270c09e34f18fe4df48c6b35

vaxerski commented 1 year ago

thanks bae

khaneliman commented 1 year ago

thanks for reporting... i have been getting the segfault crashing hyprland recently too whenever i wake my displays from sleep. i need to see if i can get debug mode overlay working so i can actually report stuff easier...

vaxerski commented 1 year ago

patch.txt try this. If you're still crashing, please also add env = HYPRLAND_TRACE,1 to your config and provide a crash report

primalmotion commented 1 year ago

the patch seems to fix the crash when I unplug the monitor.

However, in my testing, it crashed twice when unplugging the monitor. I then tried to activate HYPRLAND_TRACE but I can't reproduce since. So I only have a non-trace enabled crash report for that

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
*thud*

Hyprland received signal 11 (Segmentation fault)

Version: 870471dd96724474869d2e648b623c17df12fb57
Tag: v0.28.0-95-g870471dd

System info:
    System name: Linux
    Node name: axion
    Release: 6.4.11-arch2-1
    Version: #1 SMP PREEMPT_DYNAMIC Sat, 19 Aug 2023 15:38:34 +0000

GPU:
    00:02.0 VGA compatible controller [0300]: Intel Corporation Comet Lake UHD Graphics [8086:9bca] (rev 04) (prog-if 00 [VGA controller])
    DeviceName: VGA compatible 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://bugs.archlinux.org/"
    PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
    LOGO=archlinux-logo

Backtrace:
    #0 | ./build/Hyprland(_Z12getBacktracev+0x48) [0x555dc878fe58]
        ??
        ??:0
    #1 | ./build/Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x76e) [0x555dc875f8be]
        ??
        ??:0
    #2 | ./build/Hyprland(_Z25handleUnrecoverableSignali+0x3c) [0x555dc86f65bc]
        ??
        ??:0
    #3 | /usr/lib/libc.so.6(+0x3e710) [0x7f8ed063e710]
        ??
        ??:0
    #4 | /usr/lib/libwayland-server.so.0(+0xafe2) [0x7f8ed14a1fe2]
        ??
        ??:0
    #5 | /usr/lib/libffi.so.8(+0x74f6) [0x7f8ed038e4f6]
        ??
        ??:0
    #6 | /usr/lib/libffi.so.8(+0x3f5e) [0x7f8ed038af5e]
        ??
        ??:0
    #7 | /usr/lib/libffi.so.8(ffi_call+0x123) [0x7f8ed038db73]
        ??
        ??:0
    #8 | /usr/lib/libwayland-server.so.0(+0x8ada) [0x7f8ed149fada]
        ??
        ??:0
    #9 | /usr/lib/libwayland-server.so.0(+0xd180) [0x7f8ed14a4180]
        ??
        ??:0
    #10 | /usr/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7f8ed14a2ae2]
        ??
        ??:0
    #11 | /usr/lib/libwayland-server.so.0(wl_display_run+0x27) [0x7f8ed14a32d7]
        ??
        ??:0
    #12 | ./build/Hyprland(main+0xa91) [0x555dc86e65f1]
        ??
        ??:0
    #13 | /usr/lib/libc.so.6(+0x27cd0) [0x7f8ed0627cd0]
        ??
        ??:0
    #14 | /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f8ed0627d8a]
        ??
        ??:0
    #15 | ./build/Hyprland(_start+0x25) [0x555dc86f6465]
        ??
        ??:0

Log tail:
[LOG] arrangeMonitors: 2 to arrange
[LOG] arrangeMonitors: eDP-1 explicit [10000.00, 10000.00]
[LOG] arrangeMonitors: DP-2 explicit [9230.00, 8560.00]
[LOG] arrangeMonitors: eDP-1 xwayland [0, 0.00]
[LOG] arrangeMonitors: DP-2 xwayland [1920, 0.00]
[LOG] Monitor DP-2 layers arranged: reserved: 0.000000 0.000000 0.000000 0.000000
[LOG] Monitor DP-2 data dump: res 3440x1440@59.97Hz, scale 1.00, transform 0, pos 9230x8560, 10b 0
[LOG] Added new monitor with name DP-2 at 9230,8560 with size 3440x1440, pointer 555dc9a6a520
[LOG] New monitor: WORKSPACEID 1, exists: 0
[LOG] Monitor DP-2 layers arranged: reserved: 0.000000 0.000000 0.000000 0.000000
[LOG] Pending output DP-2 does not accept VRR.
[LOG] Applying monitor rule for eDP-1
[LOG] Setting preferred mode for eDP-1
[LOG] Monitor eDP-1 -> destroyed all render data
[LOG] arrangeMonitors: 2 to arrange
[LOG] arrangeMonitors: eDP-1 explicit [10000.00, 10000.00]
[LOG] arrangeMonitors: DP-2 explicit [9230.00, 8560.00]
[LOG] arrangeMonitors: eDP-1 xwayland [0, 0.00]
[LOG] arrangeMonitors: DP-2 xwayland [1920, 0.00]
[LOG] LayerSurface 555dcac7cfd0 arranged: x: 10000 y: 10000 w: 1920 h: 28 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 555dcac4c2f0 arranged: x: 10000 y: 10000 w: 1920 h: 1080 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor eDP-1 layers arranged: reserved: 0.000000 28.000000 0.000000 0.000000
[LOG] Monitor eDP-1 data dump: res 1920x1080@60.00Hz, scale 1.00, transform 0, pos 10000x10000, 10b 0
[LOG] LayerSurface 555dcac7cfd0 arranged: x: 10000 y: 10000 w: 1920 h: 28 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 555dcac4c2f0 arranged: x: 10000 y: 10000 w: 1920 h: 1080 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor eDP-1 layers arranged: reserved: 0.000000 28.000000 0.000000 0.000000
[LOG] Applying monitor rule for DP-2
[LOG] Setting preferred mode for DP-2
[LOG] Monitor DP-2 -> destroyed all render data
[LOG] arrangeMonitors: 2 to arrange
[LOG] arrangeMonitors: eDP-1 explicit [10000.00, 10000.00]
[LOG] arrangeMonitors: DP-2 explicit [9230.00, 8560.00]
[LOG] arrangeMonitors: eDP-1 xwayland [0, 0.00]
[LOG] arrangeMonitors: DP-2 xwayland [1920, 0.00]
[LOG] Monitor DP-2 layers arranged: reserved: 0.000000 0.000000 0.000000 0.000000
[LOG] Monitor DP-2 data dump: res 3440x1440@59.97Hz, scale 1.00, transform 0, pos 9230x8560, 10b 0
[LOG] Monitor DP-2 layers arranged: reserved: 0.000000 0.000000 0.000000 0.000000
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Allocated texture for BGTex
[LOG] Background created for monitor eDP-1
[LOG] Shaders initialized successfully.
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Allocated texture for BGTex
[LOG] Background created for monitor DP-2
[LOG] Shaders initialized successfully.
vaxerski commented 1 year ago

I've committed the patch @ 116b9a80566e7956233b39697ac78c112d514c3c

run with trace and lmk when (if) it happens again :)

primalmotion commented 1 year ago

thanks! I'll keep trace on

khaneliman commented 1 year ago

just reporting back that i had the crash after every time i came back to my desktop after dpms kicked in before that commit.. just coming back now and was able to unlock and use computer first time. so hopefully it solves my issue.

vaxerski commented 1 year ago

any news @primalmotion or can we close this

primalmotion commented 1 year ago

it's still happening, I have a trace here

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Maybe you should try dusting your PC in the meantime?

Hyprland received signal 6 (Aborted)

Version: 84c4a14dadf8d28f57068d39cfec2612c15becd1
Tag: v0.29.0-2-g84c4a14d

System info:
    System name: Linux
    Node name: axion
    Release: 6.4.12-arch1-1
    Version: #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000

GPU:
    00:02.0 VGA compatible controller [0300]: Intel Corporation Comet Lake UHD Graphics [8086:9bca] (rev 04) (prog-if 00 [VGA controller])
    DeviceName: VGA compatible 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://bugs.archlinux.org/"
    PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
    LOGO=archlinux-logo

Backtrace:
    #0 | Hyprland(_Z12getBacktracev+0x62) [0x555e4ed75bc2]
        ??
        ??:0
    #1 | Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x791) [0x555e4ed45e41]
        ??
        ??:0
    #2 | Hyprland(_Z25handleUnrecoverableSignali+0x44) [0x555e4ecd7b64]
        ??
        ??:0
    #3 | /usr/lib/libc.so.6(+0x3e710) [0x7f9e2823e710]
        ??
        ??:0
    #4 | /usr/lib/libc.so.6(+0x8e83c) [0x7f9e2828e83c]
        ??
        ??:0
    #5 | /usr/lib/libc.so.6(raise+0x18) [0x7f9e2823e668]
        ??
        ??:0
    #6 | /usr/lib/libc.so.6(abort+0xd7) [0x7f9e282264b8]
        ??
        ??:0
    #7 | /usr/lib/libc.so.6(+0x27390) [0x7f9e28227390]
        ??
        ??:0
    #8 | /usr/lib/libc.so.6(+0x987b7) [0x7f9e282987b7]
        ??
        ??:0
    #9 | /usr/lib/libc.so.6(+0x9aad4) [0x7f9e2829aad4]
        ??
        ??:0
    #10 | /usr/lib/libc.so.6(free+0x73) [0x7f9e2829d353]
        ??
        ??:0
    #11 | /usr/lib/dri/iris_dri.so(+0xc454b) [0x7f9e252c454b]
        ??
        ??:0
    #12 | /usr/lib/dri/iris_dri.so(+0xc45fd) [0x7f9e252c45fd]
        ??
        ??:0
    #13 | /usr/lib/dri/iris_dri.so(+0xd74de9) [0x7f9e25f74de9]
        ??
        ??:0
    #14 | /usr/lib/dri/iris_dri.so(+0x5f7db2) [0x7f9e257f7db2]
        ??
        ??:0
    #15 | /usr/lib/dri/iris_dri.so(+0x5f9b19) [0x7f9e257f9b19]
        ??
        ??:0
    #16 | /usr/lib/dri/iris_dri.so(+0x1351fca) [0x7f9e26551fca]
        ??
        ??:0
    #17 | /usr/lib/dri/iris_dri.so(+0x603ba1) [0x7f9e25803ba1]
        ??
        ??:0
    #18 | /usr/lib/dri/iris_dri.so(+0x2afdd6) [0x7f9e254afdd6]
        ??
        ??:0
    #19 | /usr/lib/libwlroots.so.12032(+0x3d34d) [0x7f9e28d0634d]
        ??
        ??:0
    #20 | /usr/lib/libwlroots.so.12032(+0x6d356) [0x7f9e28d36356]
        ??
        ??:0
    #21 | /usr/lib/libwlroots.so.12032(wlr_output_rollback+0xe) [0x7f9e28d3547e]
        ??
        ??:0
    #22 | Hyprland(_ZN15CHyprOpenGLImpl23destroyMonitorResourcesEP8CMonitor+0x192) [0x555e4ee0bdc2]
        ??
        ??:0
    #23 | Hyprland(_ZN13CHyprRenderer16applyMonitorRuleEP8CMonitorP12SMonitorRuleb+0xa16) [0x555e4ee1c426]
        ??
        ??:0
    #24 | Hyprland(_ZN14CConfigManager19ensureMonitorStatusEv+0x1b9) [0x555e4ed1d1d9]
        ??
        ??:0
    #25 | Hyprland(_Z13hyprCtlFDTickijPv+0x1b7) [0x555e4ed53ab7]
        ??
        ??:0
    #26 | /usr/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7f9e28c81ae2]
        ??
        ??:0
    #27 | /usr/lib/libwayland-server.so.0(wl_display_run+0x27) [0x7f9e28c822d7]
        ??
        ??:0
    #28 | Hyprland(main+0xac6) [0x555e4ecc70c6]
        ??
        ??:0
    #29 | /usr/lib/libc.so.6(+0x27cd0) [0x7f9e28227cd0]
        ??
        ??:0
    #30 | /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f9e28227d8a]
        ??
        ??:0
    #31 | Hyprland(_start+0x25) [0x555e4ecd7a05]
        ??
        ??:0

Log tail:
[TRACE] [wl res 555e511b94c0] set impl to 555e4ee89bb0
[TRACE] [wl res 555e511b94c0] set data to 555e50605620
[TRACE] [wl res 555e511ae560] created
[TRACE] [wl res 555e511ae560] set impl to 555e4ee89bc0
[TRACE] [wl res 555e511ae560] set data to 555e50605620
[TRACE] [wl res 555e511ae5f0] created
[TRACE] [wl res 555e511ae5f0] set impl to 555e4ee89bb0
[TRACE] [wl res 555e511ae5f0] set data to 555e50605620
[TRACE] [wl res 555e511ae5f0] destroying (wl_resource_destroy will be sent)
[LOG] Socket 2 accepted a new client at FD 220
[LOG] Cleanup: destroyed a layersurface
[LOG] Registered signal for owner 555e511af100: 555e519d4fa0 -> 555e511af2e0 (owner: layerSurface)
[LOG] Registered signal for owner 555e511af100: 555e51ddc950 -> 555e511af1a8 (owner: layerSurface)
[LOG] Registered signal for owner 555e511af100: 555e519d4fb0 -> 555e511af210 (owner: layerSurface)
[LOG] Registered signal for owner 555e511af100: 555e519d4fc0 -> 555e511af278 (owner: layerSurface)
[LOG] Registered signal for owner 555e511af100: 555e51ddc960 -> 555e511af348 (owner: layerSurface)
[LOG] LayerSurface 555e51ddc890 (namespace waybar layer 2) created on monitor DP-2
[LOG] LayerSurface 555e5109ceb0 arranged: x: 0 y: 0 w: 3840 h: 28 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 555e50d40f90 arranged: x: 0 y: 0 w: 3840 h: 2160 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor DP-2 layers arranged: reserved: 0.000000 28.000000 0.000000 0.000000
[LOG] LayerSurface 555e51ddc890 mapped
[LOG] Registered signal for owner 555e511af120: 555e519d4fe0 -> 555e511af128 (owner: CWLSurface)
[LOG] CWLSurface 555e511af120 called init()
[LOG] LayerSurface 555e5109ceb0 arranged: x: 0 y: 0 w: 3840 h: 28 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 555e50d40f90 arranged: x: 0 y: 0 w: 3840 h: 2160 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor DP-2 layers arranged: reserved: 0.000000 28.000000 0.000000 0.000000
[LOG] Switch Lid Switch fired, triggering binds.
[LOG] Keybind triggered, calling dispatcher (0, switch:Lid Switch, 0)
[LOG] Executing WAYLAND_DISPLAY=wayland-1 DISPLAY=:0 lid.sh
[LOG] Process Created with pid 4112
[LOG] Switch Lid Switch turn off, triggering binds.
[LOG] Hyprctl: keyword monitor : eDP-1,preferred,10000x10000,1
[LOG] Applying monitor rule for eDP-1
[LOG] Callback 555e50ad0bb8 -> 555e50ad0bb0,  removed.
[LOG] Callback 555e50ad0c20 -> 555e50ad0c18,  removed.
[LOG] Registered signal for owner 555e50ad0840: 555e50abe5d0 -> 555e50ad0b28 (owner: )
[LOG] Registered signal for owner 555e50ad0840: 555e50abe660 -> 555e50ad0b90 (owner: )
[LOG] Registered signal for owner 555e50ad0840: 555e50abe650 -> 555e50ad0bf8 (owner: )
[LOG] Registered signal for owner 555e50ad0840: 555e50abe5e0 -> 555e50ad0c60 (owner: )
[LOG] Registered signal for owner 555e50ad0840: 555e50abe5f0 -> 555e50ad0cc8 (owner: )
[LOG] Registered signal for owner 555e50ad0840: 555e50abe610 -> 555e50ad0d30 (owner: )
[LOG] Registered signal for owner 555e50ad0840: 555e50abe630 -> 555e50ad0d98 (owner: )
[LOG] Added new monitor with name eDP-1 at 10000,10000 with size 1920x1080, pointer 555e50abe480
[LOG] New monitor: WORKSPACEID 3, exists: 0
[LOG] moveWorkspaceToMonitor: Moving 9 to monitor 0
[LOG] moveWorkspaceToMonitor: Moving 1 to monitor 0
[LOG] Monitor eDP-1 layers arranged: reserved: 0.000000 0.000000 0.000000 0.000000
[LOG] Pending output eDP-1 does not accept VRR.
[LOG] Setting preferred mode for eDP-1
[LOG] Monitor eDP-1 -> destroyed all render data
vaxerski commented 1 year ago

this looks like uhhhh... lid close and then open? not unplug?

primalmotion commented 1 year ago

ah maybe... that happens way too often too.. I'll make sure to collect the correct trace next time it happens

vaxerski commented 1 year ago

check https://github.com/hyprwm/Hyprland/pull/3114

fdev31 commented 1 year ago

I'm suffering from the same issue. Since #3114 have been merged I tried the git version and now it slowly dies instead of crashing suddenly. Windows are closed with an animation and THEN it crashes.

vaxerski commented 1 year ago

can you give me a crash report

romanstingler commented 8 months ago

@fdev31 does it still happen for you

fdev31 commented 2 months ago

Recently it happened only when PLUGGING a monitor... so I guess it's still not stable but a different issue ?

aruhier commented 2 months ago

Can you try v0.43? There was multiple fixes on crashes when plugging monitors.

fdev31 commented 2 months ago

I may be able to try in the next couple of days but I'm not at home so it's not easy. In the worst case I'll be able to test in ~2 weeks.

EmilHeilbo commented 1 week ago

Not trying to hijack the issue or anything, just had this happen to me recently after switching to primarily using a laptop; I've enabled HYPRLAND_TRACE & AQ_TRACE as listed in the wiki, so here's a crash report of it segfaulting on v0.44.1 when attaching/detaching a monitor ^^

--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
*thud*

Hyprland received signal 11(SEGV)
Version: 4520b30d498daca8079365bdb909a8dea38e8d55
Tag: v0.44.1
Date: Wed Oct 9 12:54:39 2024
Flags:

System info:
    System name: Linux
    Node name: thinkpad
    Release: 6.6.58-1-lts
    Version: #1 SMP PREEMPT_DYNAMIC Wed, 23 Oct 2024 17:28:15 +0000

GPU:
    00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 620 [8086:5916] (rev 02) (prog-if 00 [VGA controller])

os-release:
    NAME="blendOS"
    PRETTY_NAME="blendOS"
    ID=blendos
    BUILD_ID=rolling
    ANSI_COLOR="38;2;23;147;209"
    HOME_URL="https://blendos.co/"
    DOCUMENTATION_URL="https://docs.blendos.co/"
    SUPPORT_URL="https://github.com/blend-os"
    BUG_REPORT_URL="https://github.com/blend-os"
    LOGO=blendos-logo
Backtrace:
    # | Hyprland(_Z12getBacktracev+0x61) [0x624daf741071]
        getBacktrace()
        ??:?
    #1 | Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0xb88) [0x624daf6c0728]
        CrashReporter::createAndSaveCrash(int)
        ??:?
    #2 | Hyprland(_Z25handleUnrecoverableSignali+0x71) [0x624daf63bb41]
        handleUnrecoverableSignal(int)
        ??:?
    #3 | /usr/lib/libc.so.6(+0x3d1d0) [0x7e1c421061d0]
        ??
        ??:0
    #4 | Hyprland(+0x375a16) [0x624daf831a16]
        CFractionalScaleProtocol::bindManager(wl_client*, void*, unsigned int, unsigned int)
        ??:?
    #5 | Hyprland(+0x4bb876) [0x624daf977876]
        CXWayland::CXWayland(bool)
        ??:?
    #6 | /usr/lib/libffi.so.8(+0x7596) [0x7e1c41f3b596]
        ??
        ??:0
    #7 | /usr/lib/libffi.so.8(+0x400e) [0x7e1c41f3800e]
        ??
        ??:0
    #8 | /usr/lib/libffi.so.8(ffi_call+0x123) [0x7e1c41f3abd3]
        ??
        ??:0
    #9 | /usr/lib/libwayland-server.so.0(+0x6e85) [0x7e1c42c42e85]
        ??
        ??:0
    #1 | /usr/lib/libwayland-server.so.0(+0xbd22) [0x7e1c42c47d22]
        ??
        ??:0
    #11 | /usr/lib/libwayland-server.so.0(wl_event_loop_dispatch+0x1f2) [0x7e1c42c46112]
        ??
        ??:0
    #12 | /usr/lib/libwayland-server.so.0(wl_display_run+0x37) [0x7e1c42c481f7]
        ??
        ??:0
    #13 | Hyprland(_ZN17CEventLoopManager9enterLoopEv+0x2d8) [0x624daf7cfe48]
        CEventLoopManager::enterLoop()
        ??:?
    #14 | Hyprland(main+0xc80) [0x624daf5f75d0]
        main
        ??:?
    #15 | /usr/lib/libc.so.6(+0x25e08) [0x7e1c420eee08]
        ??
        ??:0
    #16 | /usr/lib/libc.so.6(__libc_start_main+0x8c) [0x7e1c420eeecc]
        ??
        ??:0
    #17 | Hyprland(_start+0x25) [0x624daf637de5]
        _start
        ??:?

Log tail:
[LOG] [AQ] drm: Connector DP-6 is not connected, removing old crtc 72
[LOG] [AQ] drm: Connector DP-3 is not connected
[LOG] [AQ] drm: Connector DP-6 is not connected, removing old crtc 72
[LOG] [AQ] drm: Connector DP-6 is not connected
[LOG] [AQ] drm: Connector DP-5 is not connected, removing old crtc 72
[LOG] [AQ] drm: Connector DP-6 is not connected
[LOG] [AQ] drm: Connector DP-5 is not connected, removing old crtc 72
[LOG] [AQ] drm: Connector DP-6 is not connected
[LOG] [AQ] drm: rescanning after realloc
[LOG] [AQ] drm: Scanning connectors for /dev/dri/card1
[LOG] [AQ] drm: Scanning connector id 95
[LOG] [AQ] drm: Connector id 95 already initialized
[LOG] [AQ] drm: connector eDP-1 crtc is incapable of vrr: props.vrr_capable -> 0, crtc->props.vrr_enabled -> 24
[LOG] [AQ] drm: Explicit sync supported
[LOG] [AQ] drm: connector eDP-1 crtc supports CTM
[LOG] [AQ] drm: Connector 95 connection state: 1
[LOG] [AQ] drm: Scanning connector id 103
[LOG] [AQ] drm: Connector id 103 already initialized
[LOG] [AQ] drm: Connector 103 connection state: 2
[LOG] [AQ] drm: Scanning connector id 113
[LOG] [AQ] drm: Connector id 113 already initialized
[LOG] [AQ] drm: Connector 113 connection state: 2
[LOG] [AQ] drm: Scanning connector id 119
[LOG] [AQ] drm: Connector id 119 already initialized
[LOG] [AQ] drm: Connector 119 connection state: 2
[LOG] [AQ] drm: Scanning connector id 125
[LOG] [AQ] drm: Connector id 125 already initialized
[LOG] [AQ] drm: Connector 125 connection state: 2
[LOG] [AQ] drm: Scanning connector id 141
[LOG] [AQ] drm: Connector id 141 already initialized
[LOG] [AQ] drm: Connector 141 connection state: 2
[LOG] [AQ] drm: Scanning connector id 156
[LOG] [AQ] drm: Connector id 156 already initialized
[LOG] [AQ] drm: connector DP-5 crtc is incapable of vrr: props.vrr_capable -> 0, crtc->props.vrr_enabled -> 24
[LOG] [AQ] drm: Explicit sync supported
[LOG] [AQ] drm: connector DP-5 crtc supports CTM
[LOG] [AQ] drm: Connector 156 connection state: 2
[LOG] [AQ] drm: Connector DP-5 disconnected
[LOG] Destroy called for monitor DP-5
[LOG] onDisconnect called for DP-5
[LOG] [CGammaControl] Destroying gamma control for DP-5
[LOG] Removed monitor DP-5!
[TRACE] onCursorMoved for output eDP-1: cursor entered the output, but no front buffer, forcing recalc
[TRACE] onCursorMoved for output DP-5: cursor left the viewport, removing it from the backend
[TRACE] [pointer] hw transformed hotspot for DP-5: [Vector2D: x: 3.2000001668930054, y: 0]
[TRACE] [pointer] monitor: eDP-1, size: [Vector2D: x: 48, y: 48], hw buf: [Vector2D: x: 48, y: 48], scale: 2.00, monscale: 1.25, xbox: [Vector2D: x: 30, y: 30]
[TRACE] [pointer] hw transformed hotspot for eDP-1: [Vector2D: x: 3.75, y: 0]
[LOG] [AQ] drm: Cursor buffer imported into KMS with id 132
[TRACE] Not updating hw cursors: disabled / dpms off display
[LOG] moveWorkspaceToMonitor: Moving 1 to monitor 0
[LOG] moveWorkspaceToMonitor: Plugging gap with new 4
[LOG] moveWorkspaceToMonitor: Plugging gap with existing 4
[TRACE] CMonitorState::ensureBufferPresent: Ignoring, monitor is not enabled
[LOG] [AQ] drm: Disabling output DP-5
[LOG] [CLinuxDMABufV1Protocol] Resetting format table
[LOG] arrangeMonitors: 1 to arrange
[LOG] arrangeMonitors: eDP-1 explicit [3225, 675]
[LOG] arrangeMonitors: eDP-1 xwayland [0, 0]
[LOG] [CXDGOutputProtocol] updating all xdg_output heads
[LOG] Removing monitor DP-5 from realMonitors
[LOG] [CGammaControl] Destroying gamma control for DP-5
[TRACE] [pointer] monitor: eDP-1, size: [Vector2D: x: 48, y: 48], hw buf: [Vector2D: x: 48, y: 48], scale: 2.00, monscale: 1.25, xbox: [Vector2D: x: 30, y: 30]
[TRACE] [pointer] hw transformed hotspot for eDP-1: [Vector2D: x: 3.75, y: 0]
[LOG] [AQ] drm: Cursor buffer imported into KMS with id 132
[TRACE] Seems as if HYPRLAND_CONFIG isn't set, let's see what we can do with HOME.
[LOG] [AQ] udev: new udev remove event for card1-DP-5
[LOG] Destroying workspace ID 4
[TRACE] Aquamarine did not return an explicit out fence
[TRACE] Explicit: 0 presented
[LOG] [CGammaControl] setGamma for eDP-1
[LOG] [CGammaControl] setting to monitor eDP-1
aruhier commented 1 week ago

@EmilHeilbo can you try the main branch?

I had the problem before, even on 0.44.1 particularly when the gamma was changed while I was unplugging the screen, but there was some fixes pushed since and the move to smart pointer for monitors has made Hyprland really stable for me regarding screen docking.

EmilHeilbo commented 1 week ago

@EmilHeilbo can you try the main branch?

I had the problem before, even on 0.44.1 particularly when the gamma was changed while I was unplugging the screen, but there was some fixes pushed since and the move to smart pointer for monitors has made Hyprland really stable for me regarding screen docking.

Sounds like a possible fix @aruhier; I only had it as an intermittent issue, and I do have gammastep installed and running... I guess main would be hyprland-git on the AUR for lazy folks such as myself? 😅

In any case, I'll give it a try tonight; I might as well also try stopping gammastep while on v0.44.1, or just make it hard-switch the gamma on sundown 🙃

aruhier commented 1 week ago

It is hyprland-git if you use AUR, yes :p