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.79k stars 903 forks source link

Unplugging/Closing Last Monitor Causes Strange Behavior #7915

Closed XiaowenHu96 closed 1 month ago

XiaowenHu96 commented 1 month ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 0f594732b063a90d44df8c5d402d658f27471dfe (props: bump version to 0.43.0). Date: Sun Sep 8 16:48:21 2024 Tag: v0.43.0, commits: 5196 flags: (if any) System Information: System name: Linux Node name: xiaowen Release: 6.10.9-arch1-2 Version: #1 SMP PREEMPT_DYNAMIC Tue, 10 Sep 2024 14:37:32 +0000 GPU information: 35:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] [1002:1681] (rev 02) (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/xiaowen/.config/hypr/hyprland.conf: Read Succeeded # ####################################################################################### # AUTOGENERATED HYPR CONFIG. # PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, # OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. # ####################################################################################### # # Please note not all available settings / options are set here. # For a full list, see the wiki # $left = h $right = l $up = k $down = j # See https://wiki.hyprland.org/Configuring/Monitors/ # monitor=name , resolution , position , scale monitor=HDMI-A-1 , preferred , auto , 2 monitor=eDP-1 , disable # For only laptop #monitor=eDP-1 , preferred, auto, 2 # For dual # monitor=eDP-1 , disable # monitor=desc:LG Electronics LG HDR 4K 206NTBK8U389, preferred, 0x0, 2 # monitor=desc:Guangxi Century Innovation Display Electronics Co. Ltd 27C1U-D 0000000000001, preferred, 1920x0, 2, transform, 3 # monitor=desc:Guangxi Century Innovation Display Electronics Co. Ltd 27C1U-D 0000000000001, disable # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch # exec-once = waybar & hyprpaper & firefox # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Some default env vars. # wayland and hyprland specific env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORM,wayland env = QT_WAYLAND_FORCE_DPI,physical env = MOZ_ENABLE_WAYLAND,1 env = XDG_SESSION_TYPE,wayland env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_DESKTOP,Hyprland # env = GDK_BACKEND,wayland # input method # Fcitx5 xwayland support see: https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland # Fix DPI on wayland: see fcitx5-configtool -> Addons -> UI-> Force font DPI on Wayland # Below No longer needed? # https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#TL.3BDR_Do_we_still_need_XMODIFIERS.2C_GTK_IM_MODULE_and_QT_IM_MODULE.3F #env = GTK_IM_MODULE,fcitx env = QT_IM_MODULE,fcitx env = XMODIFIERS,@im=fcitx # Startup # https://gist.github.com/brunoanc/2dea6ddf6974ba4e5d26c3139ffb7580 exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = waybar exec-once = ags > /tmp/ags.log 2>&1 # Seem to work fine?, exec-once = blueman-applet # Seem to work fine? https://github.com/swaywm/sway/issues/1357 exec-once = nm-applet --indicator exec-once = fcitx5 -d exec-once = hyprpaper exec-once = dunst exec-once = solaar --window=hide # exec-once = merkuro-calendar exec-once = thunderbird #exec-once = openrazer-daemon exec-once= sway-audio-idle-inhibit # https://github.com/ErikReider/SwayAudioIdleInhibit#swayaudioidleinhibit exec-once = swayidle -w timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep '~/.config/swaylock/blur_and_lock_screen.sh' # prepare an obsidian notes exec-once = [float;size 75% 85%;center;workspace special:default silent;] alacritty --class Alacritty -e tmux new -c $HOME/ObsidianVault/ # GTK themes # https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland/ $gnome-schema = org.gnome.desktop.interface $my-theme = Gruvbox-Material-Dark env = GTK_THEME,Gruvbox-Material-Dark exec = gsettings set $gnome-schema gtk-theme $my-theme exec = gsettings set $gnome-schema icon-theme $my-theme exec = gsettings set $gnome-schema cursor-theme $my-theme exec = gsettings set $gnome-schema font-name $my-theme # Window rules windowrule=float,^(blueman-manager)$ windowrule=float,^(nm-connection-editor)$ windowrule=float,^(netease-cloud-music)$ windowrule=float,^(pavucontrol)$ windowrule=opacity 0.9 override 0.9 override,^(Alacritty|kitty)$ # windowrulev2=opacity 0.9 override 0.9 override,^(Alacritty|kitty)$,fullscreen:0 # not wayland yet :( windowrule=float,title:^(Firefox — Sharing Indicator)$ # firefox history windowrulev2=float,class:^(firefox)$,title:^(Library)$ windowrulev2=size 40% 80%,class:^(firefox)$,title:^(Library)$ windowrulev2=center,class:^(firefox)$,title:^(Library)$ # firefox windowrule=opacity 0.95 override 0.95 override,^(firefox)$ # mpv player windowrulev2=float,class:^(mpv)$ windowrulev2=size 70% 70%,class:^(mpv)$ windowrulev2=center,class:^(mpv)$ # special workspace windowrule=workspace name:discord,^(discord)$ windowrule=workspace name:mail,^(thunderbird)$ windowrule=workspace name:telegram,title:^(Telegram)$ windowrule=workspace name:skype,^(Skype)$ windowrule=workspace name:music,^(nuclear)$ windowrule=workspace name:notes,^(notion-nativefier.*)$ windowrule=workspace name:calendar,^(org.kde.merkuro.calendar)$ windowrule=workspace name:obsidian,^(obsidian)$ # This setup default monitor for the worksapces... # I don't think I need it atm, for future reference # workspace = name:obsidian, monitor:DP-11, default:true # MusicPlayer windowrule=float,title:^(Spotify Premium)$ windowrule=opacity 0.85 override 0.85 override,title:^(Spotify Premium)$ windowrule=center,title:^(Spotify Premium)$ windowrule=size 80% 80%,title:^(Spotify Premium)$ windowrule=workspacesilent special:music,title:^(Spotify Premium)$ misc { # Whether Hyprland should focus an app that requests to be focused # (an activate request) # E.g. click a url and auto move&focus to browser focus_on_activate=true # swallow ranger enable_swallow=true swallow_regex=^(Alacritty.*)$ mouse_move_enables_dpms = true key_press_enables_dpms = true disable_hyprland_logo = true animate_manual_resizes = true } debug { disable_logs = false } # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us kb_variant = kb_model = kb_options = ctrl:nocaps kb_rules = follow_mouse = 0 float_switch_override_focus = 0 touchpad { natural_scroll = no } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 5 gaps_out = 10 border_size = 2 # Nord # col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg # col.inactive_border = rgba(595959aa) # GruvBox col.active_border = rgba(f28534ee) rgba(ebcb8bee) 45deg col.inactive_border = rgba(595959aa) layout = dwindle } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 10 # blur = yes # blur_size = 2 # blur_passes = 4 # blur_new_optimizations = on drop_shadow = yes shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) active_opacity = 1.0 inactive_opacity = 1.0 # TODO: I would like to set fullscreen_opacity on a appplication basis # Currenlty it does not seem to support it fullscreen_opacity = 1.0 } group { col.border_active = rgba(f28534ee) rgba(ebcb8bee) 45deg col.border_inactive = rgba(595959aa) groupbar { font_family = "JetBrainsMono Nerd Font" font_size = 22 gradients = true text_color = rgba(e9b143ee) col.active = rgba(32302fee) col.inactive = rgba(5a524cee) col.locked_active = rgba(db4740ee) col.locked_inactive = rgba(db4740ee) } } 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_status = true } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = off } # 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 # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER # screenshots: slurp + grim + swappy bind =, Print, exec, grim -g "$(slurp)" - | swappy -f - # AGS dashboard bind = $mainMod , d , exec, ags -t mpris # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod SHIFT, Return, exec, alacritty -e tmux bind = $mainMod SHIFT, C, killactive, bind = $mainMod SHIFT, escape, exit, bind = $mainMod, t, togglefloating, bind = $mainMod, p, exec, rofi -show combi bind = $mainMod SHIFT, p, exec, rofi -show hyprland -modi hyprland:~/.config/rofi/scripts/hyprland_switch_workspace.sh bind = $mainMod SHIFT, f, exec, [size 70% 80%;center;opacity 0.85 override 0.85 override;float] alacritty --class AlacrittyRanger -e ranger ~ bind = $mainMod, n, exec, ~/.config/hypr/adv_toggle_specialworkspace.sh bind = $mainMod SHIFT, n, movetoworkspacesilent, special:default bind = $mainMod , Tab , cyclenext # bind flag see: https://wiki.hyprland.org/Configuring/Binds/ binde = $mainMod , left , resizeactive , -10 0 binde = $mainMod , right , resizeactive , 10 0 binde = $mainMod , up , resizeactive , 0 10 binde = $mainMod , down , resizeactive , 0 -10 bind = $mainMod , R , swapnext bind = $mainMod , $left , movewindow , l bind = $mainMod , $right , movewindow , r bind = $mainMod , $up , movewindow , u bind = $mainMod , $down , movewindow , d bind = $mainMod , q , focusmonitor, l bind = $mainMod , e , focusmonitor, r bind = $mainMod SHIFT , q , movecurrentworkspacetomonitor, l bind = $mainMod SHIFT , e , movecurrentworkspacetomonitor, r bind = $mainMod SHIFT , t , exec, ~/.config/hypr/group_action.sh t bind = $mainMod SHIFT , $left , exec, ~/.config/hypr/group_action.sh l bind = $mainMod SHIFT , $right , exec, ~/.config/hypr/group_action.sh r bind = $mainMod SHIFT , $up , exec, ~/.config/hypr/group_action.sh u bind = $mainMod SHIFT , $down , exec, ~/.config/hypr/group_action.sh d bind = $mainMod SHIFT , u , moveoutofgroup bind = $mainMod , Return , fullscreen # Switch workspaces with mainMod + [0-9] bind = $mainMod, b, workspace, previous 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 # Move active window to a workspace with mainMod + SHIFT + [0-9] 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 # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow ======Config-End======== ```

Description

I have a laptop (eDP-1) that connects to an external monitor (HDMI-A-1). In my configuration, I disable the laptop monitor and use only the external monitor.

When I unplug the last connected monitor, I encounter several issues:

  1. Firefox and Thunderbird become blurry and need a restart.
  2. Alacritty sometimes crashes.
  3. Waybar always crashes.

I found #7822, but it doesn't seem relevant, as Hyprland itself never crashes. I also tried to reproduce this behavior on Sway but was unsuccessful.

I've attached the Hyprland log. It appears the issue starts when the monitor is removed:

[LOG] Destroy called for monitor HDMI-A-1
[LOG] onDisconnect called for HDMI-A-1
[LOG] Removed monitor HDMI-A-1!
[LOG] [CLinuxDMABufV1Protocol] Resetting format table
[WARN] Unplugged last monitor, entering an unsafe state. Good luck my friend.
[LOG] Entering unsafe state
....
[LOG] LayerSurface 5ab85bf39790 (namespace waybar layer 2) created on monitor FALLBACK
[LOG] [CLayerShellProtocol] New wlr_layer_surface 5ab85bf39790
[ERR] LayerSurface 5ab85beae390 has a negative/zero w/h???
...

How to reproduce

Steps to Reproduce

  1. Disable the laptop display and use only the external monitor.
  2. Unplug/close the external monitor.
  3. Open the monitor.

Crash reports, logs, images, videos

hyprland.log

vaxerski commented 1 month ago

it's a dupe of #7822, some of your symptoms are listed there