yshui / picom

A lightweight compositor for X11 with animation support
https://picom.app/
Other
4.17k stars 589 forks source link

High CPU usage with experimental-backends and fullscreen applications #723

Closed Anarky closed 3 years ago

Anarky commented 3 years ago

Platform

Arch Linux

GPU, drivers, and screen setup

Intel HD 4600, mesa 21.2.4, no xf86-video installed

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) HD Graphics 4600 (HSW GT2) (0x416)
    Version: 21.2.4
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 4600 (HSW GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.4
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.0 Mesa 21.2.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Environment

Awesome WM 4.3

picom version

vgit-e74fb

Diagnostics ``` **Version:** vgit-e74fb ### Extensions: * Shape: Yes * XRandR: Yes * Present: Present ### Misc: * Use Overlay: No (Another compositor is already running) * Config file used: /home/anarky/.config/picom.conf ### Drivers (inaccurate): modesetting ### Backend: glx * Driver vendors: * GLX: Mesa Project and SGI * GL: Intel Open Source Technology Center * GL renderer: Mesa DRI Intel(R) HD Graphics 4600 (HSW GT2) * Accelerated: 1 ```

Configuration:

Configuration file ``` backend = "glx"; vsync = true; # Shadow shadow = true; shadow-radius = 7; shadow-offset-x = -7; shadow-offset-y = -7; shadow-opacity = 0.25; shadow-exclude-reg = "x20+0+0"; # Do not draw over Awesome wibar xinerama-shadow-crop = true; # Do not draw over other screens # Exclude conky (needed when "own_window_type override") shadow-exclude = [ "window_type *= 'normal' && ! name ~= ''", "class_g ?= 'Notify-osd'", ]; ```

Steps of reproduction

  1. Start picom with --experimental-backends

Expected behavior

Same behaviour as without --experimental-backends, the CPU usage stays the same

Current Behavior

The CPU usage goes up, fullscreen applications use more CPU and feel laggy

Other details

I activated --experimental-backends to try dual_kawase blur, but even without modifying the configuration it seems to use more CPU with fullscreen applications. First example, with Firefox with a fullscreen Youtube video the fan on my laptop increases its speed. Second example with Retroarch with the XMB theme, same issue as Firefox, but it also makes the menu feel laggy, like if the refresh rate was reduced.

yshui commented 3 years ago

I can't reproduce this issue, picom CPU usage stayed at ~2% whether I fullscreen the youtube video or not.

Anarky commented 3 years ago

It seems I was on the wrong track; I ran while true; do sleep 1; ps -p $(pgrep picom) -o %cpu,%mem; done but it always stayed at 1.7% CPU.

I tried to get the top CPU usage with while true; do sleep 1; echo; ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head; done, while the fan speed changed exactly when the video was playing or not, the %MEM and %CPU was not significantly varying. Do you know how I could better investigate?

yshui commented 3 years ago

Fan speed increase could have multiple causes, e.g. GPU use.