-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Performance decrease from arch 2.0 -> 3.0 packages in vbox #41
Comments
Not sure what you mean by "get 3D acceleration working"? I don't think I did anything in compton-2 to fix non-working 3D acceleration. Maybe it is because of some other software update?
Are you sure it is compton 3.0-1, not 3.0-2? If it is the case, I can rule out one of the possibilities, which is good. To rule out another possibility, can you try compton 2.0 and 3.0 with the xrender backend, and see if there is difference in CPU usage and lag? |
Sorry, poor wording on my part. Using backend=glx was not functioning properly in vbox for me until 2.0, so I was using xrender. But starting with 2.0 I was able to switch to backend=glx and there was a huge performance gain.
Yes, I can reproduce the lag with both 3.0-1 and 3.0-2
Unfortunately, underneath virtualbox, xrender with the posted-config is having massive performance issues in both 2.0 and 3.0. From key-press to character viewable on the screen is 2-5s and I'm getting bizarre replicating keystrokes while trying to type (likely due to heavy cpu usage). |
Hmm, there is one (semi-unrelated) thing I want verify with this opportunity. Can you run compton 2 with your posted config, but with xrender instead, and |
I don't see a performance difference when enabling --xrender-sync-fence. The xrender slowdown was one of the reasons I had tried switching back to glx and found it to work now. There were known GL/mesa issues for arch in vbox on the arch bug tracker at one point (older sighting from 2016 I think). Will find it again to see if there was any status change that might identify other changes. |
Thanks for confirming! I'm always worried about whether removing xrender-sync is a good idea.. |
The vbox/GL issue I was remembering is here: https://bugs.archlinux.org/task/49752 |
Thanks. I will wait for your bisect results. |
If I understand the arch bug correctly, I'm not actually running with hardware acceleration in vbox, and When using the LD_PRELOAD hack mentioned in the arch-bug, compton 2 and 3 give the following errors and windows do not draw.
Will post bisect results later this evening, after work. |
Do you think your issue is somehow related to #40 ? |
My bisect results point to 28a2cc6 being the culprit. I did not see a v2 tag in the repo, so I started with the v1 tag. |
Did you try omor1's patch from https://bugs.archlinux.org/task/49752 ? |
I tried omor1's patch around a year ago but did not have too much success with compton. I believe where I ended up was that after rebuiling vboxservice, compton gave the same errors I was getting with just the LD_PRELOAD hack (pasted in #41 (comment) ) |
I'm seeing something suspicious now related to my glx-swap-method setting that makes me suspect I have a minor syntax problem in my .conf If I use quotes, performance with v2 is good: What's the correct syntax to get 'copy'? Should it be the literal string? |
@jrudess glx-swap-methods should be a string. |
With v2 performance decreases when switching from copy to buffer-age to about the same performance I see with v3. With v3, I don't observe any performance difference between copy or buffer-age. |
@jrudess The behavior of |
@jrudess In my test, the opengl calls compton v2 and v3 made with |
I'll do some more rigorous testing. I possibly changed more than one variable between cases as I was running through them while slightly distracted in a work meeting. And I'd like to pair down my giant conf file to something more default as well to make sure one of the other switches isn't influencing the results. But based on the commit where I see a small performance drop, I don't know that there's anything more to pursue for this issue, and it probably more makes more sense for me to go focus on getting hardware-acceleration in arch/vbox actually working. |
Looks like #40 is not related to my issue. Tested with and without the xrender-sync/fence options but didn't observe any change in performance. |
@jrudess When you say "CPU usage", do you mean the cpu usage of compton, or X? |
CPU usage of compton, and also a slight lag on text appearing when typing in terminals. |
I wonder if doing some profiling will help... Are you familiar with |
I'm not familiar with perf, but I will read up on it and see if there is anything I can discover and let you know. |
@yshui my apologies for the long delay. I've begun looking into this now that the holiday work-rush is ramping down |
This is no longer an issue using Virtualbox 6.1 with graphics set to VMSVGA and hardware acceleration enabled and the latest releases of picom. |
I use arch in a virtualbox VM on my work laptop. With the chjj official repo, I can not get 3D acceleration working, and leave compton disabled at any resolution past 1920x1200 due to very low performance. But starting with compton-2.0-1-x86_64.pkg.tar.xz acceleration started working, and my CPU usage dropped way down to 8% at 2560x1600 and no visual keyboard lag.
But with compton 3.0-1-x86_64.pkg.tar.xz and newer, the CPU usage increased and there is noticeable keyboard lag when typing (and ~16-25% CPU usage reported by top, so a bit more than double),.
I can reproduce this also with head of your branch, but I have not yet started git-bisecting this to try and narrow it down, but will as time allows.
Platform
Arch Linux as a Virtual Box guest
GPU, drivers, and screen setup
Virtualbox running at 250x1600, mesa 18.2.4, and glxinfo -B:
Environment
Plasma + i3-gaps
Compton configuration:
The text was updated successfully, but these errors were encountered: