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.54k stars 820 forks source link

High GPU memory usage when streaming #6853

Closed calvinbaart closed 1 month ago

calvinbaart commented 1 month ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 918d8340afd652b011b937d29d5eea0be08467f5 (flake.lock: update). Date: Tue Jun 25 12:06:02 2024 Tag: v0.41.2, commits: 4886 flags: (if any) System Information: System name: Linux Node name: archminimal Release: 6.9.8-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 05 Jul 2024 22:11:24 +0000 GPU information: 06:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU104 [GeForce RTX 2070 SUPER] [10de:1e84] (rev a1) (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/calvin/.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 layerrule = blur,waybar ################ ### MONITORS ### ################ monitor=DP-1,2560x1440@164.80200,0x0,1 monitor=HDMI-A-1,1920x1080@60.00000,-1920x400,1 ################### ### MY PROGRAMS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use $terminal = kitty $fileManager = kitty -e "yazi" $browser = firefox $menu = fuzzel ################# ### AUTOSTART ### ################# exec-once = $HOME/.config/hypr/scripts/resetxdgportal.sh # reset XDPH for screenshare exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH exec-once = dbus-update-activation-environment --systemd --all # for XDPH exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH exec-once = $HOME/.config/hypr/scripts/polkitkdeauth.sh # authentication dialogue for GUI apps exec-once = waybar # launch the system bar exec-once = udiskie --no-automount --smart-tray # front-end that allows to manage removable media exec-once = nm-applet --indicator # systray app for Network/Wifi exec-once = dunst # start notification demon exec-once = hyprpaper exec-once = 1password --silent # Cursor exec = hyprctl setcursor Bibata-Modern-Ice 20 exec = gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Ice' exec = gsettings set org.gnome.desktop.interface cursor-size 20 # Font exec = gsettings set org.gnome.desktop.interface font-name 'Cantarell 10' exec = gsettings set org.gnome.desktop.interface document-font-name 'Cantarell 10' exec = gsettings set org.gnome.desktop.interface monospace-font-name 'CaskaydiaCove Nerd Font Mono 9' exec = gsettings set org.gnome.desktop.interface font-antialiasing 'rgba' exec = gsettings set org.gnome.desktop.interface font-hinting 'full' # Theme exec = gsettings set org.gnome.desktop.interface icon-theme 'Tela-circle-green' exec = gsettings set org.gnome.desktop.interface gtk-theme 'Decay-Green' exec = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' ############################# ### ENVIRONMENT VARIABLES ### ############################# # See https://wiki.hyprland.org/Configuring/Environment-variables/ env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = QT_QPA_PLATFORM,wayland;xcb 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 = SSH_AUTH_SOCK,~/.1password/agent.sock # NVIDIA env = LIBVA_DRIVER_NAME,nvidia env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = __GL_VRR_ALLOWED,1 env = WLR_NO_HARDWARE_CURSORS,1 env = WLR_DRM_NO_ATOMIC,1 ##################### ### LOOK AND FEEL ### ##################### # Refer to https://wiki.hyprland.org/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 3 gaps_out = 5 border_size = 2 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors col.active_border = rgba(90ceaaff) rgba(ecd3a0ff) 45deg col.inactive_border = rgba(86aaeccc) rgba(93cee9cc) 45deg # 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 = dwindle } # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { dim_special = 0.3 rounding = 10 drop_shadow = false blur { enabled = true size = 5 passes = 4 new_optimizations = on ignore_opacity = on xray = false special = true } } xwayland { force_zero_scaling = true } 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 } # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more dwindle { pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + 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 = master } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( disable_splash_rendering = true } ############# ### INPUT ### ############# # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = us kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 2 force_no_accel = 1 sensitivity = 0 # -1.0 - 1.0, 0 means no modification. touchpad { natural_scroll = false } } # 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 } ############################## ### WINDOWS AND WORKSPACES ### ############################## # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ source = ~/.config/hypr/windowrules.conf source = ~/.config/hypr/keybindings.conf Config File: /home/calvin/.config/hypr/windowrules.conf: Read Succeeded # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀ # ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█ # See https://wiki.hyprland.org/Configuring/Window-Rules/ windowrulev2 = opacity 0.90 0.90,class:^(firefox)$ windowrulev2 = opacity 0.90 0.90,class:^(Brave-browser)$ windowrulev2 = opacity 0.80 0.80,class:^(code-oss)$ windowrulev2 = opacity 0.80 0.80,class:^(Code)$ windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$ windowrulev2 = opacity 0.80 0.80,class:^(code-insiders-url-handler)$ windowrulev2 = opacity 0.80 0.80,class:^(kitty)$ windowrulev2 = opacity 0.80 0.80,class:^(org.kde.dolphin)$ windowrulev2 = opacity 0.80 0.80,class:^(org.kde.ark)$ windowrulev2 = opacity 0.80 0.80,class:^(nwg-look)$ windowrulev2 = opacity 0.80 0.80,class:^(qt5ct)$ windowrulev2 = opacity 0.80 0.80,class:^(qt6ct)$ windowrulev2 = opacity 0.80 0.80,class:^(kvantummanager)$ windowrulev2 = opacity 0.80 0.70,class:^(org.pulseaudio.pavucontrol)$ windowrulev2 = opacity 0.80 0.70,class:^(blueman-manager)$ windowrulev2 = opacity 0.80 0.70,class:^(nm-applet)$ windowrulev2 = opacity 0.80 0.70,class:^(nm-connection-editor)$ windowrulev2 = opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$ windowrulev2 = opacity 0.80 0.70,class:^(polkit-gnome-authentication-agent-1)$ windowrulev2 = opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.gtk)$ windowrulev2 = opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.hyprland)$ windowrulev2 = opacity 0.70 0.70,class:^([Ss]team)$ windowrulev2 = opacity 0.70 0.70,class:^(steamwebhelper)$ windowrulev2 = opacity 0.70 0.70,class:^(Spotify)$ windowrulev2 = opacity 0.70 0.70,initialTitle:^(Spotify Free)$ windowrulev2 = opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$ # Flatseal-Gtk windowrulev2 = opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$ # Cartridges-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.obsproject.Studio)$ # Obs-Qt windowrulev2 = opacity 0.80 0.80,class:^(gnome-boxes)$ # Boxes-Gtk windowrulev2 = opacity 0.80 0.80,class:^(discord)$ # Discord-Electron windowrulev2 = opacity 0.80 0.80,class:^(WebCord)$ # WebCord-Electron windowrulev2 = opacity 0.80 0.80,class:^(ArmCord)$ # ArmCord-Electron windowrulev2 = opacity 0.80 0.80,class:^(app.drey.Warp)$ # Warp-Gtk windowrulev2 = opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt windowrulev2 = opacity 0.80 0.80,class:^(yad)$ # Protontricks-Gtk windowrulev2 = opacity 0.80 0.80,class:^(Signal)$ # Signal-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.github.alainm23.planify)$ # planify-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.gitlab.adhami3310.Impression)$ # Impression-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.missioncenter.MissionCenter)$ # MissionCenter-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.github.flattool.Warehouse)$ # Warehouse-Gtk windowrulev2 = float,class:^(org.kde.dolphin)$,title:^(Progress Dialog — Dolphin)$ windowrulev2 = float,class:^(org.kde.dolphin)$,title:^(Copying — Dolphin)$ windowrulev2 = float,class:^(firefox)$,title:^(Picture-in-Picture)$ windowrulev2 = float,class:^(firefox)$,title:^(Library)$ windowrulev2 = float,class:^(kitty)$,title:^(top)$ windowrulev2 = float,class:^(kitty)$,title:^(btop)$ windowrulev2 = float,class:^(kitty)$,title:^(htop)$ windowrulev2 = float,class:^(vlc)$ windowrulev2 = float,class:^(kvantummanager)$ windowrulev2 = float,class:^(qt5ct)$ windowrulev2 = float,class:^(qt6ct)$ windowrulev2 = float,class:^(nwg-look)$ windowrulev2 = float,class:^(org.kde.ark)$ windowrulev2 = float,class:^(org.pulseaudio.pavucontrol)$ windowrulev2 = float,class:^(blueman-manager)$ windowrulev2 = float,class:^(nm-applet)$ windowrulev2 = float,class:^(nm-connection-editor)$ windowrulev2 = float,class:^(org.kde.polkit-kde-authentication-agent-1)$ windowrulev2 = float,class:^(Signal)$ # Signal-Gtk windowrulev2 = float,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk windowrulev2 = float,class:^(app.drey.Warp)$ # Warp-Gtk windowrulev2 = float,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt windowrulev2 = float,class:^(yad)$ # Protontricks-Gtk windowrulev2 = float,class:^(eog)$ # Imageviewer-Gtk windowrulev2 = float,class:^(io.github.alainm23.planify)$ # planify-Gtk windowrulev2 = float,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk windowrulev2 = float,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gkk windowrulev2 = float,class:^(io.gitlab.adhami3310.Impression)$ # Impression-Gtk windowrulev2 = float,class:^(io.missioncenter.MissionCenter)$ # MissionCenter-Gtk # █░░ ▄▀█ █▄█ █▀▀ █▀█   █▀█ █░█ █░░ █▀▀ █▀ # █▄▄ █▀█ ░█░ ██▄ █▀▄   █▀▄ █▄█ █▄▄ ██▄ ▄█ layerrule = blur,rofi layerrule = ignorezero,rofi layerrule = blur,notifications layerrule = ignorezero,notifications layerrule = blur,swaync-notification-window layerrule = ignorezero,swaync-notification-window layerrule = blur,swaync-control-center layerrule = ignorezero,swaync-control-center layerrule = blur,logout_dialog Config File: /home/calvin/.config/hypr/keybindings.conf: Read Succeeded #################### ### KEYBINDINGSS ### #################### # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, T, exec, $terminal bind = $mainMod, Q, killactive, bind = $mainMod, M, exit, bind = $mainMod, D, exec, $fileManager bind = $mainMod, F, exec, $browser bind = $mainMod, C, exec, code bind = $mainMod, V, togglefloating, bind = $mainMod, Space, exec, $menu bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d # Switch workspaces with mainMod + [0-9] 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, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] 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 SHIFT, 7, movetoworkspace, 7 bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Example special workspace (scratchpad) bind = $mainMod, S, togglespecialworkspace, magic bind = $mainMod SHIFT, S, movetoworkspace, special:magic # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow ======Config-End======== ```

Description

When I initiate a stream through Vesktop the gpu memory according to nvidia-smi starts rising to 463 MiB (From the default 207 MiB). This doesn't seem like a lot but when I stop streaming it's not released. So when I start streaming a few times (or switch windows for example) it can easily skyrocket. For example today I had 2200 MiB.

This is a regression that happened between v0.40.0 and v0.41.0. In v0.40.0 it rises for a little bit (207 -> 240) and then drops back to 207 while still streaming.

I have bisected it to this commit: https://github.com/hyprwm/Hyprland/commit/6967a31450441fc5605c05db6f65505dace4b263

How to reproduce

Open a terminal window and execute nvidia-smi -l on it. Next start Vesktop, join a channel and start streaming. Notice how the gpu memory usage of hyprland rises. Now stop streaming, notice how it doesn't lower to previous levels.

Crash reports, logs, images, videos

No response

ViolentSempie commented 1 month ago

Same issue here, also seems to happen when streaming on OBS. Probably something related to xdg-desktop-portal-hyprland?

vaxerski commented 1 month ago

possibly related to #6772 ?

calvinbaart commented 1 month ago

Not sure, that seems related to regular ram while this issue is about video ram specifically.

vaxerski commented 1 month ago

can you repro after #6608 was merged?

ViolentSempie commented 1 month ago

Hi, I've just installed the most recent version of hyprland-git with #6608 and it now seems to work great! VRAM stays at a clean 270MB before and after streaming.

vaxerski commented 1 month ago

closing then :)