Picom using high CPU

Hi!

picom is using a lot of CPU and starts right up/away when logging in; it doesnt seem to wait for terminals or browsers etc.

Ive poke around the net and tried to turn off transparency/opacity in a couple of configs such as alacritty and picom, but still no go.

I do apologize for not being able to help myself and would be happy to have pointed out where I can improve!

garuda-inix

System:
  Kernel: 6.0.12-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=641c7d0e-10b8-42e3-a23d-f70c816cb89a rw rootflags=subvol=@
    quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    loglevel=3 ibt=off
  Desktop: i3 v: 4.21.1 info: i3bar vt: 7 dm: LightDM v: 1.32.0
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: TUF GAMING X570-PLUS (WI-FI) v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 2607
    date: 08/14/2020
CPU:
  Info: model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 gen: 3
    level: v3 note: check built: 2020-22 process: TSMC n7 (7nm)
    family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701021
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 32 MiB desc: 2x16 MiB
  Speed (MHz): avg: 3748 high: 4116 min/max: 2200/4208 boost: enabled
    scaling: driver: acpi-cpufreq governor: performance cores: 1: 4092 2: 3677
    3: 4116 4: 3600 5: 3600 6: 3600 7: 3590 8: 3600 9: 3898 10: 4092 11: 3520
    12: 3600 bogomips: 86230
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP
    protection
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP:
    always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GM206 [GeForce GTX 960] vendor: Micro-Star MSI
    driver: nouveau v: kernel alternate: nvidia_drm,nvidia non-free: 525.xx+
    status: current (as of 2022-12) arch: Maxwell code: GMxxx
    process: TSMC 28nm built: 2014-19 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s ports: active: DP-3 empty: DP-1, DP-2,
    DVI-I-1, HDMI-A-1 bus-ID: 09:00.0 chip-ID: 10de:1401 class-ID: 0300
    temp: 35.0 C
  Device-2: Anker PowerConf C300 type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 3-4:5 chip-ID: 291a:3361 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 compositor: Picom v: git-98a5c
    driver: X: loaded: nouveau unloaded: modesetting alternate: fbdev,nv,vesa
    dri: nouveau gpu: nouveau display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3440x1440 s-dpi: 96 s-size: 910x381mm (35.83x15.00")
    s-diag: 987mm (38.84")
  Monitor-1: DP-3 model: Samsung S34J55x serial: <filter> built: 2020
    res: 3440x1440 dpi: 110 gamma: 1.2 size: 797x333mm (31.38x13.11")
    diag: 864mm (34") modes: max: 3440x1440 min: 720x400
  API: OpenGL v: 4.3 Mesa 22.2.3 renderer: NV126 direct render: Yes
Audio:
  Device-1: NVIDIA GM206 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel bus-ID: 1-3:2 v: kernel pcie: chip-ID: 047f:c025
    gen: 1 class-ID: 0300 speed: 2.5 GT/s serial: <filter> lanes: 16 link-max:
    gen: 3 speed: 8 GT/s bus-ID: 09:00.1 chip-ID: 10de:0fba class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 0b:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: Plantronics Plantronics C320-M type: USB
    driver: plantronics,snd-usb-audio,usbhid
  Device-4: Anker PowerConf C300 type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 3-4:5 chip-ID: 291a:3361 class-ID: 0e02 serial: <filter>
  Sound API: ALSA v: k6.0.12-zen1-1-zen running: yes
  Sound Server-1: PulseAudio v: 16.1 running: no
  Sound Server-2: PipeWire v: 0.3.61 running: yes
Network:
  Device-1: Intel Wireless-AC 9260 driver: iwlwifi v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:2526 class-ID: 0280
  IF: wlp4s0 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: f000 bus-ID: 05:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel Wireless-AC 9260 Bluetooth Adapter type: USB driver: btusb
    v: 0.8 bus-ID: 3-5:3 chip-ID: 8087:0025 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 2.74 TiB used: 113.1 GiB (4.0%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: SSD 970 EVO Plus 1TB size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXM7 temp: 38.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DM008-2FR102
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: 0001 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 type: USB vendor: Kingston
    model: DataTraveler 2.0 size: 7.22 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: 1.00
Partition:
  ID-1: / raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 50.9 GiB (5.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 608 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 50.9 GiB (5.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 50.9 GiB (5.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 50.9 GiB (5.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 31.26 GiB used: 2 MiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 68.1 C mobo: N/A gpu: nouveau temp: 35.0 C
  Fan Speeds (RPM): N/A gpu: nouveau fan: 875
Info:
  Processes: 382 Uptime: 51m wakeups: 0 Memory: 31.26 GiB
  used: 6.11 GiB (19.5%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 Packages: pm: pacman pkgs: 1514
  libs: 381 tools: pamac,paru Shell: Zsh v: 5.9 running-in: alacritty
  inxi: 3.3.24
e[1;34mGaruda (2.6.10-1):e[0m
e[1;34m  System install date:e[0m     2022-09-11
e[1;34m  Last full system update:e[0m 2022-12-12 e[1;31m↻
e[1;34m  Is partially upgraded:  e[0m No
e[1;34m  Relevant software:      e[0m NetworkManager
e[1;34m  Windows dual boot:      e[0m No/Undetected
e[1;34m  Snapshots:              e[0m Snapper
e[1;34m  Failed units:           e[0m 

Thanks! << q

https://wiki.archlinux.org/title/picom

Please close all browser, youtube stuff and so on, what show htop now :slight_smile:

Hi!

Thx! Still seems high:

<< q

That's to much

That's on my i3wm Laptop

Summary

~~
CPU:
Info: model: 11th Gen Intel Core i7-1185G7 socket: U3E1 bits: 64
type: MT MCP arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
process: Intel 10nm family: 6 model-id: 0x8C (140) stepping: 1
microcode: 0xA6
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 5 MiB desc: 4x1.2 MiB
L3: 12 MiB desc: 1x12 MiB
Speed (MHz): avg: 1121 high: 1977 min/max: 400/4800 base/boost: 3000/3000
scaling: driver: intel_pstate governor: powersave volts: 0.8 V
ext-clock: 100 MHz cores: 1: 1977 2: 766 3: 1542 4: 1509 5: 1146 6: 695
7: 601 8: 738 bogomips: 47923

but lts kernel

Hi!

You are suggesting to try the LTS kernel yes?

Ill give it a whirl!

<< q

Some kernel have version 6.1 bore,amd?

LTS 5.15.82-1-lts
It's worth a try, at least to rule out the kernel as a problem.

Linux kernel 6.1 is here
https://lkml.org/lkml/2022/12/11/206

# Thank you code_nomad: http://9m.no/ꪯ鵞
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton

#################################
#
# Backend
#
#################################

# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";

#################################
#
# GLX backend
#
#################################

glx-no-stencil = true;

# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
# but a 20% increase when only 1/4 is.
# My tests on nouveau show terrible slowdown.
glx-copy-from-front = false;

# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;

# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
# glx-no-rebind-pixmap = true;

# GLX backend: GLX buffer swap method we assume.
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
# undefined is the slowest and the safest, and the default value.
# copy is fastest, but may fail on some drivers,
# 2-6 are gradually slower but safer (6 is still faster than 0).
# Usually, double buffer means 2, triple buffer means 3.
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
# Useless with --glx-use-copysubbuffermesa.
# Partially breaks --resize-damage.
# Defaults to undefined.
#glx-swap-method = "undefined"; #deprecated !
#use-damage = true

#################################
#
# Shadows
#
#################################

# Enabled client-side shadows on windows.
shadow = true;
# The blur radius for shadows. (default 12)
shadow-radius = 5;
# The left offset for shadows. (default -15)
shadow-offset-x = 1;
# The top offset for shadows. (default -15)
shadow-offset-y = 1;
# The translucency for shadows. (default .75)
shadow-opacity = 0.3;

# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;

# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
    "! name~=''",
    "name = 'Notification'",
    "name = 'Plank'",
    "name = 'Docky'",
    "name = 'Kupfer'",
    "name = 'xfce4-notifyd'",
    "name *= 'VLC'",
    "name *= 'compton'",
    "name *= 'picom'",
    "name *= 'Chromium'",
    "name *= 'Chrome'",
    "class_g = 'Firefox' && argb",
    "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'",
    "class_g ?= 'Dmenu'",
#	"class_g ?= 'Dunst'",
# disables shadows on i3 frames
#	"class_g ?= 'i3-frame'"
#    "_GTK_FRAME_EXTENTS@:c",
#    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = false;

#################################
#
# Opacity
#
#################################

inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;

# Dim inactive windows. (0.0 - 1.0)
# inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;

#################################
#
# Fading
#
#################################

# Fade windows during opacity changes.
fading = false;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 1;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;

# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];

#################################
#
# Other
#
#################################

# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;

# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;

# Specify refresh rate of the screen.
# If not specified or 0, picom will try detecting this with X RandR extension.
refresh-rate = 0;

# Vertical synchronization: match the refresh rate of the monitor
vsync = false;

# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;

# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;

# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
unredir-if-possible = true;

# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ "class_g = 'Cairo-clock'" ];

# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;

#################################
#
# Window type settings
#
#################################

wintypes : 
{
  tooltip : 
  {
    fade = true;
    shadow = false;
    opacity = 0.85;
    focus = true;
  };
  fullscreen : 
  {
    fade = true;
    shadow = false;
    opacity = 1;
    focus = true;
  };
};

######################
#
# XSync
# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
#
######################

# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;

#opacity-rule = [ 
#"99:name *?= 'Call'", 
#"99:class_g = 'Chromium'", 
#"99:name *?= 'Conky'", 
#"99:class_g = 'Darktable'", 
#"50:class_g = 'Dmenu'", 
#"99:name *?= 'Event'", 
#"99:class_g = 'Firefox'", 
#"99:class_g = 'GIMP'", 
#"99:name *?= 'Image'",
#"99:class_g = 'Lazpaint'", 
#"99:class_g = 'Midori'", 
#"99:name *?= 'Minitube'", 
#"99:class_g = 'Mousepad'",
#"99:name *?= 'MuseScore'", 
#"90:name *?= 'Page Info'", 
#"99:name *?= 'Pale Moon'", 
#"90:name *?= 'Panel'", 
#"99:class_g = 'Pinta'", 
#"90:name *?= 'Restart'", 
#"99:name *?= 'sudo'", 
#"99:name *?= 'Screenshot'", 
#"99:class_g = 'Viewnior'", 
#"99:class_g = 'VirtualBox'", 
#"99:name *?= 'VLC'", 
#"99:name *?= 'Write'", 
#"93:class_g = 'URxvt' && !_NET_WM_STATE@:32a", 
#"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", 
#"96:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'" 
#];


#################################
#     Background-Blurring       #
#################################


# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method = 
# blur-size = 12
#
# blur-deviation = false

# Blur background of semi-transparent / ARGB windows. 
# Bad in performance, with driver-dependent behavior. 
# The name of the switch may change without prior notifications.
#
# blur-background = true;

# Blur background of windows when the window frame is not opaque. 
# Implies:
#    blur-background 
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false;


# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false;


# Specify the blur convolution kernel, with the following format:
# example:
#   blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ''
# blur-kern = "3x3box";

blur: {
  # requires: https://github.com/ibhagwan/picom
  method = "kawase";
  #method = "kernel";
  strength = 7;
  # deviation = 1.0;
  # kernel = "11x11gaussian";
  background = false;
  background-frame = false;
  background-fixed = false;
  kern = "3x3box";
}

# Exclude conditions for background blur.
blur-background-exclude = [
  #"window_type = 'dock'",
  #"window_type = 'desktop'",
  #"class_g = 'URxvt'",
  "class_g = 'slop'",
  "class_g = 'i3status'",
  "_GTK_FRAME_EXTENTS@:c",
  "window_type = 'menu'",
  "window_type = 'tooltip'",
  "window_type = 'popup_menu'",
  "window_type = 'dropdown_menu'",
  "window_type = 'dock'",
  "window_type = 'desktop'"
];

1 Like

Hi!

Didnt seem to help:

1 Like

IDK :frowning:

Check and maybe open issue

1 Like

Hi!

Thx for the link!

Well, i switched backends to xrender and no high CPU anymore, and it seems this is a known issue:

<< q

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.