You are not logged in.

#1 2025-05-21 00:30:17

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

I'm having a thing where every so often I get a process running that just seems to keep going for many minutes.

The process according to htop:

usr/lib/xorg/xorg :0 -seat -seat -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

I'm not sure what causes it, or what stops it.

Googling the error has turned up nothing much that I have found usable!

This link here got me thinking it's compositing related: https://bbs.archlinux.org/viewtopic.php?id=280945

When I turn off compositing the CPU dies down again, and gets busy when I turn it on again.

But it's not consistent: the cpu does die down eventually again even when compositing is on.

So I'm not sure where to find the culprit for this issue!


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#2 2025-05-21 00:36:01

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

According to this: https://askubuntu.com/questions/163264/ … -x-lightdm

And the very bold advice here: https://web.archive.org/web/20170330041 … -xorg.html  (found in the links to one of the answers)

It might be a matter of changing a setting on xorg.conf? But again, I'm not sure why it's a temporary problem.


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#3 2025-05-21 06:55:50

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

Which options are being used with picom?

This command should show them:

pgrep -a picom

Not sure how the bunsen-compositor abstraction works though, hopefully I can figure it out as we go.

Last edited by Head_on_a_Stick (2025-05-21 06:56:18)

Offline

#4 2025-05-21 20:06:10

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

The only response to that command is:

1508650 picom

But I have tracked down picom.conf, so maybe there's something to find in there?

I don't think I have changed anything from standard picom, but maybe it's a hardware thing with this Thinkpad.

(ThinkPad T15 Gen 2i)


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#5 2025-05-21 20:39:25

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

JasonMehmel wrote:

I have tracked down picom.conf, so maybe there's something to find in there?

That is highly likely neutral

Offline

#6 2025-05-21 22:20:50

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

Head_on_a_Stick wrote:

That is highly likely neutral

Were you expecting more output from the pgrep command?

Or would there be another way of analyzing the interactions picom is having with the CPU?


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#7 2025-05-22 06:17:16

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

Can you share the content of the configuration file? I don't have a BL installation handy to check.

What is your graphics hardware?

lspci -knn -d ::03xx

Offline

#8 2025-05-22 20:40:42

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

Head_on_a_Stick wrote:

Can you share the content of the configuration file? I don't have a BL installation handy to check.

What is your graphics hardware?

lspci -knn -d ::03xx

Here's that ouput:

00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01)
	Subsystem: Lenovo TigerLake-LP GT2 [Iris Xe Graphics] [17aa:22c9]
	Kernel driver in use: i915
	Kernel modules: i915

The picom.conf file is pretty long, but if I only give you mostly what's not commented out:

shadow = true;
shadow-radius = 12;

shadow-opacity = 0.45;

shadow-offset-x = -8;

shadow-offset-y = -8;

shadow-exclude = [
    "! name~=''",
#    "name = 'jgmenu'",
    "name = 'Notification'",
    "name = 'wbar'",
    "name = 'Docky'",
    "name = 'Kupfer'",
#    "name = 'xfce4-notifyd'",
    "name *= 'VirtualBox'",
    "name *= 'VLC'",
    "name *= 'Chromium'",
    "name *= 'Chrome'",
    "class_g ?= 'plank'", # see wintypes
    "class_g ?= 'picom'",
    "class_g = 'Tint2'",
    "class_g ?= 'Conky'",
    "class_g = 'Kupfer'",
    "class_g = 'Synapse'",
    "class_g ?= 'Notify-osd'",
    "class_g ?= 'Cairo-dock'",
#    "class_g ?= 'Xfce4-notifyd'",
    "class_g ?= 'Xfce4-power-manager'",
    "window_type = 'desktop'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_MAXIMIZED_VERT'",
    "_GTK_FRAME_EXTENTS@:c"
];


fading = true;

fade-in-step = 0.06;

fade-out-step = 1.0;

no-fading-destroyed-argb = true;



inactive-opacity = 0.96;

frame-opacity = 1.0;

inactive-opacity-override = false;

active-opacity = 1.0;

corner-radius = 0;

# Exclude conditions for rounded corners.
# Also see: https://github.com/owl4ce/dotfiles/discussions/177
rounded-corners-exclude = [
    "! name~=''",    # exclude windows with no name
#    "class_g = 'tint2'",
    "class_g  = 'Conky'",
#   "window_type = 'menu'",
#   "window_type = 'dock'",
    "window_type = 'desktop'",
#   "window_type = 'dropdown_menu'",
#   "window_type = 'popup_menu'",
#   "window_type = 'tooltip'",
#   "window_type = 'utility'"
#   "class_g = 'Polybar'",
#   "class_g = 'Rofi'",
#   "class_g = 'Dunst'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
#   "_NET_WM_STATE@:32a *= '_NET_WM_STATE_MAXIMIZED_VERT'",
    "_GTK_FRAME_EXTENTS@:c"
];


blur-background-exclude = [
  "window_type = 'dock'",
  "window_type = 'desktop'",
  "_GTK_FRAME_EXTENTS@:c"
];


mark-wmwin-focused = true;

mark-ovredir-focused = true;

detect-rounded-corners = true;

detect-client-opacity = true;

use-ewmh-active-win = true;

unredir-if-possible = true;

detect-transient = true;

detect-client-leader = true;

use-damage = true;

log-level = "warn";



wintypes:
{
  dock = { shadow = false; };
  tooltip = { fade = false; shadow = false; };
  menu = { fade = false; };
  dropdown_menu = { fade = false; opacity = 1.0; };
  popup_menu =  { fade = false; opacity = 1.0; };
};

Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#9 2025-05-23 07:05:53

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

If the xserver-xorg-video-intel package is installed try removing it. The modesetting DDX driver will work better with that hardware.

Offline

#10 2025-05-24 10:02:46

manyroads
Member
From: around here, somewhere
Registered: 2019-04-16
Posts: 158
Website

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

FWIW... some 'just say no' to compositing  (we also say yes to 'composting').  But don't trust me, I'm old and cranky.

Last edited by manyroads (2025-05-24 10:03:24)


Pax vobiscum,
Mark Rabideau - https://many-roads.com  https:/eirenicon.org 
i3wm, dwm, hlwm on sid/ arch ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken

Offline

#11 2025-05-25 02:26:21

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,138
Website

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

^ What the... No, Yes? Useless post.


I don't care what you do at home. Would you care to explain?

Offline

#12 2025-05-25 20:25:20

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

Head_on_a_Stick wrote:

If the xserver-xorg-video-intel package is installed try removing it. The modesetting DDX driver will work better with that hardware.

I did have that installed, and even noticed that the repo suggested removing it if the hardware was newer than 2007!

I removed it and we'll see what we can see!

No occurrences of the problem for a few days (since my last post, really) but then it cropped up again as we speak! (I don't think it's the BL forum website!)

What I have noticed now, is that the CPU xorg activity is also connected to the active window, in particular browsers. Firefox and Chrome both keep the CPU xorg activity, but when I switch to SublimeText or Obsidian, it dies down.

Firefox itself isn't burning more CPU, but xorg is.

And then it dies down again. I wonder if it has something to do with xorg cataloguing or indexing stuff in the browser?


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#13 2025-05-26 22:34:58

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

Head_on_a_Stick wrote:

If the xserver-xorg-video-intel package is installed try removing it. The modesetting DDX driver will work better with that hardware.

Welp. Removing it meant that Lightdm couldn't load when I performed a reboot, which meant no GUI experience at all!

I reinstalled that package via apt and my BunsenLabs desktop is back!

I suppose Lenovo was still using that tech for their ThinkPads.

Still not sure what's causing the browser-related xorg - Lightdm cpu spike, though!


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#14 2025-05-27 06:55:18

ceeslans
Member
Registered: 2015-09-30
Posts: 196

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

Do you see (m)any xlib error messages in your ~/.xsession-errors file, such as: xlib ignoring invalid extension #161 or extension #146 ?
If so, adding the --daemon option to the startup command (forking picom to background), might solve the issue

Offline

#15 2025-05-28 01:36:37

JasonMehmel
Member
Registered: 2015-10-06
Posts: 186

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

ceeslans wrote:

Do you see (m)any xlib error messages in your ~/.xsession-errors file, such as: xlib ignoring invalid extension #161 or extension #146 ?
If so, adding the --daemon option to the startup command (forking picom to background), might solve the issue

What I see in the autostart file is:

    bl-compositor --start

So would your advice mean the following?

    bl-compositor --start --daemon


Fortune favours the bold.
ThinkPad T15 Gen 2i

Offline

#16 2025-05-28 06:02:52

ceeslans
Member
Registered: 2015-09-30
Posts: 196

Re: Compositing 40%-50% CPU for minutes - picom, lightdm or xorg maybe?

JasonMehmel wrote:

What I see in the autostart file is:
    bl-compositor --start

So would your advice mean the following?
    bl-compositor --start --daemon

Well, such --daemon option doesn't exist in the bl-compositor script (perhaps @johnraff can verify and/or make necessary edit).

When running boron-live on my Lenovo laptop, I notice the continuous and rapid build-up of Xlib error messages in ~/.xsession-errors .
Just to check whether this is causing the CPU/memory consumption spike on your system, you could (temporarily) edit your ~/.config/bunsen/autostart file by commenting out bl-compositor - and call picom directly:

#bl-compositor --start
picom --daemon &

Last edited by ceeslans (2025-05-28 14:24:42)

Offline

Board footer

Powered by FluxBB