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
20.98k stars 880 forks source link

Tearing is broken/crashy #7215

Closed zakk4223 closed 1 month ago

zakk4223 commented 2 months ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit a399f98c68d017152883fbf81d67624ac3254073 (cursormgr: avoid scanning ill formed inherit (7211)). Date: Wed Aug 7 10:37:09 2024 Tag: v0.41.2-180-ga399f98c, commits: 5066 flags: (if any) System Information: System name: Linux Node name: blkheart Release: 6.10.3-2-cachyos-eevdf Version: #1 SMP PREEMPT_DYNAMIC Sun, 04 Aug 2024 14:19:29 +0000 GPU information: 0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1002:73bf] (rev c0) (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/zakk/.config/hypr/hyprland.conf: Read Succeeded # # Please note not all available settings / options are set here. # For a full list, see the wiki (basic and advanced configuring) # #monitor=,preferred,auto,1 source=~/.config/hypr/config.d/environment.conf source=~/.config/hypr/config.d/vars.conf #exec-once = $HOME/.local/share/hyprland/bin/load_plugins.sh exec-once = /home/zakk/proj/Hyprland/build/hyprpm/hyprpm reload -n -v > /tmp/hyprpm.wtf monitor=desc:Dell Inc. DELL U2414H R9F1P45A34CL,preferred,0x0,1 monitor=desc:LG Electronics LG ULTRAGEAR 008NTCZET747,3440x1440@160,1920x0,1 monitor=desc:Dell Inc. DELL U2414H R9F1P45D5L8L,preferred,5360x0,1 monitor=HDMI-A-1,preferred,7280x0,1 #monitor=HDMI-A-1,3840x2160@60,7280x0,2 monitor=WL-1,preferred,0x0,1 input { kb_file= kb_layout= kb_variant= kb_model= kb_options= kb_rules= follow_mouse=1 touchpad { natural_scroll=no } sensitivity=0 # -1.0 - 1.0, 0 means no modification. } cursor { no_hardware_cursors = false no_break_fs_vrr = false } general { gaps_in=8 gaps_out=20 border_size=2 col.active_border=rgb(a6e3a1) #col.active_border=0x66ee1111 col.inactive_border=rgb(40a02b) layout=workspacelayout resize_on_border=true hover_icon_on_border=false allow_tearing = true apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse) #damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer } render { direct_scanout=false explicit_sync=0 explicit_sync_kms=0 } decoration { dim_special=0 rounding=0 active_opacity = 1.0 inactive_opacity = 1.0 fullscreen_opacity = 1.0 drop_shadow = true shadow_range = 30 shadow_render_power = 3 col.shadow = 0x66000000 blur { enabled = true size = 6 passes = 2 ignore_opacity = true xray = false } } animations { enabled=0 animation=fadeOut,1,5000,default animation=border,1,10,default animation=workspaces,1,6,default } dwindle { pseudotile=0 # enable pseudotiling on dwindle } master { no_gaps_when_only=false new_on_top=true orientation=top always_center_master=true inherit_fullscreen=false } gestures { workspace_swipe=no } misc { vfr=true vrr=2 disable_hyprland_logo=true animate_mouse_windowdragging=false animate_manual_resizes=false focus_on_activate=false } #workspace=m[desc:Dell Inc. DELL U2414H R9F1P45A34CL],layoutopt:nstack-stacks:2,layoutopt:nstack-single_mfact:0.9 #workspace=m[desc:Dell Inc. DELL U2414H R9F1P45D5L8L],layoutopt:nstack-stacks:2,layoutopt:nstack-single_mfact:0.9 workspace=m[DP-4],layoutopt:nstack-stacks:2,layoutopt:nstack-single_mfact:0.9 workspace=m[DP-6],layoutopt:nstack-stacks:2,layoutopt:nstack-single_mfact:0.9 #workspace=d[w<=1920],layoutopt:nstack-stacks:2,layoutopt:nstack-single_mfact:0.9 # example window rules # for windows named/classed as abc and xyz #windowrule=move 69 420,abc #windowrule=size 420 69,abc #windowrule=tile,xyz #windowrule=float,abc #windowrule=pseudo,abc #windowrule=monitor 0,xyz #windowrulev2 = forceinput,xwayland:1 #windowrulev2 = idleinhibit fullscreen,class:^.*$ #windowrule = nofullscreenrequest, ^.*$ # windowrulev2 = float,class:^awakened-poe-trade$ windowrulev2 = noblur,class:^awakened-poe-trade$ #windowrulev2 = nofocus, class:^awakened-poe-trade$ #windowrulev2 = immediate,class:steam_app_1364760 #windowrulev2 = immediate,fullscreen:1 #windowrulev2 = stayfocused, title:^(.*)$,class:^(steam)$ #windowrulev2 = minsize 1 1, title:^(.*)$,class:^(steam)$ # windowrulev2 = suppressevent activatefocus,initialClass:^(steam)$ submap=__easymotionsubmap__ bind=SUPER,z,exec,hyprctl dispatch easymotionexit submap=reset # some nice mouse binds bindm=SUPER,mouse:272,movewindow bindm=SUPER,mouse:273,resizewindow # example binds bind=SUPER,RETURN,exec,$terminal bind=SUPER,W,killactive, bind=SUPER_SHIFT,SPACE,togglefloating, bind=SUPER,SPACE,exec,rofi -show drun -log /tmp/rofi.log bind=SUPER,P,pseudo, bind=SUPER,F,fullscreen,0 bind=SUPER_SHIFT,F,fullscreen,1 bind=SUPER,h,movefocus,l bind=SUPER,l,movefocus,r bind=SUPER,k,movefocus,u bind=SUPER,j,movefocus,d bind=SUPER_SHIFT,h,movewindow,l bind=SUPER_SHIFT,l,movewindow,r bind=SUPER_SHIFT,k,movewindow,u bind=SUPER_SHIFT,j,movewindow,d bind=SUPER_SHIFT,e,exec,wlogout -b 2 --protocol layer-shell bind=SUPER,delete,layoutmsg,orientationnext bind=SUPER_SHIFT,RETURN,layoutmsg,swapwithmaster bind=SUPER,s,exec,$HOME/.config/hypr/scripts/scratchpad_show_or_create.sh 'wez_scratch' 'wezterm start --class wez_scratch' bind=,Print,exec,/usr/bin/grimblast --notify copysave output bind=SUPER,Print,exec,/usr/bin/grimblast --notify copy area bind=SUPER_SHIFT,Print,exec,/usr/bin/grimshot --notify copysave area bind=CTRL,Print,exec,killall -SIGUSR1 gpu-screen-recorder #bind=SUPER_ALT,l,exec,/home/zakk/hyprlayout.sh bind = SUPER,PAUSE,pass,^(com\.obsproject\.Studio)$ bind=ALT_CTRL,right,cyclenext bind=ALT_CTRL,right,alterzorder,top bind=ALT_CTRL,left,cyclenext,prev bind=ALT_CTRL,left,alterzorder,top bind=SUPER,z,easymotion,action:hyprctl dispatch focuswindow address:{} source=~/.config/hypr/config.d/systemd-session.conf source=~/.config/hypr/config.d/workspaces.conf source=~/.config/hypr/config.d/floating.conf debug { suppress_errors=true disable_logs=false enable_stdout_logs=true } plugin { easymotion { textsize = 100 rounding = 10 } hyprwinwrap { class=awakened-poe-trade } wslayout { default_layout=nstack layouts=nstack monocle } xwaylandprimary { display=DP-1 } nstack { layout { mfact=0.0 new_on_top=true center_single_master=true stacks=3 } } hyprbars { # example config bar_height = 20 # example buttons (R -> L) # hyprbars-button = color, size, on-click hyprbars-button = rgb(ff4040), 10, 󰖭, hyprctl dispatch killactive hyprbars-button = rgb(eeee11), 10, , hyprctl dispatch fullscreen 1 } } xwayland { force_zero_scaling = true } Config File: /home/zakk/.config/hypr/config.d/environment.conf: Read Succeeded env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = MOZ_ENABLE_WAYLAND,1 env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = QT_QPA_PLATFORM,wayland;xcb env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = QT_QPA_PLATFORMTHEME,qt5ct env = SDL_VIDEODRIVER,wayland env = _JAVA_AWT_WM_NONEREPARENTING,1 env = CLUTTER_BACKEND,wayland env = GDK_BACKEND,wayland,x11 #env = AQ_NO_ATOMIC,1 Config File: /home/zakk/.config/hypr/config.d/vars.conf: Read Succeeded $terminal = "kitty" $filemanager = "thunar" Config File: /home/zakk/.config/hypr/config.d/systemd-session.conf: Read Succeeded exec-once=~/.config/hypr/scripts/session.sh --add-env HYPRLAND_INSTANCE_SIGNATURE Config File: /home/zakk/.config/hypr/config.d/workspaces.conf: Read Succeeded bind=SUPER,1,split:workspace,1 bind=SUPER,2,split:workspace,2 bind=SUPER,3,split:workspace,3 bind=SUPER,4,split:workspace,4 bind=SUPER,5,split:workspace,5 bind=SUPER,6,split:workspace,6 bind=SUPER,7,split:workspace,7 bind=SUPER,8,split:workspace,8 bind=SUPER,9,split:workspace,9 bind=SUPER,0,split:workspace,10 bind=SUPER_SHIFT,1,split:movetoworkspace,1 bind=SUPER_SHIFT,2,split:movetoworkspace,2 bind=SUPER_SHIFT,3,split:movetoworkspace,3 bind=SUPER_SHIFT,4,split:movetoworkspace,4 bind=SUPER_SHIFT,5,split:movetoworkspace,5 bind=SUPER_SHIFT,6,split:movetoworkspace,6 bind=SUPER_SHIFT,7,split:movetoworkspace,7 bind=SUPER_SHIFT,8,split:movetoworkspace,8 bind=SUPER_SHIFT,9,split:movetoworkspace,9 bind=SUPER_SHIFT,0,split:movetoworkspace,10 bind=SUPER,e,togglespecialworkspace,file bind=SUPER,F1,focusmonitor,DP-4 bind=SUPER,F2,focusmonitor,DP-1 bind=SUPER,F3,focusmonitor,DP-6 bind=SUPER,F5,focusmonitor,HDMI-A-1 bind=SUPER_SHIFT,F1,movewindow,mon:DP-4 bind=SUPER_SHIFT,F2,movewindow,mon:DP-1 bind=SUPER_SHIFT,F3,movewindow,mon:DP-6 bind=SUPER_SHIFT,F5,movewindow,mon:HDMI-A-1 workspace=special:file,on-created-empty:$filemanager Config File: /home/zakk/.config/hypr/config.d/floating.conf: Read Succeeded windowrulev2 = float,class:^(pavucontrol)$ windowrulev2 = float,class:^(nm-connection-editor)$ windowrulev2 = float,class:^(nm-openconnect-auth-dialog)$ windowrulev2 = opacity 0.0 override 0.0 override,initialTitle:^(Wine System Tray)$ windowrulev2 = noanim,initialTitle:^(Wine System Tray)$ windowrulev2 = noinitialfocus,initialTitle:^(Wine System Tray)$ windowrulev2 = maxsize 1 1,initialTitle:^(Wine System Tray)$ windowrulev2 = noblur,initialTitle:^(Wine System Tray)$ ======Config-End======== ```

Description

(kernel says 6.10.3, but I'm seeing the same thing on 6.9.9).

allow_tearing=true

vkcube --present_mode 0 (or any vulkan app with vsync off) seems limited to around 75fps when fullscreened.

Log is spammed with a bunch of: [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_ASYNC

Often, if I move my mouse to another screen and focus it while vkcube is fullscreen, the entire machine just locks up. Drops off the network etc. No kernel logs or anything.

I've tried various permutations of explict_sync/direct scanout/vrr/hardware cursors etc and it seems consistent.

I did notice if I move the mouse over the fullscreen window it seems to modify the framerate?

Anyways, I think I remember it being a question about the 6900XT drivers being capable of async page flip when using the atomic API, but I figured the total lockup was worth a bug report.

Any other logs/debug stuff that might help track it down?

How to reproduce

enable tearing, run fullscreen vulkan app with IMMEDIATE present mode

Crash reports, logs, images, videos

[LOG] [LinuxDMABUF] Creating a dmabuf, with id 53: size [Vector2D: x: 3440, y: 1440], fmt XR24, planes 3 [LOG] [LinuxDMABUF] | plane 0: mod 144115188622392067 fd 147 stride 13824 offset 0 [LOG] [LinuxDMABUF] | plane 1: mod 144115188622392067 fd 148 stride 3584 offset 21233664 [LOG] [LinuxDMABUF] | plane 2: mod 144115188622392067 fd 149 stride 4096 offset 21323776 [LOG] [LinuxDMABUF] Creating a dmabuf, with id 46: size [Vector2D: x: 3440, y: 1440], fmt XR24, planes 3 [LOG] [LinuxDMABUF] | plane 0: mod 144115188622392067 fd 150 stride 13824 offset 0 [LOG] [LinuxDMABUF] | plane 1: mod 144115188622392067 fd 151 stride 3584 offset 21233664 [LOG] [LinuxDMABUF] | plane 2: mod 144115188622392067 fd 152 stride 4096 offset 21323776 [ERR] [AQ] drm: Cannot commit when a page-flip is awaiting [LOG] [LinuxDMABUF] Creating a dmabuf, with id 43: size [Vector2D: x: 3440, y: 1440], fmt XR24, planes 3 [LOG] [LinuxDMABUF] | plane 0: mod 144115188622392067 fd 155 stride 13824 offset 0 [LOG] [LinuxDMABUF] | plane 1: mod 144115188622392067 fd 156 stride 3584 offset 21233664 [LOG] [LinuxDMABUF] | plane 2: mod 144115188622392067 fd 159 stride 4096 offset 21323776 [LOG] [LinuxDMABUF] Creating a dmabuf, with id 50: size [Vector2D: x: 3440, y: 1440], fmt XR24, planes 3 [LOG] [LinuxDMABUF] | plane 0: mod 144115188622392067 fd 161 stride 13824 offset 0 [LOG] [LinuxDMABUF] | plane 1: mod 144115188622392067 fd 163 stride 3584 offset 21233664 [LOG] [LinuxDMABUF] | plane 2: mod 144115188622392067 fd 164 stride 4096 offset 21323776 [LOG] [LinuxDMABUF] Creating a dmabuf, with id 49: size [Vector2D: x: 3440, y: 1440], fmt XR24, planes 3 [LOG] [LinuxDMABUF] | plane 0: mod 144115188622392067 fd 165 stride 13824 offset 0 [LOG] [LinuxDMABUF] | plane 1: mod 144115188622392067 fd 168 stride 3584 offset 21233664 [LOG] [LinuxDMABUF] | plane 2: mod 144115188622392067 fd 176 stride 4096 offset 21323776 [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_ASYNC [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_ASYNC [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_ASYNC [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_ASYNC [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_ASYNC [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_ASYNC [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_ASYNC

vaxerski commented 2 months ago

tearing is generally experimental and flaky on atomic from what I know. It's best not to use it for the moment being

zakk4223 commented 2 months ago

Wait I lied:

If I disable VRR I can't get the lockups to happen anymore and I get a solid 60fps that seems unaffected by mouse movement. That's the refresh rate of my slowest monitor(s).

Log is still spammed with the failed drm request logs

zakk4223 commented 2 months ago

Non atomic produces modern art

https://github.com/user-attachments/assets/15d0532c-cc03-4b07-99f5-4cf7db8212aa

It certainly used to work ok on non atomic. I’ll bisect later if it matters but otherwise I’ll just turn tearing off

phonetic112 commented 2 months ago

Tearing on atomic was working for me with this kernel patch, but now I have this same issue. I bisected it as https://github.com/hyprwm/aquamarine/commit/18c6a8ccaf6f17264f153440703cab9feae47988

Colt-M16A1 commented 1 month ago

Tearing on atomic was working for me with this kernel patch, but now I have this same issue. I bisected it as hyprwm/aquamarine@18c6a8c

reverting the flags &= ~DRM_MODE_PAGE_FLIP_EVENT; part really fixes the issue

vaxerski commented 1 month ago

feel free to MR. If more people report it working, it's a fine fix I guess

izmyname commented 1 month ago

With the tearing fix merged, should this be open?

vaxerski commented 1 month ago

prolly not