picom icon indicating copy to clipboard operation
picom copied to clipboard

Using glx backend causes very high cpu usage

Open AntimatterReactor opened this issue 2 years ago • 4 comments

Platform

Arch Linux x86_64 Linux 5.15.49-1-lts

GPU, drivers, and screen setup

CPU: Intel i5-2430M (4) @ 3.000GHz GPU: NVIDIA GeForce 410M Drivers:

  • mesa 22.1.2-1
  • xf86-video-nouveau 1.0.17-2

Resolution: 1366 x 768

glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: nouveau (0x10de)
    Device: NVD9 (0x1055)
    Version: 22.1.2
    Accelerated: yes
    Video memory: 503MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.3
    Max compat profile version: 4.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: nouveau
OpenGL renderer string: NVD9
OpenGL core profile version string: 4.3 (Core Profile) Mesa 22.1.2
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.3 (Compatibility Profile) Mesa 22.1.2
OpenGL shading language version string: 4.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

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

Environment

dwm, with these extensions applied: activetagindicatorbar alpha alternativetags autostart centretitle fullgaps

picom version

vgit-7e568

Diagnostics **Version:** vgit-7e568

Extensions:

  • Shape: Yes
  • XRandR: Yes
  • Present: Present

Misc:

  • Use Overlay: Yes
  • Config file used: /home/pattern/.config/picom.conf

Drivers (inaccurate):

nouveau

Backend: glx

  • Driver vendors:
  • GLX: Mesa Project and SGI
  • GL: nouveau
  • GL renderer: NVD9
  • Accelerated: 1

Configuration:

Configuration file
fading = true;

unredir-if-possible = true;
unredir-if-possible-delay = 1000;
backend = "glx"; # previously xl_glx_hybrid, changing this to glx does nothing
		           # for reducing cpu usage
vsync = true;
use-damage = false; # picom reports that GLX_EXT_buffer_age is not supported by
				  # my driver, so I turned it off
glx-no-stencil = true;

Steps of reproduction

  1. Use the xf86-video-nouveau driver
  2. Use glx as the backend
  3. Check the cpu usage using htop

Expected behavior

Cpu usage (on idle) being approx. 5%.

Current Behavior

Cpu usage (on idle) often spikes to 60% Note: if you check this using top, the largest cpu user (~40%) is a kernel kworker.

Similar Issue

The person reporting #446 also experienced this issue, although in that case the person just forgot to use any drivers and instead rely on software rendering.

AntimatterReactor avatar Jun 25 '22 07:06 AntimatterReactor

I had a similar issue, albeit much more severe - my laptop's power usage was 25W. Quite possibly the most scared I've ever been about my linux distro. Completely stripping my picom config of every option bit by bit and reverting to the non-git branch has fixed performance - the largest difference being made by turning OFF glx. Not sure what's going on, because my GLX device is listed as Mesa Intel[....] as opposed to the other user in #446 having a driver problem.

pradyungn avatar Jul 14 '22 06:07 pradyungn

Also experiencing this. Happens when using latest (at the time of writing) nouveau on Arch linux. Occurs when using glx or xr_glx_hybrid backends. Picom version vgit-7e568.

Most of the CPU usage is consumed by two instances of kworker/u8:2-events_unbound, not picom itself.

Log is getting spammed with messages:

ev_handle DEBUG ] event Event 120 serial 0x00003455 window

In log it is either event 120 or event 119.

I switched to nvidia proprietary drivers for the time being, but I could switch back temporarily and provide more info if needed.

glxinfo:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: nouveau (0x10de)
    Device: NVE4 (0x1187)
    Version: 22.1.7
    Accelerated: yes
    Video memory: 2023MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.3
    Max compat profile version: 4.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: nouveau
OpenGL renderer string: NVE4
OpenGL core profile version string: 4.3 (Core Profile) Mesa 22.1.7
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.3 (Compatibility Profile) Mesa 22.1.7
OpenGL shading language version string: 4.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.1.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

d-danilov avatar Sep 14 '22 14:09 d-danilov

This happens to me too (garuda / zen) and ive switched to xrender and resolved.

czrpb avatar Dec 12 '22 20:12 czrpb

I have the same issue with Nvidia proprietary driver.

thegamerx1 avatar Sep 04 '23 15:09 thegamerx1