swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.45k stars 1.1k forks source link

sway freezes when exiting fullscreen #8104

Open GrownPlanet opened 5 months ago

GrownPlanet commented 5 months ago

Sometimes, when exiting fullscreen in sway, my screen freezes and no inputs register, I need to physically shut down my pc and restart it to continue

Please fill out the following:

Lenny003 commented 5 months ago

Yeah this has been happening to me too, I'm on Sway 1.9 and it still happens every now and again.

kevenwyld commented 1 day ago

I'm having basically exactly this same issue however for me the trigger is changing gamma, or connecting/disconnecting displays. The freeze is a complete lockup displaying the last image on the screen, nothing on the screen changes it just becomes completely unresponsive and requires a physical poweroff or reset.

My system specs are:

sway version: 1:1.9-5 bar: i3status-rs

Sway config: click to expand ``` set $mod Mod4 set $ALT Mod1 #gaps inner 10 default_border pixel 1 hide_edge_borders --i3 none # class border backgr. text indicator #client.focused #F92672 #FF992C #000000 #2e9ef4 #client.focused #F92672 #F92672 #000000 client.focused #FF992C #FF992C #000000 titlebar_padding { 3 1 } font pango:FreeSans 9 input "type:keyboard" { xkb_options caps:super repeat_delay 220 repeat_rate 70 } input "1133:50184:Logitech_USB_Trackball" { scroll_method on_button_down } seat * { #hide_cursor 1500 hide_cursor 3000 } include /etc/sway/config.d/* # Provided by the above include line #exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP #exec hash dbus-update-activation-environment 2>/dev/null && \ # dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP # Start taskbar stuffs # exec setxkbmap -option caps:super # exec_always --no-startup-id xset r rate 200 40 # exec --no-startup-id autocutsel -fork # exec --no-startup-id autocutsel -selection PRIMARY -fork exec openrgb --noautoconnect --profile pinkandred exec /usr/bin/swayidle -w timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' exec /usr/bin/blueman-applet # Disable in favor of wl-gammarelay-rs on the status bar #exec /usr/bin/gammastep exec --no-startup-id /usr/bin/wl-gammarelay-rs #exec --no-startup-id /usr/bin/busctl --user set-property rs.wl-gammarelay / rs.wl.gammarelay Temperature q 4800 exec /usr/bin/nm-applet workspace 1 output DP-3 workspace 2 output DP-3 workspace 3 output DP-3 workspace 6 output DP-1 workspace 7 output DP-1 workspace 8 output DP-1 workspace 9 output DP-1 workspace 11 output DP-2 workspace 12 output DP-2 workspace 13 output DP-2 workspace 14 output DP-2 workspace 15 output DP-2 workspace 17 output DP-4 workspace 18 output DP-4 workspace 19 output DP-4 workspace 20 output DP-4 workspace 21 output DP-5 workspace 22 output DP-5 workspace 23 output DP-5 workspace 30 output DP-6 workspace 31 output DP-6 workspace 32 output DP-6 # ##################################################################### # Hardware specific bindings # ##################################################################### bindsym XF86MonBrightnessUp exec $HOME/bin/br up bindsym XF86MonBrightnessDown exec $HOME/bin/br down bindsym XF86Calculator exec ci home bindsym XF86Explorer exec ci work # PrtSc key on Lenovo is where the menu key should be # exec xmodmap -e "keycode 107 = Menu" # ##################################################################### output { DP-1 position 1440 1440 mode 2560x1440@165Hz DP-1 adaptive_sync on DP-2 transform 90 DP-2 position 4000 790 mode 2560x1440@165Hz DP-2 adaptive_sync on DP-3 transform 270 DP-3 position 0 790 mode 2560x1440@165Hz DP-3 adaptive_sync on DP-4 position 1440 0 mode 2560x1440@165Hz DP-4 adaptive_sync on DP-5 position 5440 1750 mode 3840x1600@144Hz DP-5 adaptive_sync on DP-5 enable DP-6 position 5440 3350 mode 2048x1536@60Hz DP-6 scale 1.5 DP-6 enable "*" bg /home//images/wallpapers/niHC9wI.jpg center #"*" max_render_time 1 } # ##################################################################### # Hardware specific bindings # ##################################################################### # ##################################################################### # Custom windows #for_window [title="Microsoft Teams Notification"] floating enable, border none #for_window [title="Proton Mail Bridge"] floating enable, border none, resize set 450 300 #for_window [class="Microsoft-edge"] border pixel #for_window [title="FreeCAD Link Daily"] border pixel 1 # for_window [app_id="zoom"] floating enable # for_window [app_id="Zoom"] floating enable # for_window [class="zoom.real"] floating enable for_window [app_id="com.nextcloud.desktopclient.nextcloud"] floating enable, border none for_window [app_id="signal"] floating enable for_window [app_id="BeamNG.drive.x64"] floating enable, border none # for_window [class="steam_app_244210.*"] floating enable, border none # ##################################################################### # font for window titles. ISO 10646 = Unicode # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod # start a terminal bindsym $mod+t exec alacritty # for_window [class="URxvt"] border none # create a floating terminal bindsym $mod+Shift+t exec alacritty --title "Floating Terminal" --option window.opacity=0.8 for_window [title="Floating Terminal"] floating enable # launch keepass bindsym $mod+p exec keepassxc # make unlock window floating for_window [title="Unlock Database - KeePassXC"] floating enable, border normal # kill focused window bindsym $mod+Shift+Q kill #bindsym $ALT+F4 kill # rofi common arguments set $rofi_args \ -i \ -monitor -4 \ -location 2 \ -font 'Source Code Pro Medium 12' \ -theme android_notification.rasi set $tofi_args \ --require-match=false \ --anchor top \ --width 90% \ --height 40% \ --font-size 14 \ --border-width 5 \ --outline-width 0 \ --corner-radius 20 \ --result-spacing 5 \ --font=/usr/share/fonts/adobe-source-code-pro/SourceCodePro-Medium.otf \ --background-color=#000A # launch clipmenu # bindsym $ALT+Control+H exec CM_HISTLENGTH=15 CM_LAUNCHER=rofi clipmenu $rofi_args bindsym $ALT+Control+H exec cliphist list | tofi $tofi_args | cliphist decode | wl-copy -p # start rofi program launcher # bindsym $mod+d exec rofi -show run $rofi_args -sort # bindsym $mod+d exec wofi -S run bindsym $mod+d exec tofi-run $tofi_args |sh -- # start window switcher/search # bindsym $mod+w exec rofi -show window $rofi_args -sort bindsym $mod+w exec 'swaymsg -t get_tree |jq -c "recurse(.nodes[]) |select((.type == \\"con\\") and (.pid != null)) |{name:.name,pid:.pid}" |tofi $tofi_args |jq .pid | { read pid; swaymsg [pid="$pid"] focus; }' # Start screenshooter when the printscreen key is pressed # bindsym Print exec xfce4-screenshooter # This is actually the print screen key (PrtSc) which is mapped above # bindsym Shift+Menu exec xfce4-screenshooter bindsym Print exec $HOME/bin/screenshot.sh bindsym Shift+Print exec $HOME/bin/screencapture.sh # Launch Thunar # bindsym $mod+f exec thunar bindsym $mod+f exec nautilus # turn off focus follows mouse movement focus_follows_mouse no # turn off mouse follows focus #mouse_warping none # Control dunst bindsym Control+space exec dunstctl close bindsym Control+grave exec dunstctl history-pop bindsym Control+period exec dunstctl action bindsym Control+Shift+period exec dunstctl context # lock screen bindsym Pause exec swaylock -c 000000 # Change volume with volume keys bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +2% #increase sound volume bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -2% #decrease sound volume bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle # mute sound bindsym XF86AudioPlay exec playerctl play-pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous # pactl is called to set the default sink. The input to the set-default-sink command # comes from calling `pactl list short sinks`, adjusting the input, and passing it to # tofi, which is acting like dmenu to produce a graphical list of sinks by short name. # Selecting one of those sinks triggers the set-default-sink command to be executed, and # upon completion we send a -SIGRTMIN+4 signal to the status bar which listens and runs # a check on the default sink bindsym $mod+m exec pactl set-default-sink $(pactl list short sinks |awk '{print $2}' |tofi $tofi_args) && pkill -SIGRTMIN+4 i3status-rs # Make current window sticky (floating only) bindsym $mod+i sticky toggle # scratchpad modifiers: # move window to scratchpad bindsym $mod+Shift+minus move scratchpad # show the scratchpad (toggle) bindsym $mod+minus scratchpad show # change focus bindsym $mod+j focus left bindsym $mod+k focus down bindsym $mod+l focus up bindsym $mod+semicolon focus right # alternatively, you can use the cursor keys: bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right # move focused window bindsym $mod+Shift+J move left bindsym $mod+Shift+K move down bindsym $mod+Shift+L move up bindsym $mod+Shift+semicolon move right # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # split in horizontal orientation bindsym $mod+h split h # split in vertical orientation bindsym $mod+v split v # enter fullscreen mode for the focused container bindsym $mod+Return fullscreen # change container layout (stacked, tabbed, default) #bindsym $mod+s layout stacking bindsym $mod+s layout toggle stacking split # Remove in favor of rofi window switcher # bindsym $mod+w layout tabbed bindsym $mod+e layout toggle stacking split # Set opacity for fun bindsym $mod+period opacity minus .025 bindsym $mod+Shift+period opacity plus .025 # Set gap size for fun bindsym $mod+slash gaps inner all plus 1 bindsym $mod+Shift+slash gaps inner all minus 1 # toggle tiling / floating bindsym $mod+Shift+space floating toggle # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle # focus the parent container bindsym $mod+a focus parent # focus the child container bindsym $mod+q focus child # switch to workspace bindsym $mod+1 workspace 1 bindsym $mod+2 workspace 2 bindsym $mod+3 workspace 3 bindsym $mod+4 workspace 4 bindsym $mod+5 workspace 5 bindsym $mod+6 workspace 6 bindsym $mod+7 workspace 7 bindsym $mod+8 workspace 8 bindsym $mod+9 workspace 9 bindsym $mod+0 workspace 10 bindsym $mod+F1 workspace 11 bindsym $mod+F2 workspace 12 bindsym $mod+F3 workspace 13 bindsym $mod+F4 workspace 14 bindsym $mod+F5 workspace 15 bindsym $mod+F6 workspace 16 bindsym $mod+F7 workspace 17 bindsym $mod+F8 workspace 18 bindsym $mod+F9 workspace 19 bindsym $mod+F10 workspace 20 bindsym $mod+Tab workspace next_on_output bindsym $mod+Shift+Tab workspace prev_on_output # move focused container to workspace bindsym $mod+Shift+1 move container to workspace 1 bindsym $mod+Shift+2 move container to workspace 2 bindsym $mod+Shift+3 move container to workspace 3 bindsym $mod+Shift+4 move container to workspace 4 bindsym $mod+Shift+5 move container to workspace 5 bindsym $mod+Shift+6 move container to workspace 6 bindsym $mod+Shift+7 move container to workspace 7 bindsym $mod+Shift+8 move container to workspace 8 bindsym $mod+Shift+9 move container to workspace 9 bindsym $mod+Shift+0 move container to workspace 10 bindsym $mod+Shift+F1 move container to workspace 11 bindsym $mod+Shift+F2 move container to workspace 12 bindsym $mod+Shift+F3 move container to workspace 13 bindsym $mod+Shift+F4 move container to workspace 14 bindsym $mod+Shift+F5 move container to workspace 15 bindsym $mod+Shift+F6 move container to workspace 16 bindsym $mod+Shift+F7 move container to workspace 17 bindsym $mod+Shift+F8 move container to workspace 18 bindsym $mod+Shift+F9 move container to workspace 19 bindsym $mod+Shift+F10 move container to workspace 20 # move the whole workspace to the next output #bindsym $mod+x move workspace to output right bindsym $mod+x exec "swaymsg -t get_outputs |jq '[.[] | select(.active == true)] | .[(map(.focused) | index(true) + 1) % length].name' |xargs swaymsg move workspace to" # reload the configuration file bindsym $mod+Shift+C reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+R restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+E exit # resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode # Pressing left will shrink the window’s width. # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. bindsym j resize shrink width 10 px or 1 ppt bindsym k resize shrink height 10 px or 1 ppt bindsym l resize grow height 10 px or 1 ppt bindsym semicolon resize grow width 10 px or 1 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 1 ppt bindsym Down resize grow height 10 px or 1 ppt bindsym Up resize shrink height 10 px or 1 ppt bindsym Right resize grow width 10 px or 1 ppt # back to normal: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { #tray_output DisplayPort-2 #tray_output DisplayPort-4 tray_output DP-3 tray_output DP-5 status_command i3status-rs #status_command /home//git/personal/i3status-rust/target/debug/i3status-rs font pango:FreeSans, FontAwesome 9.5 } ```
OS: Arch Linux x86_64
Kernel: Linux 6.10.10-arch1-1
Shell: fish 3.7.1
Display (G274QPF-QD): 2560x1440 @ 165 Hz in 27″ [External]
Display (G274QPF-QD): 1440x2560 @ 165 Hz in 27″ [External]
Display (G274QPF-QD): 1440x2560 @ 165 Hz in 27″ [External]
Display (XR383CUR P): 3840x1600 @ 144 Hz in 38″ [External]
Display (Color LCD): 2048x1536 @ 60 Hz (as 1365x1024) in 10″ [External]
WM: Sway (Wayland)
Theme: Fusion [Qt], Adwaita-dark [GTK2/3]
Icons: Adwaita [Qt], Adwaita [GTK2/3]
Font: qt5ct [Qt], Nimbus Sans (10pt) [GTK2/3]
Cursor: Adwaita
Terminal: alacritty 0.13.2
Terminal Font: Source Code Pro (11pt)
CPU: AMD Ryzen 9 5950X (32) @ 3.40 GHz
GPU: AMD Radeon PRO W6800 [Discrete]
Memory: 8.19 GiB / 62.72 GiB (13%)
Swap: Disabled
Locale: en_US.UTF-8

I am unable to collect any logs because this appears to a complete and instant lockup. No kernel events are recorded after the point which it freezes and I have to use the physical reset button. I can not raise it over the network either. The link is up but it won't respond to any connections.

I can recreate it on demand by using wl-gammarelay-rs (or any gamma color changing application, it also happens with all the other ones) to adjust the color temperature of all 5 screens simultaneously but this is not the only thing that causes it. It also happens sometimes when physically connecting/disconnecting displays. It even does this with gammarelay not installed.

AFAICT this must be made worse by the number of connected displays as I ran the system with a single monitor for a while and it was much less frequent.

I got it to be less bad by writing a script to change color temperature one display at a time but it will still freeze every other time if I try to change the 3840x1600 display directly.

It is also much less frequent on the linux-lts kernel (6.6.51-1) than on the current arch kernel (6.10.10.arch1-1).

I hope this information helps someone figure this out. Thanks!