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

Excessive GPU usage on fullscreen player #783

Closed
pohuing opened this issue Oct 8, 2024 · 9 comments
Closed

Excessive GPU usage on fullscreen player #783

pohuing opened this issue Oct 8, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@pohuing
Copy link

pohuing commented Oct 8, 2024

Expected Behavior

Feishin shouldn't use 30-50% of a Rx 6900xt to animate a playing indicator with a dynamic background.
Similarly, playing music shouldn't cause my laptop to take off.

Current Behavior

This happens in Firefox and Edge(so probably all Chromium based browsers) on AMD and Intel iGPUs.

Playing music with dynamic background enabled and with the "Up Next" tab visible causes excessive GPU usage.
This only happens if the Browser is the active window.
The GPU usage scales with window size and refresh rate.
My screenshots are on a 1440@240hz screen. On a system with a Rx6900xt as the GPU.

grafik

grafik

Steps to Reproduce

  1. Play any song
  2. Navigate to the fullscreen player
  3. Enable "Dynamic background"
  4. Observe GPU usage in Task Manager/gputop/whatever MacOS has

Possible Solution

I believe the issue is caused by the animation of the now playing indicator. An option for a non animated indicator would alleviate the issue.

In the same vein, feishin does not respect prefers-reduced-motion. So this could be a two in one fix with a toggle that defaults depending on the query.

Context

Ultimately my goal is just to have a colder laptop. This isn't a big deal since the browser playing feishin is usually not focused anyways.

Application version

10.1

Operating System and version

Windows 10-11

Server and Version

Jellyfin 10.9.11

Node Version (if developing locally)

No response

@pohuing pohuing added the bug Something isn't working label Oct 8, 2024
@jeffvli
Copy link
Owner

jeffvli commented Oct 8, 2024

Thanks for opening this issue.

You're right, after testing it myself I noticed any playing indicator causes the GPU usage to go up by a considerable amount. Apparently animating SVGs quite expensive for the GPU. I'll see about the changes to respect prefers-reduced-motion for the indicator as well as possibly converting the svg to a gif instead.

@jeffvli
Copy link
Owner

jeffvli commented Oct 10, 2024

I've opted to just remove the animated icon for now. I considered making it a gif, but I realized that it wouldn't be color customizable with the app theme due to its static nature.

@jeffvli jeffvli closed this as completed Oct 10, 2024
@ENDlezZenith
Copy link
Contributor

ENDlezZenith commented Oct 10, 2024

I've opted to just remove the animated icon for now. I considered making it a gif, but I realized that it wouldn't be color customizable with the app theme due to its static nature.

Just a thought, probably adding an option for switching on/off whether to use the animation (default value off), thus letting the user to consider the GPU performance trade off by themselves as a workaround or so?

@jeffvli
Copy link
Owner

jeffvli commented Oct 10, 2024

I've opted to just remove the animated icon for now. I considered making it a gif, but I realized that it wouldn't be color customizable with the app theme due to its static nature.

Just a thought, probably adding an option for switching on/off whether to use the animation (default value off), thus letting the user to consider the GPU performance trade off by themselves as a workaround or so?

Yeah, I'll probably just re-add it with a toggle and add a description about performance issues.

@ENDlezZenith
Copy link
Contributor

ENDlezZenith commented Oct 10, 2024

I've opted to just remove the animated icon for now. I considered making it a gif, but I realized that it wouldn't be color customizable with the app theme due to its static nature.

Just a thought, probably adding an option for switching on/off whether to use the animation (default value off), thus letting the user to consider the GPU performance trade off by themselves as a workaround or so?

30% on an RX 6900 XT, astonished by how SVG could cause such big performance problem. Actually, interesting that no one has noticed this performance deteriorate before. I wouldn't notice that even it is 100% GPU (100% if the SVG is in screen, 0% if scrolled to bottom so that it's not) for me until this issue has been posted. Could it be a wrong readout provided by Windows?

@ENDlezZenith
Copy link
Contributor

Could it be a wrong readout provided by Windows or something? Just a thought since there is no lagging performed and also operations are still really fluent and responsive.

@pohuing
Copy link
Author

pohuing commented Oct 10, 2024

I think the reason it wasn't noticed is because it's hard to notice. The issue only occurs if the window is in focus. So other interactive applications with high gpu usage(ie games) aren't at the forefront of a user's mind.
I only noticed it because my laptop was thermal throttling again during builds. So considering that's how I noticed I doubt it's a faulty readout. I'll check the reported power usage later to be sure

@pohuing
Copy link
Author

pohuing commented Oct 10, 2024

30% on an RX 6900 XT, astonished by how SVG could cause such big performance problem. Actually, interesting that no one has noticed this performance deteriorate before. I wouldn't notice that even it is 100% GPU (100% if the SVG is in screen, 0% if scrolled to bottom so that it's not) for me until this issue has been posted. Could it be a wrong readout provided by Windows?

It's in conjunction with blurring a background 240 times a second at 1440p remember. If you don't have dynamic background enabled the gpu load only goes to ~6%.

@ENDlezZenith
Copy link
Contributor

True, I agree. Made another little test. I've switched to use the iGPU and found that the page toggle to Fullscreen Player is really laggy in 0.10.1 comparing to a fluent transition in 0.11.0

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

3 participants