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

Implement damage tracking #223

Merged
merged 17 commits into from
Jul 13, 2024
Merged

Implement damage tracking #223

merged 17 commits into from
Jul 13, 2024

Conversation

mahkoh
Copy link
Owner

@mahkoh mahkoh commented Jul 10, 2024

Close #28

@mahkoh mahkoh force-pushed the jorth/damage-tracking branch 8 times, most recently from 5a4803a to 5394555 Compare July 12, 2024 11:25
@mahkoh mahkoh force-pushed the jorth/damage-tracking branch from 5394555 to bb66abb Compare July 12, 2024 18:05
@mahkoh mahkoh merged commit 618fdfe into master Jul 13, 2024
5 checks passed
@cwegener
Copy link
Contributor

Nice work.
I gave it a quick test on my old i7-7500U with HD620 iGPU.
The resulting CPU usage of damage tracking is VERY high, especially when watching videos in Firefox.

@cwegener
Copy link
Contributor

The resulting CPU usage of damage tracking is VERY high, especially when watching videos in Firefox.

Further testing indicates that the high CPU usage might be isolated to Firefox (or other web browsers).
Using mpv for video playback does not exhibit the high CPU usage.

@mahkoh
Copy link
Owner Author

mahkoh commented Jul 14, 2024

Seems to be caused by d8d6be1 (#223) which might cause firefox to render at an uncapped frame rate. Maybe this is caused by firefox modifying surface state from multiple threads without synchronization although I don't see an immediate connection.

I've not noticed this in any of the applications that I run normally (chromium, mpv, alacritty, jetbrains IDEs).

@cwegener
Copy link
Contributor

Update:

It's ONLY Firefox. Chromium is not affected.

And it looks like it's just because Hardware Video offloading breaks in Firefox after this change (but doesn't break in Chromium).

Might be an Intel driver issue?

I'll try with AMD iGPU and see if it's the same problem

@mahkoh
Copy link
Owner Author

mahkoh commented Jul 14, 2024

https://gitlab.freedesktop.org/wayland/wayland/-/issues/481

@cwegener
Copy link
Contributor

Just confirming that this also happens on my AMD Ryzen 7 PRO 4750U with Radeon RX Vega 8 iGPU

@cwegener
Copy link
Contributor

And it looks like it's just because Hardware Video offloading breaks in Firefox after this change (but doesn't break in Chromium).

HARDWARE_VIDEO_DECODING still shows as 'available / force_enabled' in about:support with damage tracking, so it indeed looks to be the issue you identified.

@mahkoh
Copy link
Owner Author

mahkoh commented Jul 14, 2024

I'll prepare a PR that fixes the issue with a firefox-specific workaround that restores the previous behavior without precise damage tracking. Let me know if you find any other applications that have this problem.

@mahkoh
Copy link
Owner Author

mahkoh commented Jul 14, 2024

Please try #224

@cwegener
Copy link
Contributor

Please try #224

I did the same YouTube video playback tests.

This works well on my old Intel i7 test system. (daily driver when at home).

CPU utilization curves sometimes are even 1 or 2% points lower than with 579f93d

(Now I want to compare power efficiency 😉 )

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

Successfully merging this pull request may close these issues.

Feature: Damage tracking
2 participants