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.65k stars 902 forks source link

Screen flickering with mouse movement in Minecraft #7103

Closed Trimutex closed 3 months ago

Trimutex commented 3 months ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit e67322034037fef22079c8e480be38c1d04b5a4a (core/surface: fixup a few pointer handling edge cases). Date: Mon Jul 29 12:29:08 2024 Tag: v0.41.2-133-ge6732203, commits: 5019 flags: (if any) System Information: System name: Linux Node name: armory Release: 6.10.2-zen1-1-zen Version: #1 ZEN SMP PREEMPT_DYNAMIC Sat, 27 Jul 2024 16:49:32 +0000 GPU information: 03:00.0 VGA compatible controller [0300]: Intel Corporation DG2 [Arc A770] [8086:56a0] (rev 08) (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/trianta/.config/hypr/hyprland.conf: Read Succeeded source = ~/.config/hypr/mocha.conf # Catppuccin colorscheme # < Start Section > # monitors monitor=DP-1, 3440x1440@160, 0x0, 1, vrr, 1, bitdepth, 8 # < End Section > # < Start Section > # environment variables env = xdg_current_desktop,hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = MOZ_ENABLE_WAYLAND,1 env = HYPRCURSOR_THEME, rose-pine-hyprcursor env = HYPRCURSOR_SIZE, 24 # < End Section > # < Start Section > # startup applications # environment launches exec-once = ~/.config/hypr/scripts/resetxdgportal.sh # reset XDPH for screenshare exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE exec-once = dbus-update-activation-environment --systemd --all exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = /usr/lib/polkit-kde-authentication-agent-1 # authentication dialogue for GUI apps exec-once = gsettings set org.gnome.desktop.interface gtk-theme 'Catppuccin-Mocha' exec-once = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' # xrandr settings exec-once = ~/.config/hypr/scripts/xrandr.sh # background applications exec-once = waybar -c ~/.config/waybar/config exec-once = dunst exec-once = swww-daemon exec-once = syncthing --no-browser exec-once = xwaylandvideobridge # main applications exec-once = discord exec-once = spotify --disable-gpu exec-once = cool-retro-term exec-once = firefox #exec-once = taskset -c 1-7 steam #exec-once = bolt # < End Section > # < Start Section > # workspace rules # gaps numbers (top, right, bottom, left) workspace = 1, monitor:DP-1, persistent:true, default:true workspace = 2, monitor:DP-1, persistent:true, gapsout:160 756 146 756 workspace = 3, monitor:DP-1, persistent:true, gapsout:50 440 50 440 workspace = 4, monitor:DP-1, persistent:true, gapsout:45 0 0 0 # Workspaces swapped for ease of use workspace = 6, monitor:DP-1, persistent:true workspace = 5, monitor:DP-1, persistent:true # < End Section > # < Start Section > # variables general { gaps_in = 0 gaps_out = 8 border_size = 3 col.active_border = $peach #col.inactive_border = $peach layout = dwindle resize_on_border = false } decoration { rounding = 6 drop_shadow = false dim_special = 0.3 fullscreen_opacity = 1.0 blur { enabled = yes special = true size = 6 passes = 3 new_optimizations = on ignore_opacity = on xray = false } } animations { enabled = yes bezier = wind, 0.05, 0.9, 0.1, 1.05 bezier = winIn, 0.1, 1.1, 0.1, 1.1 bezier = winOut, 0.3, -0.3, 0, 1 bezier = liner, 1, 1, 1, 1 animation = windows, 1, 6, wind, slide animation = windowsIn, 1, 6, winIn, slide animation = windowsOut, 1, 5, winOut, slide animation = windowsMove, 1, 5, wind, slide animation = border, 1, 1, liner animation = borderangle, 1, 30, liner, loop animation = fade, 1, 10, default animation = workspaces, 1, 5, wind } input { kb_layout = us kb_options = caps:swapescape follow_mouse = 2 mouse_refocus = false; sensitivity = -.75 # -1.0 - 1.0, 0 means no modification. force_no_accel = 1 } group { col.border_active = rgba(ca9ee6ff) rgba(f2d5cfff) 45deg col.border_inactive = rgba(b4befecc) rgba(6c7086cc) 45deg col.border_locked_active = rgba(ca9ee6ff) rgba(f2d5cfff) 45deg col.border_locked_inactive = rgba(b4befecc) rgba(6c7086cc) 45deg } misc { disable_hyprland_logo = true disable_splash_rendering = true force_default_wallpaper = 0 vrr = 1 vfr = true no_direct_scanout = true } xwayland { use_nearest_neighbor = true force_zero_scaling = false } cursor { no_hardware_cursors = true inactive_timeout = 2 no_warps = false default_monitor = DP-1 } debug { disable_logs = true #disable_logs = false } experimental { explicit_sync = true } # < End Section > # < Start Section > # dwindle layout dwindle { pseudotile = yes preserve_split = yes } # < End Section > # < Start Section > # master layout master { new_status = master } # < End Section > # < Start Section > # window rules # core windowrulev2 = opacity 0.80 0.80,class:^(.*)$ windowrulev2 = opacity 0.80 0.70,class:^(pavucontrol)$ windowrulev2 = opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$ windowrulev2 = float, class:^(qt5ct)$ windowrulev2 = float, class:^(nwg-look)$ windowrulev2 = float, class:^(pavucontrol)$ windowrulev2 = float, class:^(org.kde.polkit-kde-authentication-agent-1)$ # main windowrulev2 = workspace 1 silent, class:^(discord)$ windowrulev2 = workspace 1 silent, class:^(Dopamine)$ windowrulev2 = workspace 1 silent, class:^(Spotify)$ windowrulev2 = workspace 2 silent, class:^(cool-retro-term.cool-retro-term)$ windowrulev2 = workspace 3 silent, class:^(firefox)$ windowrulev2 = workspace 4 silent, class:^(steam)$ windowrulev2 = workspace 4 silent, title:^(Minecraft.*)$ windowrulev2 = workspace 4 silent, class:^(steam_app_.*)$ windowrulev2 = workspace 4 silent, class:^(steam_proton)$ windowrulev2 = workspace 4 silent, class:^(hl2_linux)$ windowrulev2 = workspace 4 silent, class:^(gamescope)$ windowrulev2 = workspace 5 silent, class:^(steam)$ windowrulev2 = workspace 6 silent, class:^(Bolt.*)$ # development windowrulev2 = pseudo, title:^(SnakePlusPlus)$ windowrulev2 = center, title:^(SnakePlusPlus)$ windowrulev2 = opacity 0.4, title:^(SnakePlusPlus)$ windowrulev2 = float, title:^(TetrisPlusPlus)$ windowrulev2 = center, title:^(TetrisPlusPlus)$ # games # 16:9 windowed - 1920 1080 # 21:9 windowed - 2560 1080 # 32:9 windowed - 3200 900 # theoretical mix - 3200 1100 # runelite windowrulev2 = opacity 1.00 override 1.00 override, class:^(net-runelite-client-RuneLite)$ windowrulev2 = pseudo, class:^(net-runelite-client-RuneLite)$ windowrulev2 = size 825 520, class:^(net-runelite-client-RuneLite)$ # minecraft windowrulev2 = opacity 1.00 override 1.00 override, title:^(Minecraft.*)$ windowrulev2 = pseudo, title:^(Minecraft.*)$ windowrulev2 = size 3200 1100, title:^(Minecraft.*)$ # native windowrulev2 = opacity 1.00 override 1.00 override, class:^(steam_app_.*)$ windowrulev2 = pseudo, class:^(steam_app_.*)$ #windowrulev2 = size 3200 900, class:^(steam_app_.*)$ # proton windowrulev2 = opacity 1.00 override 1.00 override, class:^(steam_proton)$ windowrulev2 = pseudo, class:^(steam_proton)$ #windowrulev2 = size 3200 900, class:^(steam_proton)$ # hl2 (css, etc) windowrulev2 = opacity 1.00 override 1.00 override, class:^(hl2_linux)$ # gamescope windowrulev2 = opacity 1.00 override 1.00 override, class:^(gamescope)$ windowrulev2 = pseudo, class:^(gamescope)$ windowrulev2 = size 3200 1100, class:^(gamescope)$ # layer rules layerrule = blur,waybar layerrule = ignorezero, waybar # xwaylandvideobridge windowrulev2 = opacity 0.0 override,class:^(xwaylandvideobridge)$ windowrulev2 = noanim,class:^(xwaylandvideobridge)$ windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$ windowrulev2 = noblur,class:^(xwaylandvideobridge)$ # < End Section > # < Start Section > # keybinds # main modifier $mainMod = SUPER # passthrough bind = , mouse:275, pass, ^(discord)$ bind = SHIFT, mouse:275, pass, ^(discord)$ # core binds bind = $mainMod SHIFT, Q, killactive, bind = $mainMod SHIFT, M, exit bind = $mainMod, SPACE, togglefloating, bind = $mainMod, F, fullscreen, bind = $mainMod SHIFT, L, exec, hyprlock bind = $mainMod $CONTROL, ESCAPE, exec, killall waybar || waybar # toggle waybar bind = $mainMod SHIFT, J, togglesplit, # dwindle bind = $mainMod SHIFT, SPACE, pseudo, # dwindle # main application shortcuts bind = $mainMod, RETURN, exec, cool-retro-term bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | wl-copy bind = $mainMod SHIFT, 7, exec, taskset -c 1-7 prismlauncher bind = $mainMod, S, exec, pkill -x rofi || rofi -show drun # generic audio control binde = , XF86AudioPlay, exec, playerctl play-pause binde = , XF86AudioStop, exec, playerctl stop binde = , XF86AudioPrev, exec, playerctl previous binde = , XF86AudioNext, exec, playerctl next binde = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% binde = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% # custom audio control binde = $mainMod, F1, exec, playerctl play-pause binde = $mainMod, F2, exec, playerctl previous binde = $mainMod, F3, exec, playerctl next # move focus bind = $mainMod, h, movefocus, l bind = $mainMod, l, movefocus, r bind = $mainMod, k, movefocus, u bind = $mainMod, j, movefocus, d # workspaces 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 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 ALT, 1, movetoworkspacesilent, 1 bind = $mainMod ALT, 2, movetoworkspacesilent, 2 bind = $mainMod ALT, 3, movetoworkspacesilent, 3 bind = $mainMod ALT, 4, movetoworkspacesilent, 4 bind = $mainMod ALT, 5, movetoworkspacesilent, 5 bind = $mainMod ALT, 6, movetoworkspacesilent, 6 # resizing windows binde = $mainMod, right, resizeactive, 5 0 binde = $mainMod, left, resizeactive, -5 0 binde = $mainMod, up, resizeactive, 0 -5 binde = $mainMod, down, resizeactive, 0 5 bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # < End Section > Config File: /home/trianta/.config/hypr/mocha.conf: Read Succeeded $rosewaterAlpha = fff5e0dc $flamingoAlpha = fff2cdcd $pinkAlpha = fff5c2e7 $mauveAlpha = ffcba6f7 $redAlpha = fff38ba8 $maroonAlpha = ffeba0ac $peachAlpha = fffab387 $yellowAlpha = fff9e2af $greenAlpha = ffa6e3a1 $tealAlpha = ff94e2d5 $skyAlpha = ff89dceb $sapphireAlpha = ff74c7ec $blueAlpha = ff89b4fa $lavenderAlpha = ffb4befe $textAlpha = ffcdd6f4 $subtext1Alpha = ffbac2de $subtext0Alpha = ffa6adc8 $overlay2Alpha = ff9399b2 $overlay1Alpha = ff7f849c $overlay0Alpha = ff6c7086 $surface2Alpha = ff585b70 $surface1Alpha = ff45475a $surface0Alpha = ff313244 $baseAlpha = ff1e1e2e $mantleAlpha = ff181825 $crustAlpha = ff11111b $rosewater = 0xfff5e0dc $flamingo = 0xfff2cdcd $pink = 0xfff5c2e7 $mauve = 0xffcba6f7 $red = 0xfff38ba8 $maroon = 0xffeba0ac $peach = 0xfffab387 $yellow = 0xfff9e2af $green = 0xffa6e3a1 $teal = 0xff94e2d5 $sky = 0xff89dceb $sapphire = 0xff74c7ec $blue = 0xff89b4fa $lavender = 0xffb4befe $text = 0xffcdd6f4 $subtext1 = 0xffbac2de $subtext0 = 0xffa6adc8 $overlay2 = 0xff9399b2 $overlay1 = 0xff7f849c $overlay0 = 0xff6c7086 $surface2 = 0xff585b70 $surface1 = 0xff45475a $surface0 = 0xff313244 $base = 0xff1e1e2e $mantle = 0xff181825 $crust = 0xff11111b ======Config-End======== ```

Description

Minecraft is flickering black just like Nvidia was before explicit sync released (post 535 and prior to 555).

Bisected with commit daed752 being the start of bad commits.

How to reproduce

  1. Be on a commit after daed752
  2. Start Minecraft
  3. Go into any world
  4. Move mouse around, flickering occurs

Crash reports, logs, images, videos

No response

Stoppedpuma commented 3 months ago

This may be a problem with xwayland windows entirely or maybe just games under xwayland? A user reported similar behaviour over on osu! discussions when tabbing in and out of the game, I'm able to reproduce this behaviour on latest git commit on an AMD system. I am noticing more than flickering as well though such as texture corruption.

Trimutex commented 3 months ago

Seems to be a result of !previousBuffer->resource->released on line 454 resulting in true too often. Keeping the original method of bufferReleased and using it here solves the issue.

Rattlyy commented 3 months ago

bump, also having this.

vaxerski commented 3 months ago

see #7110

Trimutex commented 3 months ago

see #7110

This indeed fixes the issue for me, thanks!