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.51k stars 818 forks source link

[Bug] Screen glitches on external monitor #6935

Open nktnet1 opened 1 month ago

nktnet1 commented 1 month ago

Regression?

No

System Info and Version

System/Version info ```sh $ hyprctl systeminfo -c Hyprland, built from branch main at commit 9b0993cc49b7285a2724a87fdb72bfc90cc75cc5 dirty (--- a/docs/Hyprland.1). Date: Sat Jul 20 08:37:42 2024 Tag: v0.41.2-47-g9b0993cc, commits: 4933 flags: (if any) System Information: System name: Linux Node name: Tam Release: 6.9.9-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 12 Jul 2024 00:06:53 +0000 GPU information: 0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-S UHD Graphics [8086:a788] (rev 04) (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: hyprsplit by shezdy ver 1.0 ```

(full config posted as comment further below)

Description

Issue

I get distorted screens/glitches while watching YouTube videos on Firefox on either of my external monitors after a few minutes, or by using Hyprland for a long period of time.

snapshot

(see video further below)

Another observation is that GPU is at 90%-100% when watching YouTube videos in browsers. After pausing/closing the YouTube tab, GPU drops to 1-5% (regardless of how many other things are opened, as long as they're static content), but glitches still happened despite low GPU usage (unsure of correlation).

Specs

Category Value
OS Arch Linux x86_64
Host Predator PHN16-71 (V1.15)
Kernel Linux 6.9.9-arch1-1
Display (LG FULL HD) 1920x1080 @ 60Hz
Display (HP LA2206) 1920x1080 @ 60Hz
Display (BOE0A2C) 2560x1600 @ 60Hz (as 1602x1001) [Built-in]
WM Hyprland (Wayland)
CPU 13th Gen Intel(R) Core(TM) i9-13900HX (32) @ 5.40 GHz
GPU Intel Raptor Lake-S UHD Graphics @ 1.65 GHz [Integrated]
Memory 6.70 GiB / 31.07 GiB (22%)
Swap 0 B / 32.00 GiB (0%)
Disk (/) 110.05 GiB / 502.89 GiB (22%) - ext4

My device is a hybrid laptop with an Nvidia dGPU, but I've disabled the dGPU - only the Intel iGPU shows up for

$ lspci | grep -E 'VGA|3D'
0000:00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-S UHD Graphics (rev 04)

I'm also using the evdi/displaylink patch (details), although the only caveat (as mentioned by the patch author) was that

This hack disables support for multi GPU, so wlroots doesn't try to initialize renderers on DisplayLink devices

which shouldn't be a problem as I effectively only have the intel GPU enabled.

Things I've tried (same result)

Also, this is what debug:overlay looks like when the video is playing on the last monitor (DVI-I-1): screenshot-20240720-201234

which is odd since I've capped all 3 monitors at 60 (the bottom 2 external ones can go into the hundreds).

Issue doesn't exist when

How to reproduce

Assuming a similar setup/specs,

  1. Open FireFox in an external monitor
  2. Play YouTube videos, or use Hyprland for a while
  3. Glitches will occur

Crash reports, logs, images, videos

Short Version

compressed.webm

Long Version

https://youtu.be/7VbZVfVuR50

nktnet1 commented 1 month ago

Full config (was too long in original post):

click to view ```sh $ hyprctl systeminfo -c Hyprland, built from branch main at commit 9b0993cc49b7285a2724a87fdb72bfc90cc75cc5 dirty (--- a/docs/Hyprland.1). Date: Sat Jul 20 08:37:42 2024 Tag: v0.41.2-47-g9b0993cc, commits: 4933 flags: (if any) System Information: System name: Linux Node name: Tam Release: 6.9.9-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 12 Jul 2024 00:06:53 +0000 GPU information: 0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-S UHD Graphics [8086:a788] (rev 04) (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: hyprsplit by shezdy ver 1.0 ======Config-Start====== Config File: /home/nktnet/.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. # ####################################################################################### # This is an example Hyprland config file. # Refer to the wiki for more information. # https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ # Please note not all available settings / options are set here. # For a full list, see the wiki # You can split this configuration into multiple files # Create your files separately and then link them to this file like this: # source = ~/.config/hypr/myColors.conf ################ ### MONITORS ### ################ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor = desc:BOE 0x0A2C,2560x1600@60, auto, 1.6 monitor = desc:Hewlett Packard HP LA2206 CNC1320BJL, 1920x1080@60,auto-left, 1 monitor = desc:LG Electronics LG FULL HD 0x01010101, 1920x1080@60,auto-right, 1 #monitor=desc:LG Electronics LG FULL HD 0x01010101,1920x1080@60,1600x0, 1 # 2560 / 1.6 = 2600 #monitor=desc:Hewlett Packard HP LA2206 CNC1320BJL,1920x1080@60,-1920x0, 1 # 2560 / 1.6 = 2600 #monitor=name,disable #monitor=eDP-1,2560x1600@60,0x0,1.6 #monitor=DVI-I-1,preferred, auto, 1 # 2560 / 1.6 = 2600 #monitor=DVI-I-2,preferred, auto, 1 # 2560 / 1.6 = 2600 ################### ### MY PROGRAMS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ ################# ### AUTOSTART ### ################# # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = hyprpm reload && hyprctl reload exec-once = wl-paste --type text --watch cliphist store # Stores only text data exec-once = wl-paste --type image --watch cliphist store # Stores only image data exec-once = pidof hypridle || hypridle exec-once = pidof waybar || waybar exec-once = pidof solaar || solaar --window hide --battery-icons solaar exec-once = pidof emote || emote exec-once = pidof -x low_battery.sh || $HOME/.config/hypr/scripts/low_battery.sh ############################# ### ENVIRONMENT VARIABLES ### ############################# # See https://wiki.hyprland.org/Configuring/Environment-variables/ env = XCURSOR_SIZE,24 env = GTK_USE_PORTAL,0 env = HYPRCURSOR_SIZE,24 env = GTK_THEME,Breeze:dark #env = LIBVA_DRIVER_NAME,nvidia #env = XDG_SESSION_TYPE,wayland #env = GBM_BACKEND,nvidia-drm #env = __GLX_VENDOR_LIBRARY_NAME,nvidia #env = WLR_DRM_DEVICES,$HOME/.config/hypr/cards/nvidiacard #env = WLR_DRM_DEVICES,$HOME/.config/hypr/cards/nvidiacard:$HOME/.config/hypr/cards/intelcard #env = WLR_DRM_DEVICES,$HOME/.config/hypr/cards/intelcard:$HOME/.config/hypr/cards/nvidiacard #env = WLR_DRM_DEVICES,$HOME/.config/hypr/cards/intelcard:$HOME/.config/hypr/cards/platform-evdi.0-card:$HOME/.config/hypr/cards/platform-evdi.1-card env = GDK_SCALE,2 #xwayland { # force_zero_scaling = true #} cursor { no_hardware_cursors = true hide_on_key_press = true #inactive_timeout = 1000 } ##################### ### LOOK AND FEEL ### ##################### # Refer to https://wiki.hyprland.org/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 1 gaps_out = 1 border_size = 1 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = false # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false layout = master } # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { rounding = 0 # Change transparency of focused and unfocused windows active_opacity = 1.0 inactive_opacity = 1.0 drop_shadow = false #shadow_range = 4 #shadow_render_power = 3 #col.shadow = rgba(1a1a1aee) # https://wiki.hyprland.org/Configuring/Variables/#blur blur { enabled = false #size = 3 #passes = 1 #vibrancy = 0.1696 } } # https://wiki.hyprland.org/Configuring/Variables/#animations animations { enabled = false first_launch_animation = false # 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 } # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more dwindle { pseudotile = true # Master switch for pseudotiling. Enabling is bound to modkey + P in the keybinds section below preserve_split = true # You probably want this } # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more master { new_status = slave no_gaps_when_only = 1 inherit_fullscreen = true } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { force_default_wallpaper = 0 disable_hyprland_logo = true disable_splash_rendering = true new_window_takes_over_fullscreen = 1 exit_window_retains_fullscreen = true allow_session_lock_restore = true vfr = true vrr = 1 mouse_move_enables_dpms = false } ############# ### INPUT ### ############# # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = us kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 1 sensitivity = 0 # -1.0 - 1.0, 0 means no modification. kb_options = altwin:menu_win touchpad { natural_scroll = false tap-to-click = true } } # https://wiki.hyprland.org/Configuring/Variables/#gestures gestures { workspace_swipe = false } # 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 } debug { overlay = false disable_logs = false disable_time = false suppress_errors = false enable_stdout_logs = true } #################### ### KEYBINDINGSS ### #################### source = $HOME/.config/hypr/config/keybindings.conf ############################## ### WINDOWS AND WORKSPACES ### ############################## # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules windowrulev2 = float,title:(Floating Window - Show Me The Key) windowrulev2 = pin,title:(Floating Window - Show Me The Key) windowrulev2 = move 100%-w-20, 100%-h-20,title:(Floating Window - Show Me The Key) windowrulev2 = move 100%-w-20, 100%-h-20,title:(swappy) windowrulev2 = move 100%-w-20, 100%-h-20,title:(Calculator) windowrulev2 = float,title:(Calculator) #windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. ################ ### PLUGINS ### ################ source = $HOME/.config/hypr/plugins/hyprsplit.conf ################ ### APPS ### ################ source = $HOME/.config/hypr/apps/gromit-mpx.conf Config File: /home/nktnet/.config/hypr/config/keybindings.conf: Read Succeeded # See https://wiki.hyprland.org/Configuring/Keywords/ # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Modifiers $modkey = ALT $winkey = SUPER # Insert submap bindings bind = $modkey, I, submap, insert submap = insert bind = $modkey, I, submap, reset submap = reset # Programs $mfa = ente_auth $terminal = kitty $fileManager = thunar $menu = wofi --show drun # Direct functionalities #bind = , PRINT, exec, hyprshot --freeze --mode region bind = , PRINT, exec, hyprshot --freeze --mode=region --raw --clipboard-only | swappy -f - bind = , XF86PowerOff, exec, wlogout # Application launchers bind = $winkey SHIFT, D, togglespecialworkspace, gromit bind = $winkey, 2, exec, $mfa bind = $winkey, B, exec, pidof waybar || waybar bind = $winkey, C, exec, gnome-calculator bind = $winkey, D, exec, gromit-mpx --quit || hyprctl dispatch togglespecialworkspace gromit bind = $winkey, E, exec, $fileManager bind = $winkey, F, exec, firefox bind = $winkey, G, exec, google-chrome-stable bind = $winkey, L, exec, hyprlock bind = $winkey, M, exec, $terminal -e btop bind = $winkey, P, exec, hyprpicker --autocopy --no-fancy bind = $winkey, Q, exec, $terminal bind = $winkey, R, exec, rnote bind = $winkey, Return, exec, $terminal bind = $winkey, S, exec, killall showmethekey-gtk || showmethekey-gtk bind = $winkey, T, exec, gtk-launch chrome-cifhbcnohmdccbgoicgdjpfamggdegmo-Default.desktop # MS Teams bind = $winkey, U, exec, emote bind = $winkey, V, exec, pavucontrol bind = $modkey SHIFT, Return, exec, $terminal bind = $modkey, P, exec, $menu bind = $modkey, B, exec, killall -SIGUSR1 waybar bind = $modkey SHIFT, B, exec, killall -SIGUSR2 waybar bind = $modkey SHIFT, C, killactive, bind = $modkey SHIFT, Q, exec, killall -9 Hyprland bind = $modkey, F, togglefloating, bind = $modkey, R, fullscreen, 0 bind = $modkey, T, fullscreen, 1 bind = $modkey, M, fullscreen, 1 bind = $modkey, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy bind = $modkey, SPACE, fullscreen, 1 # Move Focus bind = $modkey, J, layoutmsg, cyclenext bind = $modkey, K, layoutmsg, cycleprev # Move active window bind = $modkey SHIFT, J, layoutmsg, swapnext bind = $modkey SHIFT, K, layoutmsg, swapprev bind = $modkey SHIFT, H, resizeactive, -50 0 bind = $modkey SHIFT, L, resizeactive, 50 0 # Resize active window binde = $modkey SHIFT, left, resizeactive, -50 0 binde = $modkey SHIFT, right, resizeactive, 50 0 binde = $modkey SHIFT, up, resizeactive, 0 -50 binde = $modkey SHIFT, down, resizeactive, 0 50 # Move active window binde = $modkey, right, moveactive, 50 0 binde = $modkey, left, moveactive, -50 0 binde = $modkey, up, moveactive, 0 -50 binde = $modkey, down, moveactive, 0 50 # Example special workspace (scratchpad) #bind = $modkey, S, togglespecialworkspace, magic #bind = $modkey SHIFT, S, movetoworkspace, special:magic # Scroll through existing workspaces with modkey + scroll bind = $modkey, mouse_down, workspace, e+1 bind = $modkey, mouse_up, workspace, e-1 # Move/resize windows with modkey + LMB/RMB and dragging bindm = $modkey, mouse:272, movewindow bindm = $modkey, mouse:273, resizewindow # Volume binde =, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+ binde =, XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%- bind =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle # Brightness binde =, XF86MonBrightnessUp, exec, brightnessctl set +5%+ binde =, XF86MonBrightnessDown, exec, brightnessctl set 5%- # Focus next/prev monitors bind = $modkey, COMMA, focusmonitor, l bind = $modkey, PERIOD, focusmonitor, r # Move window to next/prev monitors bind = $modkey SHIFT, COMMA, movewindow, mon:l bind = $modkey SHIFT, PERIOD, movewindow, mon:r bind = $winkey, COMMA, workspace, -1 bind = $winkey, PERIOD, workspace, +1 # ============================================================================ # # This was replaced by the hyprsplit plugin # https://github.com/shezdy/hyprsplit # See ~/.config/hypr/plugins/hyprsplit.conf ## Switch workspaces with modkey + [0-9] #bind = $modkey, 1, workspace, 1 #bind = $modkey, 2, workspace, 2 #bind = $modkey, 3, workspace, 3 #bind = $modkey, 4, workspace, 4 #bind = $modkey, 5, workspace, 5 #bind = $modkey, 6, workspace, 6 #bind = $modkey, 7, workspace, 7 #bind = $modkey, 8, workspace, 8 #bind = $modkey, 9, workspace, 9 #bind = $modkey, 0, workspace, 10 ## Move active window to a workspace with modkey + SHIFT + [0-9] #bind = $modkey SHIFT, 1, movetoworkspace, 1 #bind = $modkey SHIFT, 2, movetoworkspace, 2 #bind = $modkey SHIFT, 3, movetoworkspace, 3 #bind = $modkey SHIFT, 4, movetoworkspace, 4 #bind = $modkey SHIFT, 5, movetoworkspace, 5 #bind = $modkey SHIFT, 6, movetoworkspace, 6 #bind = $modkey SHIFT, 7, movetoworkspace, 7 #bind = $modkey SHIFT, 8, movetoworkspace, 8 #bind = $modkey SHIFT, 9, movetoworkspace, 9 #bind = $modkey SHIFT, 0, movetoworkspace, 10 Config File: /home/nktnet/.config/hypr/plugins/hyprsplit.conf: Read Succeeded plugin { hyprsplit { num_workspaces = 10 } } bind = $modkey, 1, split:workspace, 1 bind = $modkey, 2, split:workspace, 2 bind = $modkey, 3, split:workspace, 3 bind = $modkey, 4, split:workspace, 4 bind = $modkey, 5, split:workspace, 5 bind = $modkey, 6, split:workspace, 6 bind = $modkey, 7, split:workspace, 7 bind = $modkey, 8, split:workspace, 8 bind = $modkey, 9, split:workspace, 9 bind = $modkey, 0, split:workspace, 10 bind = $modkey SHIFT, 1, split:movetoworkspacesilent, 1 bind = $modkey SHIFT, 2, split:movetoworkspacesilent, 2 bind = $modkey SHIFT, 3, split:movetoworkspacesilent, 3 bind = $modkey SHIFT, 4, split:movetoworkspacesilent, 4 bind = $modkey SHIFT, 5, split:movetoworkspacesilent, 5 bind = $modkey SHIFT, 6, split:movetoworkspacesilent, 6 bind = $modkey SHIFT, 7, split:movetoworkspacesilent, 7 bind = $modkey SHIFT, 8, split:movetoworkspacesilent, 8 bind = $modkey SHIFT, 9, split:movetoworkspacesilent, 9 bind = $modkey SHIFT, 0, split:movetoworkspacesilent, 10 bind = $modkey, GRAVE, split:swapactiveworkspaces, current +1 bind = $modkey, G, split:grabroguewindows Config File: /home/nktnet/.config/hypr/apps/gromit-mpx.conf: Read Succeeded # GROMIT-MPX workspace = special:gromit, gapsin:0, gapsout:0, on-created-empty: gromit-mpx --active windowrulev2 = noblur, title:^(gromit-mpx)$ windowrulev2 = noshadow, title:^(gromit-mpx)$ windowrulev2 = maximize, title:^(gromit-mpx)$ windowrulev2 = opacity 1 override, 1 override,title:^(gromit-mpx)$ windowrulev2 = size 100% 100%, title:^(gromit-mpx)$ ======Config-End======== ```

Couldn't identify anything in the logs either (was too long/large to attach and had a lot of noise, but happy to reboot and attach everything until the first occurrence of the issue)

ikalco commented 1 month ago

does this still happen on #6608? it looks like direct scanout issues that were fixed there recently make sure misc:no_direct_scanout = false to enable it on the aq branch if you do test this

nktnet1 commented 1 month ago

does this still happen on #6608? it looks like direct scanout issues that were fixed there recently make sure misc:no_direct_scanout = false to enable it on the aq branch if you do test this

Thanks @ikalco - had some build issues with aquamarine + multi monitors (displaylink/evdi) not working, but will attempt again next weekend.

On another note, I've discovered that the high GPU usage on Firefox was caused by having Ambient Mode enabled (default) together with Dark Mode:

Turning this off fixes the GPU problem, although I've also confirmed that while this can sometimes cause the screen glitches, it's not the only cause (glitches can also happen randomly even on low GPU utilisation) - the main cause of the glitch seems to be dynamic content (moving things). Will investigate further.

nktnet1 commented 1 month ago

Short update - currently using the latest version of Hyprland, hyprctl systeminfo -c attached:

I patched aquamarine to work with DisplayLink/Evdi similar to wlroots:

And have tested both with misc:no_direct_scanout = false and misc:no_direct_scanout = true.

This does not affect/fix the rendering glitches on the external monitor, even with low GPU utilisation.

Attaching startup logs here: