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

TopHat causes composition stuttering when updating (Wayland) #105

Open
asumagic opened this issue Sep 1, 2023 · 2 comments
Open

TopHat causes composition stuttering when updating (Wayland) #105

asumagic opened this issue Sep 1, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@asumagic
Copy link

asumagic commented Sep 1, 2023

I installed TopHat recently and noticed that I lose compositor frames whenever TopHat updates, even when at a 60Hz refresh rate. This does not reproduce when I disable the entire extension.
That stuttering however reproduces even if I disable every display option in the settings (i.e. no monitor is actually shown), so I cannot pinpoint it to anything in particular.

I'm using the latest TopHat version on GNOME 44.4 on Wayland, under Arch Linux. Some other miscellaneous details, as those involve things TopHat might be trying to monitor: my CPU is a 3900X (24 threads) and I have 6 ZFS datasets mounted.

I profiled the system using Sysprof while keeping glxgears on to make sure that there was something to composite, and filtered to a moment when stuttering occurs:

sysprof zoomed into when the stutter occurs

My guess is that the extension is doing too much work synchronously (though I don't know if it can do otherwise), which given GNOME's... curious composition and extension model causes the entire compositor to stutter.

@fflewddur
Copy link
Owner

Thanks for reporting this! Does the stuttering still occur if you disable animations in TopHat's preferences? I'm not too happy with the current state of the animation code anyway, and suspect that might be the issue here.

@fflewddur fflewddur added the bug Something isn't working label Sep 3, 2023
@asumagic
Copy link
Author

asumagic commented Sep 3, 2023

It doesn't seem to be caused by animations, I still encounter the same stutters with these settings:

image

Also, __open/__read/__close being high up in the trace is probably because of poking at sysfs. Looking at the strace of the gnome-shell process seems to corroborate this as I can see TopHat walks through all of /proc (even when the CPU widget is disabled).

I'm curious if this reproduces on other machines. If so then maybe refreshing the process list only when opening the CPU view would save a bit of CPU and power at the cost of delaying the process view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants