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.38k stars 809 forks source link

Switching Monitor Configs Kills All Alacritty Instances #6835

Closed deron-dev closed 1 month ago

deron-dev commented 1 month 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: tower Release: 6.9.7-artix1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 28 Jun 2024 18:11:28 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 33 [Radeon RX 7700S/7600/7600S/7600M XT/PRO W7600] [1002:7480] (rev cf) (prog-if 00 [VGA controller]) 18:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c1) (prog-if 00 [VGA controller]) os-release: NAME="Artix Linux" PRETTY_NAME="Artix Linux" ID=artix BUILD_ID=rolling ANSI_COLOR="0;36" HOME_URL="https://www.artixlinux.org/" DOCUMENTATION_URL="https://wiki.artixlinux.org/" SUPPORT_URL="https://forum.artixlinux.org/" BUG_REPORT_URL="https://bugs.artixlinux.org/" PRIVACY_POLICY_URL="https://terms.artixlinux.org/docs/privacy-policy/" LOGO=artixlinux-logo plugins: ======Config-Start====== Config File: /home/deron/.config/hypr/hyprland.conf: Read Succeeded # monitor/monitor-specific workspace config source = ~/.config/hypr/.monitors.conf # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch $eo_pipewire = pipewire >> ~/.mylocal/log/pipewire $eo_wireplumber = wireplumber >> ~/.mylocal/log/wireplumber $eo_mkdirs = mkdir -p ~/.mylocal/log $eo_pre = $eo_mkdirs $eo_notify = mako >> ~/.mylocal/log/mako $eo_auth = /usr/lib/polkit-kde-authentication-agent-1 >> ~/.mylocal/log/polkit-kde-authentication-agent-1 $eo_wallpaper = swww-daemon >> ~/.mylocal/log/swww && swww img ~/od/.rsrc/img/artix-abstract-3840x2160.png $eo_audio = $eo_pipewire && $eo_wireplumber $eo_idle = hypridle >> ~/.mylocal/log/hypridle $eo_services = $eo_wallpaper & $eo_auth & $eo_notify & $eo_audio & $eo_idle exec-once = $eo_pre & $eo_services # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Set programs that you use $terminal = alacritty $fileManager = thunar $menu = rofi -show run $passman = QT_SCALE_FACTOR=1.5 keepassxc # Some default env vars. env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that env = WLR_DRM_DEVICES,/dev/dri/card1 # env = HYPRCURSOR_THEME,layan-white # env = HYPRCURSOR_SIZE,24 # env = WLR_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0 # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { numlock_by_default = true kb_layout = us kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 1 touchpad { natural_scroll = no } sensitivity = 0 # -1.0 to 1.0, 0 means no modification. } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 5 gaps_out = 20 border_size = 2 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) layout = dwindle # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 10 blur { enabled = true size = 3 passes = 1 } drop_shadow = yes shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) } animations { enabled = yes # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more 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 } dwindle { # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = yes # you probably want this } master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more # new_is_master = true # broke - "config option ... does not exist" on 2024-07-04 after system update } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = off } misc { # See https://wiki.hyprland.org/Configuring/Variables/ for more force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more device { name = epic-mouse-v1 sensitivity = -0.5 } # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. # See https://wiki.hyprland.org/Configuring/Keywords/ for more $modmain = SUPER source = ~/.config/hypr/binds/audio.conf # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $modmain SHIFT, T, exec, $terminal bind = $modmain, C, killactive, bind = $modmain SHIFT, Q, exit, bind = $modmain, P, exec, $passman bind = $modmain, V, togglefloating, bind = $modmain, R, exec, $menu bind = $modmain SHIFT, P, exec, grimblast copy area # bind = $modmain, P, pseudo, # dwindle # bind = $modmain, J, togglesplit, # dwindle bind = $modmain, M, fullscreen, 1 # Move focus with mainMod + arrow keys bind = $modmain, left, movefocus, l bind = $modmain, right, movefocus, r bind = $modmain, up, movefocus, u bind = $modmain, down, movefocus, d # vimlike bind = $modmain, H, movefocus, l bind = $modmain, L, movefocus, r bind = $modmain, K, movefocus, u bind = $modmain, J, movefocus, d source = ~/.config/hypr/binds/workspaces.conf # Scroll through existing workspaces with mainMod + scroll # bind = $modmain, mouse_down, workspace, e+1 # bind = $modmain, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $modmain, mouse:272, movewindow bindm = $modmain, mouse:273, resizewindow Config File: /home/deron/.config/hypr/.monitors.conf: Read Succeeded source = ~/.config/hypr/monitors/global.conf source = ~/.config/hypr/monitors/workspaces/left1080.conf source = ~/.config/hypr/monitors/workspaces/left4k.conf source = ~/.config/hypr/monitors/workspaces/right4k.conf source = ~/.config/hypr/monitors/workspaces/right1080.conf monitor=$left1080,1920x1080@60,-1920x540,1 # left 1080 monitor=$left4k,3840x2160@59.99700,0x0,1 # left 4k monitor=$right4k,3840x2160@59.99700,3840x0,1 # right 4k monitor=$right1080,1920x1080@60,7680x540,1 # right 1080 Config File: /home/deron/.config/hypr/monitors/global.conf: Read Succeeded $left1080 = DP-1 $left4k = DP-3 $right1080 = HDMI-A-1 $right4k = DP-2 Config File: /home/deron/.config/hypr/monitors/workspaces/left1080.conf: Read Succeeded source = ~/.config/hypr/monitors/global.conf workspace=11,monitor:$left1080 workspace=12,monitor:$left1080 workspace=13,monitor:$left1080 workspace=14,monitor:$left1080 workspace=15,monitor:$left1080 Config File: /home/deron/.config/hypr/monitors/global.conf: Read Succeeded $left1080 = DP-1 $left4k = DP-3 $right1080 = HDMI-A-1 $right4k = DP-2 Config File: /home/deron/.config/hypr/monitors/workspaces/left4k.conf: Read Succeeded source = ~/.config/hypr/monitors/global.conf workspace=6,monitor:$left4k workspace=7,monitor:$left4k workspace=8,monitor:$left4k workspace=9,monitor:$left4k workspace=10,monitor:$left4k Config File: /home/deron/.config/hypr/monitors/global.conf: Read Succeeded $left1080 = DP-1 $left4k = DP-3 $right1080 = HDMI-A-1 $right4k = DP-2 Config File: /home/deron/.config/hypr/monitors/workspaces/right4k.conf: Read Succeeded source = ~/.config/hypr/monitors/global.conf workspace=1,monitor:$right4k workspace=2,monitor:$right4k workspace=3,monitor:$right4k workspace=4,monitor:$right4k workspace=5,monitor:$right4k Config File: /home/deron/.config/hypr/monitors/global.conf: Read Succeeded $left1080 = DP-1 $left4k = DP-3 $right1080 = HDMI-A-1 $right4k = DP-2 Config File: /home/deron/.config/hypr/monitors/workspaces/right1080.conf: Read Succeeded source = ~/.config/hypr/monitors/global.conf workspace=16,monitor:$right1080 workspace=17,monitor:$right1080 workspace=18,monitor:$right1080 workspace=19,monitor:$right1080 workspace=20,monitor:$right1080 Config File: /home/deron/.config/hypr/monitors/global.conf: Read Succeeded $left1080 = DP-1 $left4k = DP-3 $right1080 = HDMI-A-1 $right4k = DP-2 Config File: /home/deron/.config/hypr/binds/audio.conf: Read Succeeded # deron-utils https://gitlab.com/deronparker/util/pkgbuild # deron-setvol https://gitlab.com/deronparker/util/pactl-scripts bindl=SUPER, F7, exec, deron-setvol up bindl=SUPER, F8, exec, deron-setvol down Config File: /home/deron/.config/hypr/binds/workspaces.conf: Read Succeeded # special bind = $modmain, E, togglespecialworkspace, email bind = $modmain SHIFT, E, movetoworkspace, special:email bind = $modmain, G, togglespecialworkspace, gaming bind = $modmain SHIFT, G, movetoworkspace, special:gaming bind = $modmain, S, togglespecialworkspace, signal bind = $modmain SHIFT, S, movetoworkspace, special:signal bind = $modmain, Y, togglespecialworkspace, bg bind = $modmain SHIFT, Y, movetoworkspace, special:bg # switch bind = $modmain, 1, workspace, 1 bind = $modmain, 2, workspace, 2 bind = $modmain, 3, workspace, 3 bind = $modmain, 4, workspace, 4 bind = $modmain, 5, workspace, 5 bind = $modmain, 6, workspace, 6 bind = $modmain, 7, workspace, 7 bind = $modmain, 8, workspace, 8 bind = $modmain, 9, workspace, 9 bind = $modmain, 0, workspace, 10 bind = $modmain ALT, 1, workspace, 11 bind = $modmain ALT, 2, workspace, 12 bind = $modmain ALT, 3, workspace, 13 bind = $modmain ALT, 4, workspace, 14 bind = $modmain ALT, 5, workspace, 15 bind = $modmain ALT, 6, workspace, 16 bind = $modmain ALT, 7, workspace, 17 bind = $modmain ALT, 8, workspace, 18 bind = $modmain ALT, 9, workspace, 19 bind = $modmain ALT, 0, workspace, 20 # move to bind = $modmain SHIFT, 1, movetoworkspace, 1 bind = $modmain SHIFT, 2, movetoworkspace, 2 bind = $modmain SHIFT, 3, movetoworkspace, 3 bind = $modmain SHIFT, 4, movetoworkspace, 4 bind = $modmain SHIFT, 5, movetoworkspace, 5 bind = $modmain SHIFT, 6, movetoworkspace, 6 bind = $modmain SHIFT, 7, movetoworkspace, 7 bind = $modmain SHIFT, 8, movetoworkspace, 8 bind = $modmain SHIFT, 9, movetoworkspace, 9 bind = $modmain SHIFT, 0, movetoworkspace, 10 bind = $modmain ALT SHIFT, 1, movetoworkspace, 11 bind = $modmain ALT SHIFT, 2, movetoworkspace, 12 bind = $modmain ALT SHIFT, 3, movetoworkspace, 13 bind = $modmain ALT SHIFT, 4, movetoworkspace, 14 bind = $modmain ALT SHIFT, 5, movetoworkspace, 15 bind = $modmain ALT SHIFT, 6, movetoworkspace, 16 bind = $modmain ALT SHIFT, 7, movetoworkspace, 17 bind = $modmain ALT SHIFT, 8, movetoworkspace, 18 bind = $modmain ALT SHIFT, 9, movetoworkspace, 19 bind = $modmain ALT SHIFT, 0, movetoworkspace, 20 ======Config-End======== ```

Description

When I make certain config modifications around monitors and workspaces, all Alacritty (terminal) instances on all monitors/workspaces die.

Here I modify a symlink used by my hyprland.conf that changes my monitor/workspace config.

demo and diff

The same issue does not occur when switching back to my default config (the one shown in "System Info and Version".

How to reproduce

  1. Run Hyprland
  2. Modify Hyprland config to produce diff shown in description.

Crash reports, logs, images, videos

I ran an alacritty instance inside a tmux session so I could see what stdout says when I switch monitor configs:

thread 'main' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.18.1/src/output.rs:425:14:
Received event for dead output
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
deron-dev commented 1 month ago

Trying to interpret this

Received event for dead output

Does this mean Alacritty dies if it thinks the monitor it is on is off? The issue occurs on all instances on all monitors -- removed in the config switch or not. Perhaps this is an Alacritty issue.

deron-dev commented 1 month ago

Ah, yep. https://github.com/alacritty/alacritty/issues/8049

deron-dev commented 1 month ago

@kchibisov says Hyprland shouldn't send the events that cause this issue. Anyone else have thoughts?

kchibisov commented 1 month ago

Sending events to dead objects is generally not a great idea, and it was not a thing before. It happens to both wl_output and anything created on wl_seat, with seat the events are coming after removing capabilities from the seat and client dropping everything.

That all started to happen recently after wlroots was forked.

vaxerski commented 1 month ago

yea that sounds like a problem, thanks for pointing out. patch.txt this should fix that, lmk.

kchibisov commented 1 month ago

@vaxerski just fyi this was also reported to happen with keyboard(maybe other seat objects as well) when capability is removed due to tty switch, I'd recommend to ensure that it's fixed/not affected as well.

vaxerski commented 1 month ago

I'll write a separate patch for that in a moment

vaxerski commented 1 month ago

patch.txt saparate patch that should fix keyboard, pointer and touch events being set without caps.

vaxerski commented 1 month ago

I've pushed both patches, no activity, likely solved, closing

deron-dev commented 1 month ago

On

Hyprland, built from branch main at commit 33a5c8ce325e1657ec5571b57e05c6378706f4cd  (config: avoid using initial ws tracking for exec-once).
Date: Thu Jul 25 08:29:39 2024
Tag: v0.41.2-98-g33a5c8ce, commits: 4984

making the config switch in the original post no longer kills Alacritty instances.