hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
17.93k stars 753 forks source link

Memory leak #6459

Open grappas opened 2 weeks ago

grappas commented 2 weeks ago

Bug or Regression?

Bug

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 38132ffaf53c843a3ed03be5b305702fde8f5a49 (renderer: properly software lock cursors with zoom_factor (6434)). Date: Wed Jun 12 19:28:52 2024 Tag: v0.41.0-18-g38132ffaf, commits: 4812 flags: (if any) System Information: System name: Linux Node name: arch Release: 6.9.3-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 GPU information: 0b:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (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/grappas/.config/hypr/hyprland.conf: Read Succeeded exec=sh ~/.config/hypr/exec.sh # <-- machine specific options source=~/.config/hypr/resolution.conf # Please note not all available settings / options are set here. # For a full list, see the wiki # See https://wiki.hyprland.org/Configuring/Monitors/ # monitor=,preferred,auto,auto # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch # exec-once = waybar & hyprpaper & firefox # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # Some default env vars. # env = XCURSOR_SIZE,24 # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = pl kb_variant = kb_model = kb_options = kb_rules = numlock_by_default=1 follow_mouse = 1 touchpad { natural_scroll = false } sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } debug { disable_logs = true enable_stdout_logs = false } general { gaps_in = 4 gaps_out = 8 border_size = 8 col.active_border = rgba(FB4934ee) rgba(B8BB26ee) 135deg col.inactive_border = rgba(595959aa) layout = dwindle } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 4 blur { enabled = true size = 5 passes = 1 } # blur_new_optimizations = true drop_shadow = true shadow_range = 15 shadow_render_power = 6 col.shadow = rgba(000000ee) dim_inactive = false dim_strength = 0.4 } animations { enabled = true bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 1, myBezier animation = windowsOut, 1, 1, default, popin 80% animation = border, 1, 1, default animation = borderangle, 1, 1, default animation = fade, 1, 1, default animation = workspaces, 1, 1, default, slidevert } dwindle { # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = true # you probably want this } master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more new_is_master = true } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = false } misc { vrr = 2 vfr = true mouse_move_enables_dpms = true key_press_enables_dpms = true no_direct_scanout = false focus_on_activate = true # enable_swallow = true # swallow_regex = ^(org.wezfurlong.wezterm|kitty)$ } binds { allow_workspace_cycles = true scroll_event_delay = 1 } # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more #keybinds: # $mainMod = SUPER # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Q, exec, foot bind = $mainMod SHIFT, Q, exec, foot -e byobu-tmux new-session bind = $mainMod CTRL, Q, exec, foot -e byobu-tmux bind = $mainMod, Z, exec, foot bind = $mainMod SHIFT, Z, exec, foot -e byobu-tmux new-session bind = $mainMod CTRL, Z, exec, foot -e byobu-tmux # bind = $mainMod, Q, exec, wezterm start bind = $mainMod, C, killactive, bind = $mainMod, M, exit, # bind = $mainMod, E, exec, dolphin bind = $mainMod, E, exec, nautilus bind = $mainMod, V, togglefloating, bind = $mainMod, TAB, exec, rofi -modes "run,ssh,drun,filebrowser" -show drun bind = $mainMod, X, exec, rofi -modes "run,ssh,drun,filebrowser" -show drun bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, T, togglesplit, # dwindle bind = $mainMod, End, exec, sleep 1 && sudo systemctl suspend # dwindle bind = $mainMod SHIFT, End, exec, sudo systemctl hybrid-sleep # dwindle bind = $mainMod, Home, exec, sleep 1 && hyprctl dispatch dpms off bind = $mainMod SHIFT, S, exec, sh ~/skrypty/screenshot.sh area bind = ,Print, exec, sh ~/skrypty/screenshot.sh screen bind = ALT, Print, exec, sh ~/skrypty/screenshot.sh active # bindr= ,Caps_Lock,exec,ydotool key -d 100 58:1 58:0 bind = $mainMod, period, exec, splatmoji -l pl,en copypaste ~/instalancje/dotfiles/splatmoji/custom.tsv bind = $mainMod, Return, fullscreen, 0 bind = $mainMod, G, fullscreen, 1 bind = $mainMod ALT, space, exec, wl-copy ​S! && ydotool key -d 100 29:1 47:1 47:0 29:0 # 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 bind = $mainMod, H, movefocus, l bind = $mainMod, L, movefocus, r bind = $mainMod, J, movefocus, u bind = $mainMod, K, movefocus, d bind = $mainMod SHIFT, H, movewindow, l bind = $mainMod SHIFT, L, movewindow, r bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r # Switch workspaces with mainMod + [0-9] bind = $mainMod CONTROL, 1, workspace, 1 bind = $mainMod CONTROL, 2, workspace, 2 bind = $mainMod CONTROL, 3, workspace, 3 bind = $mainMod CONTROL, 4, workspace, 4 bind = $mainMod CONTROL, 5, workspace, 5 bind = $mainMod CONTROL, 6, workspace, 6 bind = $mainMod CONTROL, 7, workspace, 7 bind = $mainMod CONTROL, 8, workspace, 8 bind = $mainMod CONTROL, 9, workspace, 9 bind = $mainMod CONTROL, 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 # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, -2 bind = $mainMod, mouse_up, workspace, +2 bind = $mainMod CONTROL, k, workspace, -2 bind = $mainMod CONTROL, j, workspace, +2 bind = $mainMod CONTROL, h, workspace, -1 bind = $mainMod CONTROL, l, workspace, +1 bind = $mainMod SHIFT, k, movetoworkspace, -2 bind = $mainMod SHIFT, j, movetoworkspace, +2 bind = $mainMod CONTROL, up, workspace, -2 bind = $mainMod CONTROL, down, workspace, +2 bind = $mainMod CONTROL, left, workspace, -1 bind = $mainMod CONTROL, right, workspace, +1 bind = $mainMod SHIFT, up, movetoworkspace, -2 bind = $mainMod SHIFT, down, movetoworkspace, +2 bind = $mainMod SHIFT, mouse_down, movetoworkspace, -2 bind = $mainMod SHIFT, mouse_up, movetoworkspace, +2 binde = $mainMod ALT, h, resizeactive, -50 0 binde = $mainMod ALT, l, resizeactive, 50 0 binde = $mainMod ALT, j, resizeactive, 0 50 binde = $mainMod ALT, k, resizeactive, 0 -50 binde = $mainMod ALT, left, resizeactive, -50 0 binde = $mainMod ALT, right, resizeactive, 50 0 binde = $mainMod ALT, down, resizeactive, 0 50 binde = $mainMod ALT, up, resizeactive, 0 -50 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow # Volume Control bind = ,XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% bind = ,XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% bind = ,XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle bind = CONTROL SHIFT, S, pass,^(com\.obsproject\.Studio)$ bind = $mainMod SHIFT, F9, exec, hyprctl keyword debug:overlay false bind = $mainMod SHIFT, F10, exec, hyprctl keyword debug:overlay true bind = $mainMod , XF86AudioPlay , exec, sh ~/skrypty/bluetooth_play_toggle.sh bind = $mainMod , XF86AudioStop , exec, bluetoothctl disconnect 8C:7A:3D:D2:BF:A6 #environment variables # env=GTK_USE_PORTAL,1 env=MOZ_ENABLE_WAYLAND,1 env=MOZ_USE_XINPUT2,1 env=QT_AUTO_SCREEN_SCALE_FACTOR,2 env=GDK_BACKEND,wayland,x11 env=QT_QPA_PLATFORM,wayland;xcb env=GTK_THEME,Gruvbox-Material-Dark env=QT_QPA_PLATFORMTHEME,qt6ct env=EDITOR,nvim env=MANGOHUD,0 env=vblank_mode,0 env=WINEFSYNC,1 env=mesa_glthread,true env=TERM,foot env=TERMINAL,foot env=GSCOPEA,gamescope -W 1920 -H 1080 -f -F fsr --adaptive-sync env=GSCOPEB,-e --fsr-sharpness 20 --expose-wayland --rt -- gamemoderun mangohud env = WLR_DRM_NO_ATOMIC,1 env = MOZ_DISABLE_RDD_SANDBOX,1 env = ELECTRON_OZONE_PLATFORM_HINT,auto windowrulev2 = immediate, class:^(gamescope-wl)$ windowrulev2 = immediate, class:^(cs2)$ windowrulev2 = immediate, class:^(dota2)$ windowrulev2 = immediate, class:^(soldat2)$ # windowrulev2 = force_zero_scaling, class:^(wezterm)$ #autoexec exec-once=sleep 5 && eww daemon && sleep 5 && eww open monitor1 && sleep 1 && eww open monitor2 exec-once=sleep 5 && sh ~/skrypty/nuclear.sh exec-once=waybar& exec-once=easyeffects --gapplication-service exec-once=sh ~/skrypty/eww/collect_sensors_in_loop.sh # exec-once=sh ~/.config/swayidle/swayidle.sh exec-once=hypridle& exec-once=hyprpaper& exec-once=mako exec-once=blueman-applet exec-once=nm-applet --indicator exec-once=/usr/lib/kdeconnectd exec-once=kdeconnect-indicator exec-once=vesktop --start-minimized& # exec-once=steam-native -silent& exec-once=systemctl --user stop ydotool.service exec-once=sleep 2 && systemctl --user start ydotool.service exec-once=sh ~/skrypty/workspace_starter.sh exec-once=sh ~/skrypty/term-resizer.sh foot 1648 1000 12 # exec-once=sh ~/skrypty/wallpapers.sh 5m DP-1 DP-2 exec-once=sleep 10 && wpaperd exec-once=touch ~/temp/wakeup exec-once=amixer -c 2 sset PCM playback 5dB exec-once=amixer -c 3 sset PCM playback 5dB # exec-once=foot --server exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = systemctl --user import-environment exec-once = hyprshade auto exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 Config File: /home/grappas/.config/hypr/resolution.conf: Read Succeeded monitor=DP-1,highrr,0x0,auto monitor=DP-2,highrr,1920x0,2 ======Config-End======== ```

Description

2,5h uptime with 40 minutes idle. This is what I got back to: obraz Totally unresponsive.

How to reproduce

Maybe hypridle comes to play. I don't know. It's pretty random. Always after I'm coming back to computer (on idle or wake up from sleep).

Crash reports, logs, images, videos

Mentioned here: https://github.com/hyprwm/Hyprland/issues/6381#issuecomment-2163645036

vaxerski commented 2 weeks ago

well I definitely don't have that, heh.

Is it the log being so big?

grappas commented 2 weeks ago

Log is now disabled due to it's size :P

vaxerski commented 2 weeks ago

is it fixed now?

grappas commented 2 weeks ago

Just installed it. Gonna let you know. (As I said earlier - pretty hard to reproduce).

grappas commented 2 weeks ago

nope... still: obraz

After mouse move in dpms off

grappas commented 2 weeks ago

I left btop via ssh on and noticed something new while dpms off. Along with memory jump steady usage growth there's excessive GPU usage (RX 6750XT almost fully saturated). Coils squeals like crazy. obraz

vaxerski commented 2 weeks ago

is this bisectable?

grappas commented 2 weeks ago

I don't think it is. I have no idea where to start.

vaxerski commented 2 weeks ago

check the logs, try without gdm, I guess. I don't really know what else to do as you seem to be the only one affected

grappas commented 2 weeks ago

It could be that DP-2 monitor. I dpms off with that second monitor disabled. Waiting for results.

grappas commented 2 weeks ago

Gdm disabled, single monitor, issue still.

vaxerski commented 2 weeks ago

might be slow but bisecting would help

grappas commented 1 week ago

bisecting would help

If I only knew earlier... ¯\_(ツ)_/¯

Last release without this bug was (as far as I remember) v0.39.0, which I have problem to compile it now:

ninja: build stopped: subcommand failed.
[18/178] Building CXX object hyprpm/CMakeFiles/hyprpm.dir/src/core/PluginManager.cpp.o
/home/grappas/instalancje/Hyprland/hyprpm/src/core/PluginManager.cpp: In function 'std::string execAndGet(std::string)':
/home/grappas/instalancje/Hyprland/hyprpm/src/core/PluginManager.cpp:45:50: warning: ignoring attributes on template argument 'int (*)(FILE*)' [-Wignored-attributes]
   45 |     const std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(), "r"), pclose);
      |                                                  ^
[19/178] Building CXX object hyprctl/CMakeFiles/hyprctl.dir/main.cpp.o
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:15: release] Error 1
make[1]: Leaving directory '/home/grappas/instalancje/Hyprland'
make: *** [Makefile:34: all] Error 2

I promise that next time I'll report bugs as soon as they appear and bisect it ASAP 😂

I've never tried to bisect anything before TBH.

vaxerski commented 1 week ago

thats a warning sir. Please post the full output next time.

Anyways, a bit older versions like 0.39 fail to compile due to breaking changes in libliftoff, you have 2 choices:

grappas commented 1 week ago

Holy shit... just found how to reproduce it. It's a Schrödinger's bug... This leak activates only on dpms off, when firefox visible window have reddit page on and it's active (window). When having two firefox windows visible at least one have to have reddit page visible and at least one active (not necessarily that reddit one).

At least I have a base to workaround that bug for now 🤣

vaxerski commented 1 week ago

what

grappas commented 1 week ago

Cnie? xD

grappas commented 2 days ago

workaround: https://github.com/grappas/dotfiles/blob/main/misc/scripts/on_idle.sh