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.75k stars 839 forks source link

Video stuttering while recording screen with OBS #7640

Open Xtr4F opened 2 weeks ago

Xtr4F commented 2 weeks ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 8f9887b0c9443d6c2559feeec411daecb9780a97 (Nix: remove unused dependencies). Date: Tue Sep 3 00:48:58 2024 Tag: v0.42.0-112-g8f9887b0, commits: 5181 flags: (if any) System Information: System name: Linux Node name: xtrafpc Release: 6.10.7-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Thu, 29 Aug 2024 16:48:57 +0000 GPU information: 00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Richland [Radeon HD 8670D] [1002:990c] (prog-if 00 [VGA controller]) Flags: bus master, VGA palette snoop, 66MHz, medium devsel, latency 64, IOMMU group 7 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/xtraf/.config/hypr/hyprland.conf: Read Succeeded source = ~/.config/hypr/keybind.conf source = ~/.config/hypr/exec.conf source = ~/.config/hypr/windowrule.conf source = ~/.config/hypr/env.conf monitor=HDMI-A-1, 1920x1080@75.0, 0x0, 1 xwayland { force_zero_scaling = true } # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us, ru kb_variant = kb_model = kb_options = grp:alt_shift_toggle repeat_rate=50 repeat_delay=500 special_fallthrough = true follow_mouse = 0 touchpad { natural_scroll = yes } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. accel_profile = flat } # █▀▀ █▀▀ █▄░█ █▀▀ █▀█ ▄▀█ █░░ # █▄█ ██▄ █░▀█ ██▄ █▀▄ █▀█ █▄▄ general { gaps_in = 2 gaps_out = 4 border_size = 3 #rgba(7D91D7FF) rgba(576FCCFF) 45deg col.active_border = rgba(00000000) col.inactive_border = rgba(00000000) no_border_on_floating = false # enable border on float window layout = dwindle no_focus_fallback = false # no_focus_fallback = false # resize_on_border = false } # █▀▄ █▀▀ █▀▀ █▀█ █▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ # █▄▀ ██▄ █▄▄ █▄█ █▀▄ █▀█ ░█░ █ █▄█ █░▀█ decoration { # █▀█ █▀█ █░█ █▄░█ █▀▄   █▀▀ █▀█ █▀█ █▄░█ █▀▀ █▀█ # █▀▄ █▄█ █▄█ █░▀█ █▄▀   █▄▄ █▄█ █▀▄ █░▀█ ██▄ █▀▄ rounding = 10 # █▀█ █▀█ ▄▀█ █▀▀ █ ▀█▀ █▄█ # █▄█ █▀▀ █▀█ █▄▄ █ ░█░ ░█░ #active_opacity = 0.95 inactive_opacity = 0.9 # █▄▄ █░░ █░█ █▀█ # █▄█ █▄▄ █▄█ █▀▄ blur { enabled = true size = 4 passes = 3 new_optimizations = true xray = false ignore_opacity = true } #layerrule = blur,waybar # █▀ █░█ ▄▀█ █▀▄ █▀█ █░█░█ # ▄█ █▀█ █▀█ █▄▀ █▄█ ▀▄▀▄▀ drop_shadow = false shadow_ignore_window = true shadow_offset = 1 1 shadow_range = 10 shadow_render_power = 3 col.shadow = rgba(00000099) } 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 } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = off } # █▀▄▀█ █ █▀ █▀▀ # █░▀░█ █ ▄█ █▄▄ # See https://wiki.hyprland.org/Configuring/Variables/ for more misc { disable_hyprland_logo = true disable_splash_rendering = true mouse_move_enables_dpms = true vfr = true vrr = 0 animate_manual_resizes = true mouse_move_focuses_monitor = true focus_on_activate = false initial_workspace_tracking = 2 } render { # Enables explicit sync support. explicit_sync = 1 } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more Config File: /home/xtraf/.config/hypr/keybind.conf: Read Succeeded # Set programs that you use $terminal = kitty $file_manager = nautilus $browser = firefox # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ bind = SUPER, Return, exec, $terminal bind = SUPER, E, exec, $file_manager bind = SUPER, B, exec, $browser bind = SUPER, A, exec, waypaper & bind = SUPER, R, exec, rofi -show drun || killall rofi #bind = SUPER, period, exec, killall rofi || rofi -show emoji -emoji-format "{emoji}" -modi emoji -theme ~/.config/rofi/global/emoji.rasi # Cursror keybind (temporary solution) $sensetivity_normal = 15 $mouse_mod = SUPER_SHIFT binde = $mouse_mod, W, exec, ydotool mousemove -x 0 -y -$sensetivity_normal binde = $mouse_mod, A, exec, ydotool mousemove -x -$sensetivity_normal -y 0 binde = $mouse_mod, S, exec, ydotool mousemove -x 0 -y $sensetivity_normal binde = $mouse_mod, D, exec, ydotool mousemove -x $sensetivity_normal -y 0 binde = , F2, exec, ydotool click 0xC0 binde = , F3, exec, ydotool click 0xC1 binde = SUPER CTRL, Q, exec, ydotool mousemove -w -x 0 -y 1 binde = SUPER CTRL, E, exec, ydotool mousemove -w -x 0 -y -1 # █▀▄▀█ █░█ █░░ ▀█▀ █ █▀▄▀█ █▀▀ █▀▄ █ ▄▀█ # █░▀░█ █▄█ █▄▄ ░█░ █ █░▀░█ ██▄ █▄▀ █ █▀█ bindel = , F8, exec, pulsemixer --change-volume +5 bindel = , F7, exec, pulsemixer --change-volume -5 binde = , F6, exec, pulsemixer --toggle-mute # █▀ █▀▀ █▀█ █▀▀ █▀▀ █▄░█ █▀ █░█ █▀█ ▀█▀ # ▄█ █▄▄ █▀▄ ██▄ ██▄ █░▀█ ▄█ █▀█ █▄█ ░█░ # # Screenshot a window bind = SUPER, PRINT, exec, hyprshot -m window # Screenshot a monitor bind = , Print, exec, grim - | wl-copy && wl-paste > ~/Pictures/Screenshots/Screenshot-$(date +%F_%T).png # Screenshot a region bind = SHIFT, PRINT, exec, grim -g "$(slurp)" -t png -o /home/xtraf/Pictures/Screenshots/s.png # █▀▄▀█ █ █▀ █▀▀ # █░▀░█ █ ▄█ █▄▄ bind = SUPER SHIFT, X, exec, hyprpicker -a -n bind = SUPER SHIFT, K, exec, hyprctl kill bind = SUPER SHIFT, Escape, exit # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀▄▀█ ▄▀█ █▄░█ ▄▀█ █▀▀ █▀▄▀█ █▀▀ █▄░█ ▀█▀ # ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █░▀░█ █▀█ █░▀█ █▀█ █▄█ █░▀░█ ██▄ █░▀█ ░█░ bind = SUPER, Q, killactive, bind = SUPER, F, fullscreen, bind = SUPER, Space, togglefloating, bind = SUPER, P, pin, # dwindle bind = SUPER, S, togglesplit, # dwindle # █▀▀ █▀█ █▀▀ █░█ █▀ # █▀░ █▄█ █▄▄ █▄█ ▄█ bind = SUPER, left, movefocus, l bind = SUPER, right, movefocus, r bind = SUPER, up, movefocus, u bind = SUPER, down, movefocus, d # █▀▄▀█ █▀█ █░█ █▀▀ # █░▀░█ █▄█ ▀▄▀ ██▄ bind = SUPER SHIFT, left, movewindow, l bind = SUPER SHIFT, right, movewindow, r bind = SUPER SHIFT, up, movewindow, u bind = SUPER SHIFT, down, movewindow, d # █▀█ █▀▀ █▀ █ ▀█ █▀▀ # █▀▄ ██▄ ▄█ █ █▄ ██▄ bind = SUPER CTRL, left, resizeactive, -20 0 bind = SUPER CTRL, right, resizeactive, 20 0 bind = SUPER CTRL, up, resizeactive, 0 -20 bind = SUPER CTRL, down, resizeactive, 0 20 # █▀ █▀█ █▀▀ █▀▀ █ ▄▀█ █░░ # ▄█ █▀▀ ██▄ █▄▄ █ █▀█ █▄▄ bind = SUPER, grave, togglespecialworkspace bind = SUPERSHIFT, grave, movetoworkspace, special # █▀ █░█░█ █ ▀█▀ █▀▀ █░█ # ▄█ ▀▄▀▄▀ █ ░█░ █▄▄ █▀█ bind = SUPER, 1, workspace, 1 bind = SUPER, 2, workspace, 2 bind = SUPER, 3, workspace, 3 bind = SUPER, 4, workspace, 4 bind = SUPER, 5, workspace, 5 bind = SUPER, 6, workspace, 6 bind = SUPER, 7, workspace, 7 bind = SUPER, 8, workspace, 8 bind = SUPER, 9, workspace, 9 bind = SUPER, 0, workspace, 10 bind = SUPER , TAB, workspace, e+1 bind = CTRL SUPER, TAB, workspace, e-1 # █▀▄▀█ █▀█ █░█ █▀▀ # █░▀░█ █▄█ ▀▄▀ ██▄ bind = SUPER SHIFT, 1, movetoworkspace, 1 bind = SUPER SHIFT, 2, movetoworkspace, 2 bind = SUPER SHIFT, 3, movetoworkspace, 3 bind = SUPER SHIFT, 4, movetoworkspace, 4 bind = SUPER SHIFT, 5, movetoworkspace, 5 bind = SUPER SHIFT, 6, movetoworkspace, 6 bind = SUPER SHIFT, 7, movetoworkspace, 7 bind = SUPER SHIFT, 8, movetoworkspace, 8 bind = SUPER SHIFT, 9, movetoworkspace, 9 bind = SUPER SHIFT, 0, movetoworkspace, 10 # █▀▄▀█ █▀█ █░█ █▀ █▀▀   █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ # █░▀░█ █▄█ █▄█ ▄█ ██▄   █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ bindm = SUPER, mouse:272, movewindow bindm = SUPER, mouse:273, resizewindow bind = SUPER, mouse_down, workspace, e+1 bind = SUPER, mouse_up, workspace, e-1 Config File: /home/xtraf/.config/hypr/exec.conf: Read Succeeded # Execute your favorite apps at launch exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 #exec-once = killall ags; ags -c /home/xtraf/.config/ags/my_conf_raw/config.js # ydotool exec-once = ydotoold # Themes, etc. exec-once = hyprctl setcursor catppuccin-mocha-lavender 32 exec-once = gsettings set org.gnome.desktop.interface gtk-theme "catppuccin-mocha-lavender-standard+default" exec-once = gsettings set org.gnome.desktop.interface icon-theme "Tela-circle-nord-dark" exec-once = gsettings set org.gnome.desktop.interface cursor-theme "catppuccin-mocha-lavender-cursors" exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dbus-update-activation-environment --systemd --all #wp exec-once = source /home/xtraf/.config/hypr/scripts/wp.sh Config File: /home/xtraf/.config/hypr/windowrule.conf: Read Succeeded # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀ # ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█ windowrule = float, file_progress windowrule = float, confirm windowrule = float, dialog windowrule = float, download windowrule = float, notification windowrule = float, error windowrule = float, splash windowrule = float, confirmreset windowrule = float, title:Open File windowrule = float, title:branchdialog windowrule = float, Lxappearance windowrule = float, Rofi windowrule = float, thunar windowrule = float,viewnior windowrule = float,feh windowrule = float, pavucontrol-qt windowrule = float, pavucontrol windowrule = float, file-roller windowrule = fullscreen, wlogout windowrule = float, title:wlogout windowrule = fullscreen, title:wlogout windowrule = idleinhibit focus, mpv windowrule = float, Windscribe windowrulev2 = float, title:^(Media viewer)$ windowrulev2 = float, title:^(Picture-in-Picture)$ windowrulev2 = float, class: ^(org.telegram.desktop)$, title: ^(Media viewer)$ windowrulev2 = float, class: ^(org.telegram.desktop)$, title: ^(Просмотр медиа)$ windowrulev2 = float, class:.* windowrulev2 = opacity 0.9 override 0.85, class:(kitty) layerrule = noanim, bar Config File: /home/xtraf/.config/hypr/env.conf: Read Succeeded # █▀▀ █▄░█ █░█ # ██▄ █░▀█ ▀▄▀ env = WLR_NO_HARDWARE_CURSORS,1 env = WLR_RENDERER_ALLOW_SOFTWARE,1 env = WLR_DRM_NO_ATOMIC,1 env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = QT_QPA_PLATFORM,wayland env = QT_STYLE_OVERRIDE,kvantum env = QT_QPA_PLATFORMTHEME,qt6ct env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = MOZ_ENABLE_WAYLAND,1 env = GDK_SCALE,1 env = XCURSOR_SIZE,32 env = GDK_BACKEND,wayland,x11 env = CLUTTER_BACKEND,wayland env = ELECTRON_OZONE_PLATFORM_HINT,wayland ======Config-End======== ```

Description

The screen recording is very stuttering when using OBS (stuttering can be seen only on recorded video, while recording everything is fine.)

How to reproduce

Launch OBS and start screen recording.

Crash reports, logs, images, videos

https://github.com/user-attachments/assets/0ed0c1e7-2815-48a6-b06b-c1127af90926

romanstingler commented 2 weeks ago

try lts kernel (or something lower than 6.10)

vaxerski commented 2 weeks ago

and check if the same happens when recording with something like wl-screenrec or wf-recorder. If not, this is a problem with xdph.

Xtr4F commented 2 weeks ago

I've tried lts kernel and stuttering is still there. Using wf-recorder solves the problem by the way. So, I wonder why this happens with OBS?

Aqa-Ib commented 2 weeks ago

If it is a regression, can you try bisecting xdg-desktop-portal-hyprland ?

Xtr4F commented 2 weeks ago

@Aqa-Ib

It didn't help. All commits newer than c5b30938710d6c599f3f5cd99a3ffac35381fb0f (and this one included) have this problem, and before this commit all versions build with the error:

In file included from /home/xtraf/git/xdg-desktop-portal-hyprland/src/core/../portals/Screencopy.hpp:6,
                 from /home/xtraf/git/xdg-desktop-portal-hyprland/src/core/PortalManager.hpp:8,
                 from /home/xtraf/git/xdg-desktop-portal-hyprland/src/core/PortalManager.cpp:1:
/usr/include/spa-0.2/spa/pod/dynamic.h: In function «void spa_pod_dynamic_builder_init(spa_pod_dynamic_builder*, void*, uint32_t, uint32_t)»:
/home/xtraf/git/xdg-desktop-portal-hyprland/src/core/../portals/../shared/ScreencopyShared.hpp:9:43: ошибка: expected primary-expression before «.» token
    9 | #define SPA_VERSION_POD_BUILDER_CALLBACKS .version = 0
      |                                           ^

Upd. I manually removed these lines and built the version from this commit c06fd88b3da492b8f9067be021b9184f7012b5a8 (Jan 29) and it didn't help in any way either.

I am 100% sure that everything worked fine on 0.41 version.

Aqa-Ib commented 2 weeks ago

Try downgrading to 0.41 to see if it gets fixed and bisect, I can't reproduce the bug in my setup.

onelocked commented 2 weeks ago

I had the same bug with OBS, thankfully running a simple sudo pacman -Syu to update everything fixed the issue for me, hope it helps for you too.

Aqa-Ib commented 1 week ago

Yea, I can't reproduce this one on my system. Does upgrading fixed it @Xtr4F for you ?

Xtr4F commented 1 week ago

@Aqa-Ib No, unfortunately it doesn't. I don't have much time to deal with it right now, so I decided I don't care. I switched to wf-recorder and it just works.

JaredKIso commented 1 week ago

Issue seems to be similar to #7517 :+1:

Will post my update if I find anything here since this thread seems to have more traction!

JaredKIso commented 1 week ago

Tested around with trying to downgrade and still experienced the issue

JaredKIso commented 1 week ago

Here to post an update! (Posted it on #7517 as well)

Regarding my previous post I will get what did not work out of the way:

---| Things that didn't work |---

Because these didn't work I had to dig a little further into it.

To cut to the chase: ---| What worked for me |---

Hope this helps someone else if they experience this issue!