What I always used for my configuration through copy-paste from various sources is presented next but the only changes I made to it was when it crashed. Now that I have amdgpu finally working with all of the associated bling, I decided to review the performance situation.

Final file available here

Resources used:

  • Performance considerations by chjj found here
  • $man 1 compton

Original Config

compton.conf
1
2
3
4
5
6
7
8
9
10
backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = false;
glx-swap-method = 2;
refresh-rate = 0;
vsync = "opengl";
dbe = false;
paint-on-overlay = true;
sw-opti = false;
unredir-if-possible = true;

Turn it on and off again

During these benchmarks I kept normal activity on the screen and an 1080p 8 hour youtube video of a fireplace on 14 of the screen. This firefox window was also supposed to be used for the partial update benchmark but --benchmark-wid simply refused everything I threw at it so I decided to postpone such test to a later date.

The benchmark used will be the following to simulate full screen repaint. vblank_mode is set to 0 to disable AMDGPU’s default vsync.

seq 5 | xargs -P1 -Iz /usr/bin/time -f "%e" compton --config ~/.compton.conf --benchmark 5000

First thing I did was to remove all backend options except the backend glx to get a baseline then add vsync to check if it impacted performance.

Config 2 - swap method 2

compton.conf
1
2
3
4
5
6
backend = "glx";
vsync="opengl-mswc"
glx-no-stencil = true;
glx-swap-method = 2;
unredir-if-possible = true;
glx-use-gpushader4 = true;

Config 3 - swap method 2 && no-rebind-pixmap

compton.conf
1
2
3
4
5
6
7
backend = "glx";
vsync="opengl-mswc"
glx-swap-method = 2;
glx-no-stencil = true;
glx-use-gpushader4 = true;
glx-no-rebind-pixmap = true;
unredir-if-possible = true;

Config 4 - swap method 6

compton.conf
1
2
3
4
5
6
backend = "glx";
vsync="opengl-mswc"
glx-swap-method = 6;
glx-no-stencil = true;
glx-use-gpushader4 = true;
unredir-if-possible = true;

Data

OriginalGLXVsync-mswcConfig 2Config 3Config 4
183.4512.2412.689.5910.4410.02
283.4212.412.579.099.9310.08
383.3812.2212.669.979.8710.28
483.1411.9312.099.079.7610.3
583.5411.1812.088.299.679.89
Average83.38611.99412.4169.2029.93410.114

Time in seconds to repaint the screen 5000 times plotted

Conclusions

  • Adding vsync didn’t change the results of the benchmark.
  • Disabling gpushader4 didn’t make much difference, or at least, within the margin error.
  • no-rebind-pixmap appears to reduce performance but since it’s most useful in a specific situation it’s still an option to consider.
  • I’m keeping config 2 for now.