Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage after suspend. #1168

Closed
yagi-tan opened this issue Jan 28, 2024 · 11 comments · Fixed by #1172
Closed

High CPU usage after suspend. #1168

yagi-tan opened this issue Jan 28, 2024 · 11 comments · Fixed by #1172
Labels
bug driver: nvidia NVIDIA driver specific problems revisit Resolved temporarily, more work has to be done when more info is available upstream Bug is upstream and there is likely not much compton can do

Comments

@yagi-tan
Copy link

Platform

Debian 12
Linux debian 6.1.0-17-amd64 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux

GPU, drivers, and screen setup

GPU: NVIDIA GeForce GT 730
Driver: nvidia-tesla-470-driver 470.223.02-2~deb12u1
Setup: Single monitor desktop.

glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 2048 MB
    Total available memory: 2048 MB
    Currently available dedicated video memory: 1750 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GT 730/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 470.223.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 470.223.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 470.223.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

LXDE

picom version

vgit-702e3, v11. Problem appears starting from commit a28e221.

Diagnostics
**Version:** vgit-702e3

### Extensions:

* Shape: Yes
* RandR: Yes
* Present: Present

### Misc:

* Use Overlay: Yes
* Config file used: None

### Drivers (inaccurate):

NVIDIA

### Backend: glx

* Driver vendors:
 * GLX: NVIDIA Corporation
 * GL: NVIDIA Corporation
* GL renderer: NVIDIA GeForce GT 730/PCIe/SSE2

### Backend: egl

* Driver vendors:
 * EGL: NVIDIA
 * GL: NVIDIA Corporation
* GL renderer: NVIDIA GeForce GT 730/PCIe/SSE2

Configuration:

picom -b --backend glx --vsync

Steps of reproduction

  1. Run picom, then suspend/standby the system.
  2. Wakeup system.

Expected behavior

picom to have low CPU usage (0-2%) like before suspend.

Current Behavior

picom high CPU usage (~85%) after suspend. Restarting the process fixes the issue.

Log file

picom_702e30.tar.gz

@desbma
Copy link

desbma commented Jan 28, 2024

I have the same exact issue, 100% CPU usage when returning from hibernation. A restart of the picom process fixes it. I also have this in my config file:

backend = "glx";
vsync = true;

I am on Arch Linux, with picom package version 11-4. This is a recent regression, as the issue was not occurring previously.

@yshui
Copy link
Owner

yshui commented Jan 28, 2024

does it happen without vsync?

@absolutelynothelix
Copy link
Collaborator

can't reproduce on an intel gpu neither with the present vblank scheduler nor with the sgi_video_sync one.

@absolutelynothelix
Copy link
Collaborator

can reproduce on an nvidia gpu only with the sgi_video_sync vblank scheduler.

@yagi-tan
Copy link
Author

does it happen without vsync?
can reproduce on an nvidia gpu only with the sgi_video_sync vblank scheduler.

nvidia

Since there's something about vblank, should I disable this 'Sync to VBlank' config and try again without vsync?

@yshui
Copy link
Owner

yshui commented Jan 28, 2024

@yagi-tan just set vsync = false in picom.conf

@yagi-tan
Copy link
Author

Oh, picom --no-vsync --backend glx does fix the problem.

@absolutelynothelix
Copy link
Collaborator

@yagi-tan, you could also try PICOM_DEBUG=force_vblank_sched=present picom --backend=glx --vsync.

@yagi-tan
Copy link
Author

yagi-tan commented Jan 28, 2024

@yagi-tan, you could also try PICOM_DEBUG=force_vblank_sched=present picom --backend=glx --vsync.

@absolutelynothelix Ahh, to force using present scheduler, isn't it? Yup, tested just now and that also works. Which one is better, present+vsync or sgi+no-vsync? Seems that both use similar CPU/RAM usage.

@yshui
Copy link
Owner

yshui commented Jan 28, 2024

@yagi-tan please don't worry about the schedulers! and don't persist the PICOM_DEBUG environment variable, it's for debug only.

@yagi-tan
Copy link
Author

@yshui I see. All right then, thanks all for quick responses. Feel free to close this issue.

@absolutelynothelix absolutelynothelix added bug driver: nvidia NVIDIA driver specific problems upstream Bug is upstream and there is likely not much compton can do revisit Resolved temporarily, more work has to be done when more info is available labels Jan 29, 2024
yshui added a commit that referenced this issue Jan 29, 2024
If resetting fails, set a flag so all future schedule calls will fail.

Fixes #1168

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit that referenced this issue Jan 29, 2024
If resetting fails, set a flag so all future schedule calls will fail.

Fixes #1168

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit that referenced this issue Jan 30, 2024
If resetting fails, set a flag so all future schedule calls will fail.

Fixes #1168

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit that referenced this issue Jan 30, 2024
If resetting fails, set a flag so all future schedule calls will fail.

Fixes #1168

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit that referenced this issue Jan 30, 2024
If resetting fails, set a flag so all future schedule calls will fail.

Fixes #1168

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit that referenced this issue Jan 30, 2024
workaround for a NVIDIA driver bug, fixes #1168
yshui added a commit that referenced this issue Feb 13, 2024
If resetting fails, set a flag so all future schedule calls will fail.

Fixes #1168

(cherry picked from commit 238c3cc)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
yshui added a commit that referenced this issue Feb 13, 2024
If resetting fails, set a flag so all future schedule calls will fail.

Fixes #1168

(cherry picked from commit 238c3cc)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug driver: nvidia NVIDIA driver specific problems revisit Resolved temporarily, more work has to be done when more info is available upstream Bug is upstream and there is likely not much compton can do
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants