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

100% CPU usage when moving/resizing windows with Nvidia vsync OR --vsync enabled #383

Open
ghost opened this issue Oct 5, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 5, 2016

Skip to end of post with updated findings

Hi. I'm having a bad issue with Compton. Any time I resize or move a window around the screen, my cpu (i7-6700k) usage spikes to 100% on the xorg process. If I quickly resize a complex window like Chrome, my system basically grinds to a halt rendering the screen at maybe 2 FPS.

I'm using Compton on Mint 18 Xfce. I've tried 0.1beta32 from the PPA, as well as the version in ubuntu's repos, 0.1~beta2-1. I'm using Nvidia proprietary 370.28 with a GTX 970. I'm on a fresh install of Mint, I installed it yesterday.

I have tried both by launching compton with compton --backend glx --vsync opengl-swc, as well as selecting "Xfwm4 + Compton" AND "Metacity + Compton" in Xfce's desktop settings.

I don't get this issue with Compiz or Xfce's compositor. Any ideas why this might be happening?

Let me know what other details you might need.

This happens when I take a screenshot while moving a window around. (100% cpu process is selected)

I ran the benchmark from the perf guide and did notice a lot of pagefults

$ /usr/bin/time compton --backend glx --benchmark 10000 ^CCommand terminated by signal 2 4.25user 5.69system 2:13.99elapsed 7%CPU (0avgtext+0avgdata 32604maxresident)k 0inputs+16outputs (1major+2294minor)pagefaults 0swaps

EDIT: Big discovery, partially fixed

Disable Nvidia "Sync to VBlank", then compton --backend glx = NO LAG
Disable Nvidia "Sync to VBlank", then compton --backend glx --vsync opengl-swc = LAG
Disable Nvidia "Sync to VBlank", then compton --backend glx --vsync opengl = NO LAG
Enable Nvidia "Sync to VBlank", then compton --backend glx = LAG
Enable Nvidia "Sync to VBlank", then compton --backend glx --vsync opengl-swc = LAG
Enable Nvidia "Sync to VBlank", then compton --backend glx --vsync opengl = LAG

--vsync opengl does NOT cause lag with Nvidia vsync disabled. I can turn Nvidia vsync on after launching compton with --vsync opengl and I do not get lag, but if I do it in the other order, I do get lag. It still tears though in both situations.

Nvidia Vsync enabled, and compton vsync disabled, I still get tearing.

@ghost ghost changed the title 100% CPU usage when moving/resizing windows 100% CPU usage when moving/resizing windows with Nvidia vsync OR --vsync enabled Oct 5, 2016
@kn00tcn
Copy link

kn00tcn commented Jan 21, 2017

what happened to nv's 'let the application decide' like on windows?

at the bottom, did you mean lag = 100% usage & unusable performance? or lag = delay in animation?

interesting how the tears in the screenshot look like they're tiled, which was recently discovered http://www.realworldtech.com/tile-based-rasterization-nvidia-gpus/

@devonhk
Copy link

devonhk commented Feb 7, 2017

I had a similar issue with compton 0.1~beta2-1 and with any nvidia proprietary driver greater than 367. I'm on ubuntu 16.04 using a GTX 1070 and i5-4670k. If I had a browser open either (firefox, chrome, chromium) my CPU usage would usually hit a 100% on all cores. My solution was to downgrade my nvidia driver to nvidia-367.
The exact command I was using at the time was compton -f

EDIT
I just noticed compton -f still uses 1 core at a 100% at any given time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants