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
19.61k stars 827 forks source link

Crash when turning monitor on #7433

Closed johannlejeune closed 1 week ago

johannlejeune commented 3 weeks ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 9a09eac79b85c846e3a865a9078a3f8ff65a9259 (). Date: 2024-08-07 Tag: , commits: 9a09eac79b85c846e3a865a9078a3f8ff65a9259 flags: (if any) System Information: System name: Linux Node name: genesis-desktop Release: 6.10.4 Version: #1-NixOS SMP PREEMPT_DYNAMIC Sun Aug 11 10:58:04 UTC 2024 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04) (prog-if 00 [VGA controller]) os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.11.20240814.c3aa7b8" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.11 (Vicuna)" SUPPORT_URL="https://nixos.org/community.html" VERSION="24.11 (Vicuna)" VERSION_CODENAME=vicuna VERSION_ID="24.11" plugins: ======Config-Start====== Config File: /home/genesis/.config/hypr/hyprland.conf: Read Succeeded exec-once = /nix/store/sb8wn0zw1mk1g4mny8mqmn9h8q0ldvjj-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target $mod=SUPER animations { animation=global, 1, 2, default animation=workspaces, 0 animation=windows, 0 enabled=true } binds { workspace_back_and_forth=true } decoration { blur { enabled=true popups=true size=7 } col.shadow=rgba(1a1a1a66) drop_shadow=true rounding=3 shadow_range=15 } general { border_size=2 col.active_border=rgba(a3be8cff) rgba(a3be8caa) 45deg col.inactive_border=rgba(343d46ff) gaps_in=3 gaps_out=6 } gestures { workspace_swipe=true } input { touchpad { natural_scroll=true } kb_layout=us-qwerty-fr kb_options=caps:escape numlock_by_default=true repeat_delay=200 repeat_rate=35 } misc { disable_hyprland_logo=true disable_splash_rendering=true } bind=$mod SHIFT, space, togglefloating bind=$mod, F, fullscreen bind=$mod, 1, workspace, 1 bind=$mod, 2, workspace, 2 bind=$mod, 3, workspace, 3 bind=$mod, 4, workspace, 4 bind=$mod, 5, workspace, 5 bind=$mod, 6, workspace, 6 bind=$mod, 7, workspace, 7 bind=$mod, 8, workspace, 8 bind=$mod, 9, workspace, 9 bind=$mod, 0, workspace, 10 bind=$mod SHIFT CTRL, left, movecurrentworkspacetomonitor, l bind=$mod SHIFT CTRL, left, focusmonitor, l bind=$mod SHIFT CTRL, right, movecurrentworkspacetomonitor, r bind=$mod SHIFT CTRL, right, focusmonitor, r bind=$mod SHIFT CTRL, up, movecurrentworkspacetomonitor, u bind=$mod SHIFT CTRL, up, focusmonitor, u bind=$mod SHIFT CTRL, down, movecurrentworkspacetomonitor, d bind=$mod SHIFT CTRL, down, focusmonitor, d bind=, XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle bind=, XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle bind=, XF86AudioPlay, exec, /nix/store/9l9b5m4z3cfy5nnx2l13jxlrgdkgmz3j-playerctl-2.4.1/bin/playerctl play-pause bind=, XF86AudioNext, exec, /nix/store/9l9b5m4z3cfy5nnx2l13jxlrgdkgmz3j-playerctl-2.4.1/bin/playerctl next bind=, XF86AudioPrev, exec, /nix/store/9l9b5m4z3cfy5nnx2l13jxlrgdkgmz3j-playerctl-2.4.1/bin/playerctl previous bind=, XF86AudioStop, exec, /nix/store/9l9b5m4z3cfy5nnx2l13jxlrgdkgmz3j-playerctl-2.4.1/bin/playerctl stop bind=, PRINT, exec, /nix/store/8x6va40ghyn0lw267iki27q6jq3ap6s0-grim-1.4.1/bin/grim -g "$(/nix/store/0f5a9fll1rd3055ywc3n32vbb8qy78sp-slurp-1.5.0/bin/slurp -d)" - | /nix/store/3biib9f8z0v2xvs5s99lbms1kiyaraqn-wl-clipboard-2.2.1/bin/wl-copy bind=SHIFT, PRINT, exec, /nix/store/8x6va40ghyn0lw267iki27q6jq3ap6s0-grim-1.4.1/bin/grim -g "$(/nix/store/0f5a9fll1rd3055ywc3n32vbb8qy78sp-slurp-1.5.0/bin/slurp -d)" -l 0 - | /nix/store/i7c5j9qlfcn3ajgn26m9hcjvd3pj20rk-satty-0.14.0/bin/satty --copy-command '/nix/store/3biib9f8z0v2xvs5s99lbms1kiyaraqn-wl-clipboard-2.2.1/bin/wl-copy' --early-exit --filename - bind=CTRL SHIFT, PRINT, exec, /nix/store/8x6va40ghyn0lw267iki27q6jq3ap6s0-grim-1.4.1/bin/grim -o $(/nix/store/jn761jaiv0d0ix0rz5m93xhci96zqavx-hyprland-0.42.0+date=2024-08-07_9a09eac/bin/hyprctl -j activeworkspace | /nix/store/wq2z3xx9z1d1d1c46mcrpd292qmnxdaa-jq-1.7.1-bin/bin/jq -r '.monitor') -l 0 - | /nix/store/i7c5j9qlfcn3ajgn26m9hcjvd3pj20rk-satty-0.14.0/bin/satty --fullscreen --copy-command '/nix/store/3biib9f8z0v2xvs5s99lbms1kiyaraqn-wl-clipboard-2.2.1/bin/wl-copy' --early-exit --filename - bind=$mod, RETURN, exec, kitty bind=$mod, I, exec, brave bind=$mod, O, exec, thunar bind=$mod, D, exec, rofi -show drun bind=, XF86Search, exec, rofi -show drun bind=$mod SHIFT, D, exec, rofi -show emoji bind=CTRL, SPACE, exec, makoctl dismiss bind=CTRL SHIFT, SPACE, exec, makoctl dismiss --all bind=CTRL, GRAVE, exec, makoctl restore binde=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +2% binde=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -2% binde=, XF86MonBrightnessUp, exec, /nix/store/jk9dk7v9xmx8zw6zb2j5cs39b4fixgc3-brightnessctl-0.5.1/bin/brightnessctl -q s +5% binde=, XF86MonBrightnessDown, exec, /nix/store/jk9dk7v9xmx8zw6zb2j5cs39b4fixgc3-brightnessctl-0.5.1/bin/brightnessctl -q s 5%- binde=, XF86KbdBrightnessUp, exec, /nix/store/jk9dk7v9xmx8zw6zb2j5cs39b4fixgc3-brightnessctl-0.5.1/bin/brightnessctl -q -d '*::kbd_backlight' s +1 binde=, XF86KbdBrightnessDown, exec, /nix/store/jk9dk7v9xmx8zw6zb2j5cs39b4fixgc3-brightnessctl-0.5.1/bin/brightnessctl -q -d '*::kbd_backlight' s 1- bindm=$mod, mouse:272, movewindow bindm=$mod, mouse:273, resizewindow env=XCURSOR_SIZE, 24 env=WLR_NO_HARDWARE_CURSORS, 1 env=SDL_VIDEODRIVER, wayland env=QT_QPA_PLATFORM, wayland env=QT_WAYLAND_DISABLE_WINDOWDECORATION, 1 env=_JAVA_AWT_WM_NONREPARENTING, 1 layerrule=blur, rofi layerrule=ignorealpha, rofi layerrule=blur, waybar layerrule=ignorealpha, waybar monitor=DP-3, 2560x1440@164.000000, 1080x293, 1, transform, 0 monitor=HDMI-A-1, 1920x1080@74.000000, 0x0, 1, transform, 1 monitor=HDMI-A-2, 1920x1080@74.000000, 3640x473, 1, transform, 0 monitor=, preferred, auto, 1, transform, 0 windowrulev2=tile, class:(brave), title:^(.+)$ windowrulev2=stayfocused, class:(brave), title:^$ windowrulev2=tile, class:(chromium), title:^(.+)$ windowrulev2=stayfocused, class:(chromium), title:^$ windowrulev2=tile, class:(firefox), title:^(.+)$ windowrulev2=stayfocused, class:(firefox), title:^$ workspace=1, monitor:DP-3 workspace=2, monitor:HDMI-A-2 workspace=3, monitor:DP-3 workspace=4, monitor:HDMI-A-2 workspace=5, monitor:HDMI-A-2 # Resize mode bind = $mod, R, submap, resize submap = resize binde = , right, resizeactive, 17% 0 binde = , left, resizeactive, -17% 0 binde = , up, resizeactive, 0 -17% binde = , down, resizeactive, 0 17% bind = , escape, submap, reset submap = reset # Power menu $powerMenu = log[o]ut [l]ock [s]uspend [h]ibernate [r]eboot [p]oweroff bind = $mod, N, submap, $powerMenu submap = $powerMenu bind = , O, exec, loginctl terminate-user "$USER" bind = , O, submap, reset bind = , L, exec, loginctl lock-session bind = , L, submap, reset bind = , S, exec, systemctl suspend bind = , S, submap, reset bind = , H, exec, systemctl hibernate bind = , H, submap, reset bind = , R, exec, systemctl reboot bind = , R, submap, reset bind = , P, exec, systemctl poweroff bind = , P, submap, reset bind = , escape, submap, reset submap = reset # Screen recording mode $screenRecording = recording... bind = ALT, PRINT, exec, /nix/store/yishp3ki26sh71c0y0nr4pmidvf7n3l5-record-screen/bin/record-screen bind = ALT, PRINT, submap, $screenRecording submap = $screenRecording bind = , escape, exec, pkill -SIGINT wf-recorder bind = , escape, submap, reset submap = reset ======Config-End======== ```

Description

When I turn on my third monitor (HDMI-A-1), Hyprland randomly crashes. That third monitor is a vertical monitor. It does not have any workspace bound to it.

It seems like the more windows I have open, the more likely it is to trigger a crash. When I remove the monitor configuration (placement, resolution, etc. see System info), the crashes are even more rare although I was able to make Hyprland crash once without any monitor configuration.

When it doesn't crash Hyprland, it can sometimes crash all Chromium-based applications (Brave, Discord, Slack, VSCode, Spotify, etc.) but maybe that's more of a Chromium bug than a Hyprland bug?

Please tell me if you need me to bisect, I only had an hour to file this bug request and I thought that maybe the crash reports are enough to pinpoint the root cause :crossed_fingers:

How to reproduce

Crash reports, logs, images, videos

This is the latest crash I was able to trigger with the exact configuration dumped in System info. hyprlandCrashReport45585.txt

These are other crashes I was able to trigger while tweaking the configuration to try and find out if a specific configuration was triggering the crashes or not hyprlandCrashReport6377.txt hyprlandCrashReport5655.txt hyprlandCrashReport580625.txt hyprlandCrashReport568879.txt

utzuro commented 3 weeks ago

I have exactly the same issue. Hyprland just crashes randomly, and seems like it crashes much more often when secondary vertical monitor is on. (so far I had only one crash without a secondary monitor, and many crashes soon after I turn it on.) It started after I've updated all my programs today.

Cloudperry commented 3 weeks ago

Initially I thought it was the first crash I described in this comment, but it turns out it was a different crash. Adding a debug backtrace of this crash soon.

Edit: Got a debug backtrace of this crash, but it seems to crash inside Aquamarine code. Do I need to debug build Aquamarine and Hyprutils as well for the backtrace to be useful?

johannlejeune commented 3 weeks ago

I have exactly the same issue. Hyprland just crashes randomly, and seems like it crashes much more often when secondary vertical monitor is on. (so far I had only one crash without a secondary monitor, and many crashes soon after I turn it on.) It started after I've updated all my programs today.

Don't know if it's the same issue because as long as I don't power off/on my third monitor, nothing crashes, I already spent a whole day using Hyprland with only two monitors without any crash whatsoever but as soon as I power on the third monitor, either everything crashes or all Chromium-based apps crash. If nothing crashes immediately after I turn on the third monitor, then everything's fine and I can continue using Hyprland with the three monitors on. Also, if I start Hyprland with the three monitors already powered on, everything's gonna run just fine.

utzuro commented 3 weeks ago

I see, that it really is different. My hyprland crashes in randomly, not immediately after some specific action.

Cloudperry commented 3 weeks ago

Now I have a full debug backtrace of this crash, but idk why there are so many variables marked as \<optimized out>. I debug built hyprutils and aquamarine by editing their pkgbuilds to build in Debug mode and added options=(!strip).

diniamo commented 3 weeks ago

Should be fixed on latest Hyprland/aquamarine.

vaxerski commented 3 weeks ago

likely

Cloudperry commented 3 weeks ago

Still crashing for me on Hyprland commit c86db7bbb0cf14d4955ee3a4d13c0ed9f8a0e0ae and Aquamarine commit 1e43d9a. Check my backtrace if that helps. Its from an older Aquamarine version built yesterday, but the crash should be the same.

gulafaran commented 3 weeks ago

might be fixed on aq-git now hit a similiar one, https://github.com/hyprwm/aquamarine/commit/b02d4f4d72c5e0f76f331ed07fdc8178842d9b1f

Cloudperry commented 3 weeks ago

Now the crash is fixed with Aquamarine git, but first time the monitor turns on there is no image. On second try everything works normally. I have just one AMD GPU.

gulafaran commented 3 weeks ago

Now the crash is fixed with Aquamarine git, but first time the monitor turns on there is no image. On second try everything works normally. I have just one AMD GPU.

anything interesting showing in the logs when that occurs?

johannlejeune commented 3 weeks ago

Tried with https://github.com/hyprwm/Hyprland/commit/c86db7bbb0cf14d4955ee3a4d13c0ed9f8a0e0ae and https://github.com/hyprwm/aquamarine/commit/b02d4f4d72c5e0f76f331ed07fdc8178842d9b1f, looks like the Hyprland crash is fixed although Chromium-based apps are still crashing randomly when I turn the third monitor on. If they crash, they all crash together. If they don't crash, they all survive together :shrug:

johannlejeune commented 1 week ago

Since the Hyprland crash is fixed, I'll close this in favor of #7592 to address the Chromium-based apps crashes :+1: