psifidotos / applet-window-buttons

Plasma 5 applet in order to show window buttons in your panels
GNU General Public License v2.0
402 stars 55 forks source link

CPU spikes and lockups with Draw buttons inactive state when needed option enabled #126

Closed gu1ll0me closed 2 years ago

gu1ll0me commented 3 years ago

After a certain time of use, when I click the Kicker launcher or the clipboard applet, my CPU utilization goes to 100% for one core and a lockup happens for ~1 second whenever if the Kicker launcher and the clipboard applet are on a plasma panel or a Latte panel. It doesn't happen immediately after Latte starts but only after a couple of minutes or after a certain amount of uses of the widgets. It seems that the more time the system is running, the worse the lockup is.

I tested many things for days and found that the Draw buttons inactive state when needed are causing this issue. Without this option, there is no more lockup with Kicker launcher or clipboard applet.

Show/hide Kicker menu + Show/hide clipboard with Draw buttons inactive state when needed enabled after some minutes: image

Same actions but with Draw buttons inactive state when needed disabled: image

Config ArchLinux Plasma 5.21.3 Mesa 20.1 (AMD) Latest Latte-Dock/Window buttons commits Button theme: Breeze

psifidotos commented 3 years ago

What is your copmputer characteristics, cpu, ram, hard disk etc.?

psifidotos commented 3 years ago
  1. In what process these spikes come from?
gu1ll0me commented 3 years ago

What is your copmputer characteristics, cpu, ram, hard disk etc.?

i7-6700k / 16GB RAM / NVMe SSD / Radeon 6800 XT

1. In what process these spikes come from?

From latte-dock. I just created an empty plasma panel to add the window buttons widget to see the result. I will post feedback later.

Thanks.

gu1ll0me commented 3 years ago

When the window buttons widget is on an empty plasma panel (without any other widgets), the CPU spikes still occurs but, this time, with the plasmashell process. The Kicker menu and clipboard lockups doesn't happens since these widgets stayed in the Latte panel. Each spikes below corresponds to: show the Kicker menu; hide the Kicker menu; show the clipboard widget; hide the clipboard widget.

image

As soon as I disable the Draw button inactive state... all come back to normal without any CPU spikes.

Some more config details which may be revelant: I'm on X11 with dual-monitor (3840x2160 + 1920x1200) and I'm using fractional scaling (xrandr --scale 2x2 for the 4k monitor and xrandr --scale 1.5x1.5 for the 2k monitor).

psifidotos commented 3 years ago

sorry I can not follow and neither I can replicate, but you should be aware about: https://www.reddit.com/r/kde/comments/mj6p31/latte_dock_notice_about_freezes_during_startup/

clipboard is in my black list of applets and I dont use it anymore with Latte.

If you are using latest master, you remove clipboard applet or disable it and everything is fine, then sorry but window buttons applet is not responsible for clipboard applet and application launcher.

I dont have any freezes in my system any more so I suppose this flagges for WorksForMe until there is a concrete way to replicate in my system. The CPU spikes can be normal because any window state change must be tracked down and identified but freezes is important but I can not replicate. I wouldnt be surprised if this AMD driver issue.

XEmpty commented 3 years ago

when widget is on panel whole Plasma actions like right click on desktop, menu, actions on panel , lagging whole system. I just removed it from taskbar and problems gone.

Version : 0.8.1-3 (Manjaro)

Edit : Problem solved on 9.x version of applet . But i need to test it more.

gu1ll0me commented 3 years ago

Same problem for me with version 0.9.

The small freezes occurs even if I'm not using the clipboard applet or the application launcher. Just by clicking the desktop on my second monitor, the same CPU spikes/freezes occurs.

@psifidotos Maybe you're right with the AMD driver, i will try to use the proprietary driver in the next few days.

Thanks for the 0.9 update and your work on Latte in the last weeks.

XEmpty commented 3 years ago

Problem still appear... after some time that applet make my plasma actions delayed. Everything what i wanna do with plasma-shell lagging.

Problem on : 8.1x and 9.x version

gu1ll0me commented 3 years ago

@XEmpty Are you using an AMD video card with the Mesa drivers too?

And is your problem directly related to the Draw buttons inactive state when needed option?

psifidotos commented 3 years ago

One thing that you could try is to try another window decoration. There is a chance that Breeze does not play well with that option. You could check the SierraBreezeEnhanced if this is reproducable, I remember that SierraBreezeEnhanced was playing just fine with that option.

You should know that the applet is not drawing the buttons and states for c++ decorations, your chosen decoration is doing it.

For Aurorae themes I believe that this bug is not reproducable.

a1d4r commented 2 years ago

Same issue here. I have a setup with two monitors, each has a panel with Applet Window Buttons and "Show: Active window is maximized" option selected. When I switch windows on different monitors, CPU utilization reaches 100% and plasma panels are not responsive for a few seconds. CPU temperature reaches 90°C, while the normal temperature is 50-60°C

OS: Manjaro Linux x86_64 
Kernel: 5.10.60-1-MANJARO 
Resolution: 2160x1440, 2880x1620 
DE: Plasma 5.22.4 
WM: KWin 
WM Theme: Breeze 
Theme: Breath2 [Plasma], Breath-Dark [GTK2/3] 
Icons: breath2 [Plasma], breath2 [GTK2/3] 
CPU: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8) @ 2.100GHz 
GPU: AMD ATI 03:00.0 Picasso 
Memory: 11343MiB / 14997MiB

UPD: the problem remains even with "Show: Always"

psifidotos commented 2 years ago

this should now fixed with latest master and plasma 5.23.2