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.72k stars 900 forks source link

Memory leak #6459

Closed grappas closed 3 months ago

grappas commented 5 months 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 5 months ago

well I definitely don't have that, heh.

Is it the log being so big?

grappas commented 5 months ago

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

vaxerski commented 5 months ago

is it fixed now?

grappas commented 5 months ago

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

grappas commented 5 months ago

nope... still: obraz

After mouse move in dpms off

grappas commented 5 months 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 5 months ago

is this bisectable?

grappas commented 5 months ago

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

vaxerski commented 5 months 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 5 months ago

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

grappas commented 5 months ago

Gdm disabled, single monitor, issue still.

vaxerski commented 5 months ago

might be slow but bisecting would help

grappas commented 5 months 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 5 months 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 5 months 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 5 months ago

what

grappas commented 5 months ago

Cnie? xD

grappas commented 4 months ago

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

MagiRomanya commented 4 months ago

I think I am having the same problem, also in arch linux.

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)

With 1:40h uptime and also some Idle time (maybe 15 min) i get:

screenshot

jas3333 commented 3 months ago

I'm not sure if this is related or not but whenever I use hyprctl dispatch dpms off to turn off my monitors, ram usage starts creeping. It got to over 120GB used last night for Hyprland and eventually crashed.

Jul 26 09:52:24 archlinux kernel: Out of memory: Killed process 1086 (Hyprland) total-vm:133264572kB, anon-rss:128180992kB, file-rss:3936kB, shmem-rss:65560kB, UID:1000 pgtables:251468kB oom_score_adj:0
Jul 26 09:52:24 archlinux kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-1.scope,task=Hyprland,pid=1086,uid=1000

Doesn't seem to creep up while using the system, just when I use hyprctl dispatch dpms off(I have a hotkey set) to turn off monitors. I was on a commit from July 22nd I updated to latest and still having same issue.

sp0nks commented 3 months ago

I'm not sure if this is related or not but whenever I use hyprctl dispatch dpms off to turn off my monitors, ram usage starts creeping. It got to over 120GB used last night for Hyprland and eventually crashed.

Jul 26 09:52:24 archlinux kernel: Out of memory: Killed process 1086 (Hyprland) total-vm:133264572kB, anon-rss:128180992kB, file-rss:3936kB, shmem-rss:65560kB, UID:1000 pgtables:251468kB oom_score_adj:0
Jul 26 09:52:24 archlinux kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-1.scope,task=Hyprland,pid=1086,uid=1000

Doesn't seem to creep up while using the system, just when I use hyprctl dispatch dpms off(I have a hotkey set) to turn off monitors. I was on a commit from July 22nd I updated to latest and still having same issue.

I have exactly the same issue. On Arch with Hyprland 0.42.0 from official Arch packages.

Hyprland sit at around 80MB RAM usage until Hypridle triggers 'hyprctl dispatch soms off' Hyprland slowly starts to eat memory until I wake up the screen.

sp0nks commented 3 months ago

Maybe this is useful:

[LOG] [SessionLock] New sessionLockSurface with id 24
[LOG] [WLCompositor] New wl_surface with id 25 at 61778065a940
[LOG] [SessionLock] New sessionLockSurface with id 28
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 33: size [Vector2D: x: 1920, y: 1200], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 163 stride 7680 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 164 stride 960 offset 9338880
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 165 stride 64 offset 9375744
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 37: size [Vector2D: x: 3440, y: 1440], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 166 stride 13824 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 167 stride 1728 offset 19906560
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 168 stride 64 offset 19984384
[LOG] [WLDataDevice] CWLDataDeviceProtocol::onKeyboardFocus: cannot send selection to a client without a data_device
[LOG] Set keyboard focus to surface 61778065a940
[LOG] [PrimarySelection] CPrimarySelectionProtocol::updateSelection: cannot send selection to a client without a data_device
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 39: size [Vector2D: x: 1920, y: 1200], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 169 stride 7680 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 170 stride 960 offset 9338880
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 171 stride 64 offset 9375744
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 40: size [Vector2D: x: 3440, y: 1440], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 172 stride 13824 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 173 stride 1728 offset 19906560
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 174 stride 64 offset 19984384
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 38: size [Vector2D: x: 3440, y: 1440], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 175 stride 13824 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 176 stride 1728 offset 19906560
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 177 stride 64 offset 19984384
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 37: size [Vector2D: x: 1920, y: 1200], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 166 stride 7680 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 167 stride 960 offset 9338880
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 168 stride 64 offset 9375744
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_EVENT 
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 46: size [Vector2D: x: 900, y: 900], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 23 stride 4096 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 154 stride 512 offset 3801088
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 155 stride 64 offset 3817472
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_EVENT 
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 51: size [Vector2D: x: 900, y: 900], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 156 stride 4096 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 157 stride 512 offset 3801088
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 158 stride 64 offset 3817472
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_EVENT 
[LOG] [LinuxDMABUF] Creating a dmabuf, with id 50: size [Vector2D: x: 900, y: 900], fmt AR24, planes 3
[LOG] [LinuxDMABUF]  | plane 0: mod 72057594037927944 fd 152 stride 4096 offset 0
[LOG] [LinuxDMABUF]  | plane 1: mod 72057594037927944 fd 159 stride 512 offset 3801088
[LOG] [LinuxDMABUF]  | plane 2: mod 72057594037927944 fd 160 stride 64 offset 3817472
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK PAGE_FLIP_EVENT 
[LOG] [AQ] drm: Disabling output eDP-1
[LOG] [AQ] drm: Disabling output DP-2
[ERR] [AQ] drm: Cannot commit when a page-flip is awaiting
[ERR] Couldn't commit output DP-2
[LOG] Hyprctl: dispatcher dpms : off
[LOG] [AQ] drm: Disabling output DP-2
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[LOG] [AQ] [libinput] event12 - Dialog Semiconductor (UK) Ltd MateView GT Consumer Control: device removed

[LOG] Keyboard at 61777ff04bb0 removed
[LOG] Destroyed keyboard 61777ff04bb0
[LOG] [AQ] [libinput] event13 - Dialog Semiconductor (UK) Ltd MateView GT: device removed

[LOG] Keyboard at 61777ff04f90 removed
[LOG] Destroyed keyboard 61777ff04f90
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
[ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK 
[ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT 
vaxerski commented 3 months ago

what if the "leak" is just the log file? It's stored in RAM after all...

sp0nks commented 3 months ago

what if the "leak" is just the log file? It's stored in RAM after all...

I have only started logging today to try and see if I can find something. On 0.41.2 all was well, then I updated and noticed my computer struggled in the morning.

During the day while I am working and the computer isn't idle Hyprland's memory usage is around 80MB, the whole time.

I have now explictly disabled the logging with:

debug:disable_logs = true 

And will quickly let everything fall asleep again.

sp0nks commented 3 months ago

Ok, I have disabled logging and let the computer stand idle.

hyprctl dispatch dpms off triggered. I left i for 5 minutes then woke everything up again.

It went from 77MB to 213MB in the 5 minutes I left it. And it stays there until hyprctl dispatch dpms off is triggered again, during which the memory usage goes up again.

sp0nks commented 3 months ago

I get a lot of these while the screen is off from hypridle:

[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053
[LOG] Framebuffer created, status 36053

Not sure if it is related.

sp0nks commented 3 months ago

With hypridle killed and no logging, I ran hyprctl dispatch dpms off from command line and Hyrpland went from 67MB to 552.8MB while the screen was off. While the screen is on it stays at 552.8MB now.

vaxerski commented 3 months ago

with this being easily reproducible can someone bisect?

sp0nks commented 3 months ago

I am willing to give it a try, still new to all of this. One question though, what will the good commit hash be for the Arch 0.41.2 version? I presume that will be the good commit?

vaxerski commented 3 months ago

you can click on the release on github in the releases tab and it will show you the commit hash in the top right

sp0nks commented 3 months ago

I managed to figure that out. Thank you.

Busy bisecting, but this far it is weird. I am seeing memory creep on 0.41.2 as well. So I restarted the process taking each step a bit slower and keeping dpms off for longer.

vaxerski commented 3 months ago

there was a fix in -git, can you recheck?

sp0nks commented 3 months ago

I have installed the -git package and will do some tests.

sp0nks commented 3 months ago

Problem persists. I will continue with bisect.

vaxerski commented 3 months ago

thanks for checking :)

sp0nks commented 3 months ago

thanks for checking :)

No problem.

I have been unable to replicate the issue while bisecting.

I have retried the AUR -git and this time used --devel which got me to the latest commit (c5feee1). More weird behaviour. I think. Initially it looked good, but with longer dpms off time the memory usage went from 67MB to 321MB. Homever, it seems like it is now staying at ~320MB, even with more and longer dpms off times.

I think I am going to leave it overnight and see how it goes. Will provide feedback.

Thank you for your patience. I have never done this before, lots to learn.

vaxerski commented 3 months ago

is that VRAM or RAM? VRAM might be lazy-freed

sp0nks commented 3 months ago

RAM. I haven't even looked at VRAM to be honest.

sp0nks commented 3 months ago

VRAM usage is low and unaffected. ~300MB

jas3333 commented 3 months ago

CPU is ramping up when using dpms off too. 20240816_18h56m38s_grim

sp0nks commented 3 months ago

Xwayland crashed sometime during the night.

And I can also confirm elevated CPU while dpms is off. Although slightly for me. The memory leak is still present and probably crashed Xwayland. It would be the second time. image

sp0nks commented 3 months ago

image Still on the c5feee1 commit.

sp0nks commented 3 months ago

This might be relevant:

[LOG] [AQ] drm: Disabling output eDP-1 [LOG] [AQ] drm: Disabling output DP-2 [ERR] [AQ] drm: Cannot commit when a page-flip is awaiting [ERR] Couldn't commit output DP-2 [LOG] Hyprctl: dispatcher dpms : off [LOG] Window 634ee0edc450 set title to hyprctl dispatch dpms off; sleep 240; hyprctl dispatch dpms on [LOG] Searching for matching rules for kitty (title: hyprctl dispatch dpms off; sleep 240; hyprctl dispatch dpms on) [LOG] Window rule size 1024 786 -> class:(kitty) matched [Window 634ee0edc450: title: "hyprctl dispatch dpms off; sleep 240; hyprctl dispatch dpms on"] [LOG] Window rule center -> class:(kitty) matched [Window 634ee0edc450: title: "hyprctl dispatch dpms off; sleep 240; hyprctl dispatch dpms on"] [LOG] Window 634ee0edc450 set title to hyprctl dispatch dpms off ; sleep 240 ; hyprctl dispatch dpms on [LOG] Searching for matching rules for kitty (title: hyprctl dispatch dpms off ; sleep 240 ; hyprctl dispatch dpms on) [LOG] Window rule size 1024 786 -> class:(kitty) matched [Window 634ee0edc450: title: "hyprctl dispatch dpms off ; sleep 240 ; hyprctl dispatch dpms on"] [LOG] Window rule center -> class:(kitty) matched [Window 634ee0edc450: title: "hyprctl dispatch dpms off ; sleep 240 ; hyprctl dispatch dpms on"] [LOG] [AQ] drm: Disabling output DP-2 [LOG] cursorImage request: surface 0 [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK [ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK [LOG] [AQ] [libinput] event12 - Dialog Semiconductor (UK) Ltd MateView GT Consumer Control: device removed

[LOG] Keyboard at 634edf471790 removed [LOG] Destroyed keyboard 634edf471790 [LOG] [AQ] [libinput] event13 - Dialog Semiconductor (UK) Ltd MateView GT: device removed

[LOG] Keyboard at 634edf4a5000 removed [LOG] Destroyed keyboard 634edf4a5000 [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK [ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT [ERR] [AQ] atomic drm request: failed to commit: Device or resource busy, flags: ATOMIC_NONBLOCK [ERR] [AQ] atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET PAGE_FLIP_EVENT [LOG] [AQ] drm: Modesetting eDP-1 with 1920x1200@59.95Hz [LOG] [AQ] drm: Modesetting DP-2 with 3440x1440@165.00Hz [LOG] Hyprctl: dispatcher dpms : on

sp0nks commented 3 months ago

CPU is ramping up when using dpms off too. 20240816_18h56m38s_grim

@jas3333 do you have a multi-monitor setup?

vaxerski commented 3 months ago

why are those requests continuing... huh.

patch.txt

try this aquamarine patch pls

sp0nks commented 3 months ago

I have patched and built aquamarine, but what do I do with it now? Is there a way to install?

vaxerski commented 3 months ago

sudo cmake --install build then just restart hl and test

gulafaran commented 3 months ago

why are those requests continuing... huh.

patch.txt

try this aquamarine patch pls

boots to laptop monitor stuck at black screen with a mouse pointer and external not powered on at all.

gulafaran commented 3 months ago

why are those requests continuing... huh. patch.txt try this aquamarine patch pls

boots to laptop monitor stuck at black screen with a mouse pointer and external not powered on at all.

https://gist.github.com/gulafaran/407a5c916b5a9039eff21c56bf1630ef log

vaxerski commented 3 months ago

typoxerski strikes back patch.txt