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.47k stars 898 forks source link

Weird GPU usage with blur #7188

Closed BEST8OY closed 3 months ago

BEST8OY commented 3 months ago

Regression?

No

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: DIAMOND Release: 6.10.2-arch1-2 Version: #1 SMP PREEMPT_DYNAMIC Sat, 03 Aug 2024 17:56:17 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-U GT2 [UHD Graphics] [8086:9b41] (rev 02) (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/hl/.config/hypr/hyprland.conf: Read Succeeded ################ ### MONITORS ### ################ source = ~/.config/hypr/Configs/monitors.conf ################### ### MY PROGRAMS ### ################### source = ~/.config/hypr/Configs/execs.conf ############################# ### ENVIRONMENT VARIABLES ### ############################# source = ~/.config/hypr/Configs/envs.conf ##################### ### LOOK AND FEEL ### ##################### source = ~/.cache/wal/colors-hyprland.conf source = ~/.config/hypr/Configs/general.conf ############# ### INPUT ### ############# source = ~/.config/hypr/Configs/input.conf #################### ### KEYBINDINGSS ### #################### source = ~/.config/hypr/Configs/keybindings.conf ############################## ### WINDOWS AND WORKSPACES ### ############################## source = ~/.config/hypr/Configs/rules.conf Config File: /home/hl/.config/hypr/Configs/monitors.conf: Read Succeeded monitor=,preferred,auto,auto monitor=eDP-1,1920x1080@60,0x0,1 Config File: /home/hl/.config/hypr/Configs/execs.conf: Read Succeeded # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use $terminal = foot $fileManager = foot -e lfub $menu = rofi -show run # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: exec-once = swww-daemon >/dev/null exec-once = hypridle & waybar & goldendict & mpd & $terminal exec-once = sleep 1 && mpd-mpris exec-once = dbus-update-activation-environment --all exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP Config File: /home/hl/.config/hypr/Configs/envs.conf: Read Succeeded # See https://wiki.hyprland.org/Configuring/Environment-variables/ #env = XCURSOR_SIZE,24 #env = XCURSOR_THEME,24 env = HYPRCURSOR_THEME,catppuccin-mocha-red-cursors env = HYPRCURSOR_SIZE,32 env = GDK_BACKEND,wayland,x11,* env = QT_QPA_PLATFORM,wayland;xcb Config File: /home/hl/.cache/wal/colors-hyprland.conf: Read Succeeded $background = rgb(0e0f16) $color3 = rgb(7D8298) $color6 = rgb(D4B6CD) Config File: /home/hl/.config/hypr/Configs/general.conf: Read Succeeded # Refer to https://wiki.hyprland.org/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 5 gaps_out = 10 border_size = 3 col.active_border = $color3 $color6 90deg col.inactive_border = $background # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = true # 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 = 15 dim_special = 0.2 # 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 = true size = 8 passes = 2 # noise = 0.1 contrast = 1 brightness = 0.8 ignore_opacity = true new_optimizations = true } } # https://wiki.hyprland.org/Configuring/Variables/#animations animations { enabled = true # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = linear, 0, 0, 1, 1 bezier = md3_standard, 0.2, 0, 0, 1 bezier = md3_decel, 0.05, 0.7, 0.1, 1 bezier = md3_accel, 0.3, 0, 0.8, 0.15 bezier = overshot, 0.05, 0.9, 0.1, 1.1 bezier = crazyshot, 0.1, 1.5, 0.76, 0.92 bezier = hyprnostretch, 0.05, 0.9, 0.1, 1.0 bezier = menu_decel, 0.1, 1, 0, 1 bezier = menu_accel, 0.38, 0.04, 1, 0.07 bezier = easeInOutCirc, 0.85, 0, 0.15, 1 bezier = easeOutCirc, 0, 0.55, 0.45, 1 bezier = easeOutExpo, 0.16, 1, 0.3, 1 bezier = softAcDecel, 0.26, 0.26, 0.15, 1 bezier = md2, 0.4, 0, 0.2, 1 # use with .2s duration # Animation configs animation = windows, 1, 3, md3_decel, popin 60% animation = windowsIn, 1, 3, md3_decel, popin 60% animation = windowsOut, 1, 3, md3_accel, popin 60% animation = border, 1, 10, default animation = fade, 1, 3, md3_decel # animation = layers, 1, 2, md3_decel, slide animation = layersIn, 1, 3, menu_decel, slide animation = layersOut, 1, 1.6, menu_accel animation = fadeLayersIn, 1, 2, menu_decel # animation = fadeLayersOut, 1, 4.5, menu_accel animation = workspaces, 1, 7, menu_decel, slide # animation = workspaces, 1, 2.5, softAcDecel, slide # animation = workspaces, 1, 7, menu_decel, slidefade 15% # animation = specialWorkspace, 1, 3, md3_decel, slidefadevert 15% animation = specialWorkspace, 1, 3, md3_decel, slidevert } # 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 new_on_top = true } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { force_default_wallpaper = 1 # 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. :( } Config File: /home/hl/.config/hypr/Configs/input.conf: Read Succeeded # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = us,ir kb_variant = ,winkeys kb_options = grp:alt_space_toggle,caps:super kb_model = kb_rules = repeat_delay = 250 numlock_by_default = true follow_mouse = 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 = true } # 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 } Config File: /home/hl/.config/hypr/Configs/keybindings.conf: Read Succeeded # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Media bind = ,XF86AudioPlay, exec, playerctl play-pause bind = ,XF86AudioNext, exec, playerctl next bind = ,XF86AudioPrev, exec, playerctl previous bindel = $mainMod, code:86, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ bindel = $mainMod, code:82, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, Return, exec, $terminal bind = $mainMod, code:48, exec, [float; size 850 650; center] $terminal bind = $mainMod, M, exec, $terminal ncmpcpp bind = $mainMod, Q, killactive, #bind = $mainMod, M, exit, bind = $mainMod, R, exec, $fileManager bind = $mainMod, V, togglefloating, bind = $mainMod, V, centerwindow, bind = $mainMod, D, exec, $menu bind = $mainMod, F, fullscreen, 1 bind = $mainMod Shift, F, fullscreen, 2 bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle binde = $mainMod, TAB, workspace, e+1 bind = $mainMod, W, exec, microsoft-edge-stable bind = $mainMod, Z, exec, firefox -new-window "https://www.google.com/search?q=$(wl-paste --primary)" bind = $mainMod, X, exec, firefox -new-window "https://www.google.com/search?q=$(firesearch)" bind = $mainMod, C, exec, goldendict -s $(wl-paste --primary) bind = Control, PERIOD, exec, dict bind = Shift, PRINT, exec, grimpick bind = , PRINT, exec, grim pic-full-"$(date '+%y%m%d-%H%M-%S').png" bind = Control_Shift, S, exec, slurp | grim -g - - | wl-copy bind = $mainMod, PRINT, exec, wofirecord # bind = Control_Shift, S, exec, slurp | grim -g - pic-selected-"$(date '+%y%m%d-%H%M-%S').png" # 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 # Window arrangement bind = Super_Shift, Left, movewindow, l # [hidden] bind = Super_Shift, Right, movewindow, r # [hidden] bind = Super_Shift, Up, movewindow, u # [hidden] bind = Super_Shift, Down, movewindow, d # [hidden] # 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, pin 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 File: /home/hl/.config/hypr/Configs/rules.conf: Read Succeeded # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. layerrule = blur, notifications layerrule = ignorealpha, notifications layerrule = blur, rofi layerrule = ignorealpha, rofi layerrule = noanim, selection windowrulev2 = noblur,initialclass: sublime_text windowrulev2 = noblur,initialclass: microsoft-edge windowrulev2 = noblur,initialclass: firefox windowrulev2 = noblur,initialclass: com.github.xournalpp.xournalpp windowrulev2 = noblur,initialclass: anki windowrulev2 = noblur,initialclass: org.telegram.desktop windowrulev2 = noanim, title:ueberzugpp windowrulev2 = maximize, title: Media viewer windowrulev2 = nofocus, title:ueberzugpp windowrulev2 = noanim, title:grim windowrulev2 = noanim, title:slurp windowrulev2 = float, initialClass:GoldenDict-ng windowrulev2 = maxsize 600 500, initialClass:GoldenDict-ng windowrulev2 = opacity 0.8, initialTitle:Spotify #windowrulev2 = maxsize 1280 720, floating: 1 windowrule = center, title:^(Open File)(.*)$ windowrule = center, title:^(Select a File)(.*)$ windowrule = center, title:^(Choose wallpaper)(.*)$ windowrule = center, title:^(Open Folder)(.*)$ windowrule = center, title:^(Save As)(.*)$ windowrule = center, title:^(Library)(.*)$ windowrule = center, title:^(File Upload)(.*)$ windowrule = center, title:^(Save file)(.*)$ ======Config-End======== ```

Description

The GPU usage with blur is 20% Without blur is 1% There is a workaround that I can drop the GPU usage with blur to 10 percent and that's using Hypridle When Hypridle finishes its first cycle and turn the screen off and then I turn the screen on, when I check the GPU usage it's around 8%-10% and remains that way

Why is this 10 percent difference important? Because I get some framedrop with animations when blur uses 20% of GPU! How can I have this more optimized usage without Hypridle kicking in!?

My Hypridle settings:

general {
    lock_cmd = pidof hyprlock || hyprlock       # avoid starting multiple hyprlock instances.
    before_sleep_cmd = loginctl lock-session    # lock before suspend.
    after_sleep_cmd = hyprctl dispatch dpms on  # to avoid having to press a key twice to turn on the display.
}

listener {
    timeout = 300                                 # 2.5min.
    on-timeout = brightnessctl -s set 15%         # set monitor backlight to minimum, avoid 0 on OLED monitor.
    on-resume = brightnessctl -r                 # monitor backlight restore.
}

listener {
    timeout = 600                                 # 5min
    on-timeout = hyprctl dispatch dpms off        # screen off when timeout has passed
    on-resume = hyprctl dispatch dpms on          # screen on when activity is detected after timeout has fired.
}

How to reproduce

  1. First boot and login into your hyprland
  2. Check Hyprland GPU usage with nvtop
  3. Do nothing and let hypridle complete its first cycle which turns the screen off
  4. Recheck Hyprland GPU usage with nvtop

Crash reports, logs, images, videos

No response

vaxerski commented 3 months ago

blur is a heavy op, and various optimizations in hyprland try to not redraw it. I can't know more without you telling me where the blur is

BEST8OY commented 3 months ago

Okay I figured the trick is doing One hyprctl dispatch dpms off and then hyprctl dispatch dpms on and it drops blur GPU usage for more than 10% on my GPU and everything is smooth then! Update: I'm not sure what you mean by where the blur is See the GPU usage in this screen It's just after doing on dispatch dpms off and then on before doing so it is more than 20% pic-full-240805-2135-21

BEST8OY commented 3 months ago

See here

  1. Loging in (GPU usage is more than 20%)
  2. Doing dpms off and then on with keybinding
  3. Now the GPU usage is 9% pic-full-240805-2139-05
MightyPlaza commented 3 months ago

check also the gpu clock, if it gets lower the usage might get higher

BEST8OY commented 3 months ago

check also the gpu clock, if it gets lower the usage might get higher

Yep before dpms off and on GPU uses around 400MHz After dpms off and on it's around 1000MHz Where does this initial restriction come from?

MightyPlaza commented 3 months ago

it's not a restriction, is just aggressive power saving on intel igpus if you run something heavy like a gpu accelerated 3d program it go up again

vaxerski commented 3 months ago

this is not a hyprland issue, it's just your laptop power saving.

Blur is expensive, make sure you didn't disable new_optimizations in your hl config (on by default)