Picom: Very bad performance and lag in VirtualBox

Created on 5 Nov 2018  路  43Comments  路  Source: yshui/picom

Platform

archlinux in virtualbox

GPU, drivers, and screen setup

vboxvideo

Environment

openbox and mate

Compton version

v3 with additional commits
https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/compton&id=611a4d7d3012745b7243df25e1036f0e50ec7f78
and latest git

Compton configuration:

# running with empty config file

Steps of reproduction

Login to a desktop environment and start compton &

Expected behavior

no lag, no performance issues

Current Behavior

the whole desktop gets almost unusable with a really bad lag.

Other details

I麓m using archlinux and the problem started with version 3.0-2 which cherrypicked a commit from github. The latest git version still has the issue. Downgrading the package to 3.0-1 solves it.

According to the changes made it must be related to changes before that point.

driver

Most helpful comment

If you're running on Archlinux, install compton-git from AUR but edit the PKGBUILD to replace the source by this one:

source=(git+"https://github.com/yshui/compton.git#commit=5694e75")

All 43 comments

Are you sure you tested both 3.0-2 and 3.0-1 with the exactly same config? If you used an empty config, nothing should really change for you between 3.0-2 and 3.0-1.

Thanks for the fast answer. Yes, I just rechecked that 3.0-1 is working fine and 3.0-2 is not. Both with empty config file.

@tiiiecherle OK, can you do a bisect between c0d7f9d915cb621 (bad) and 16f202f4a0fa6a4a1af6a0b1c519cf3758027c63 (good) then?

@tiiiecherle BTW, do you have a video of what the lag looks like?

@tiiiecherle OK, can you do a bisect between c0d7f9d (bad) and 16f202f (good) then?

sorry, I don`t know how to do that.

@tiiiecherle BTW, do you have a video of what the lag looks like?

No, I don`t. But for example when you click on the openbox background you can not use the opening menu as it is not possible to select it fast enough. moving around windows or opening apps is very slow.

OK, then. Can you try 5694e759328e519ee4d48dfca8cd5f805c4ac671 and see if that works?

OK, then. Can you try 5694e75 and see if that works?

what do you mean by try that? I tried the latest git version with all commits until yesterday by testiung the git package in the aur and the issue was still there.

@tiiiecherle can you try checking out compton from this repository at that commit, build it and run it?

It would be very nice if you could give me the exact steps / commands how to do that.
Then I will try it out and report back tomorrow. Thanks

If you're running on Archlinux, install compton-git from AUR but edit the PKGBUILD to replace the source by this one:

source=(git+"https://github.com/yshui/compton.git#commit=5694e75")

Thanks a lot. I had to do

pacman -S asciidoc
yay -S --editmenu compton-git

and then changed the source line.

pacman -Qs compton
is showing me
local/compton-git 2:581_3.rc2.14.g5694e75_2018.10.28-1
afterwards. With this change everything is running fine without the issue.

I performed another full system update including all repo and aur packages this morning and the strange thing is that even 3.0-2 seems to work fine now. So I don`t know if changing back to commit 5694e75 helped in any way.

It seems like there was in interaction with another issue and this one can be closed.

Thanks for all the fast help. I will have an eye on it the next days / weeks and open another issue if the issue comes back.

@tiiiecherle Hmm, I wonder if the problem is really gone.

Thanks for testing though. I will close this for now. If the problem comes back you can leave a comment here and I will reopen this issue.

Hey, sorry to get back to this. But this got even more strange. Yesterday I wrote it worked after the system package updates. I went home and the issue was back using the same software.

Then I started thinking about what else changed. I use a Macbook Pro 15 inch with the virtualbox setup. At home I use it standalone and at work with an external monitor (27 inch usbc). Today I went back to the office and the issue is gone again. So the issue occurs when using the macbook standalone and is gone when using the external monitor.

The issue is not occuring on the standalone macbook when killing compton or using the older version 3.0-1.
I don`t know, but I think the issue should be reopened.

After the discoveries from the office I went back home and tried on the standalone macbook (where the issue occurs) to go back to this commit:

source=(git+"https://github.com/yshui/compton.git#commit=5694e75")

and I can confirm that installing with this source that the issue is NOT solved. Hope this helps.

Would you mind also trying source=(git+"https://github.com/yshui/compton.git#commit=56f7dd36") ?

I'm also seeing vbox perf issues in #41 and that commit is the last one with the higher performance for my setup.

Sure, I tried, but it gives me an error during building...

==> Beginne build()...
Error during basic setup:

Neither directory contains a build file meson.build.
==> FEHLER: Ein Fehler geschah in build().
    Breche ab...
Error making: compton-git

Ah I forgot. You'll need to checkout an older version of the PKGBUILD:

git checkout c69151e34f044e7f024ef3abb937cc35c83c303d

And then comment out a license install line:

  # install license
  #install -D -m644 "LICENSES/MIT" "$pkgdir/usr/share/licenses/$_gitname/LICENSE-MIT"

Thanks for the heads-up. I did this and indeed with this build everything is working fine. Hope this helps.

OK, I reverted 50e22594043, the head of next should working fine again.

Thank you. But I麓m sorry to tell you that neither compton-git-next nor compton-3.0-3 are solving the issue. It still persists with both of them.

@tiiiecherle Did you pass --xrender-sync-fence to compton?

Just tried, the issue still persists with or without using the option.

As I have to give my macbook into repairs for a not-working usb-c port on monday I took some time to filter out the commit causing my issue. I don`t know if it was the right way to do it but I took the old PKGBUILD as decribed in this comment and tried all of these sources. I made a comment behind it if working or not...

#source=(git+"https://github.com/yshui/compton.git#branch=next")                                            # not working
#source=(git+"https://github.com/yshui/compton.git#commit=50e2259404344a5a3932b8e3873e1c047f31056b")        # not working
#source=(git+"https://github.com/yshui/compton.git#commit=796b0e0448b7233ef18a0c04a7ebe368fdc418ba")        # not working
#source=(git+"https://github.com/yshui/compton.git#commit=be09a9a8357dcd581947f4330036dcb57f791847")        # not working
#source=(git+"https://github.com/yshui/compton.git#commit=d7b5104fd4d3e224ad56920fa5aca91762f9ff17")        # not working
#source=(git+"https://github.com/yshui/compton.git#commit=309a4cec79035c2d873ace7e763ea1c4a0bf6bfd")        # not working

#source=(git+"https://github.com/yshui/compton.git#commit=93dd2d92fd8bc0605119f3862f927b67ae75722e")        # working
#source=(git+"https://github.com/yshui/compton.git#commit=db700f9be1ee7c9e9e7febe337cdb207f9ef34a2")        # working
#source=(git+"https://github.com/yshui/compton.git#commit=df63cab39a1c2ff995ed55186193949b54e55682")        # working
#source=(git+"https://github.com/yshui/compton.git#commit=e13bc7fc51e394c6a0b681c1d0017a9f3326a81a")        # working
#source=(git+"https://github.com/yshui/compton.git#commit=551d48783658323f221b87813b4d84bc76d0e969")        # working

As it turned out that the last working commit is 551d48783658323f221b87813b4d84bc76d0e969 and with commit 309a4cec79035c2d873ace7e763ea1c4a0bf6bfd the issue starts. Hope this helps.

@tiiiecherle Thanks for your effort at diagnosing this problem. Based on your finding, I have some hypothesis about what might be the problem.

Can you test a4d351f and see if that fixes your problem?

Sure, thanks for looking into it. How do I test that? Or better how do I include the commit it in the latest PKGBUILD?

When just using
source=git+"https://github.com/yshui/compton.git#commit=a4d351f051a039112babe5883eff6ca3da97a6aa")
in the PKGBUILD then everything is working fine. But I don`t know if that includes all the latest commits...

@tiiiecherle If you can confirm that works, I will update the branch to include that commit.

Yes, using this in the PKGBUILD works without the issue.

source=git+"https://github.com/yshui/compton.git#commit=a4d351f051a039112babe5883eff6ca3da97a6aa")

Thanks for looking into it.

@tiiiecherle Merged into next now

Perfect, thanks for alle the help, just tried next and the issue is solved. Have a good day and a nice weekend ;)

Would be really nice to see an updated stable (community-repo) version in archlinux including the fix. Thanks in advance

Reopening this since it's reported again.

@tiiiecherle what has changed?

I am getting this issue as well where the performance is terrible in virtualbox. Going through this thread I tried 683cda0, and it works just fine so something added between then and now has caused virtualbox to croak. I'll go through the commits from 683cda0 until I reach one that doesn't work anymore like @tiiiecherle did before and report back to you what I find.

@dustinwilson that's great, thanks a lot.

Sorry about the wait. I could only test this on a computer I use at work. The first commit I found to cause a great deal of lag starting from 683cda0 is 94b1bc0. That means that the last commit to work (at least for me with Manjaro Xfce in Virtualbox) is 68873ef.

After I went up the tree from 683cda0 and found the first one to not work I tried each of the releases since then and none of them work either, so it looks like whatever was changed in 94b1bc0 is what has Virtualbox confused.

@dustinwilson if that's the case, can you run compton --diagnostics?

Version: v4-rc1-54-g94b1bc0

Extensions:

  • Name Pixmap: Yes
  • Shape: Yes
  • XRandR: Yes
  • Present: Present

Misc:

  • Use Overlay: Yes
  • Config file used: /home/dw/.config//compton/compton.conf

That is for 94b1bc0.

@dustinwilson perhaps you have a different config file at /home/dw/.config//compton.conf or /etc/xdg/compton.conf? because the config file at /home/dw/.config//compton/compton.conf will NOT be picked up before 94b1bc0

@dustinwilson thanks for looking into this,
@yshui I don't have another config file besides an empty one at /etc/xdg/compton.conf and the problem persits with the latest compton version. Thanks for looking into it in advance.

@tiiiecherle that means, before 94b1bc0, the config file at /etc/xdg/compton.conf will be used, that could explain the performance change

Just to avoid misunderstandings. Yesterday I tried the latest version of compton (7.3-1)

  • with an empty config file at /etc/xdg/compton.conf (no other config files)
  • with an empty config file at /home/$USER/.config/compton/compton.conf (no other config files)

In both setups the issue persists.

Downgrading back to 5.1-1 and empty config file at /etc/xdg/compton.conf (no other config files) works.

Sorry about the lack of response on this. I haven't had a chance to test this at work as I haven't been at the computer I can test on. @yshui is right in that the config file at /etc/xdg/compton.conf is used then. Since it has no blurring it runs just fine. I plan on going through the commit list again and finding one where it does work so we can pinpoint where the issue starts.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GOKOP picture GOKOP  路  3Comments

TheConfuZzledDude picture TheConfuZzledDude  路  6Comments

zezic picture zezic  路  12Comments

BurhanDanger picture BurhanDanger  路  7Comments

buitrung picture buitrung  路  12Comments