desktop icon indicating copy to clipboard operation
desktop copied to clipboard

The media animation causes high CPU usage

Open busybox11 opened this issue 8 months ago • 16 comments

Captchas

  • [x] I have read the instructions.
  • [x] I have searched existing issues and avoided creating duplicates.
  • [x] I am not filing an enhancement request.
  • [x] I have checked that this issue cannot be reproduced on Mozilla Firefox.
  • [x] I have checked that this issue can be reproduced once I removed all my Mods and Custom CSS.

What happened?

The new media player sidebar music notes animation causes high CPU usage.

This is with the sidebar and the animation:

Image

This is by hovering on it, showing the full-size controls hiding the animation:

Image

This is with manually hiding the item using the browser shell devtools (unchecking contents on the styling tab):

Image

Version

1.10.2b

What platform are you seeing the problem on?

Linux (Tarball)

What component is this issue related to?

Media Controler

Relevant log output if applicable


busybox11 avatar Mar 30 '25 11:03 busybox11

I don't know why the RAM usage issues all get closed and marked as duplicate of this issue. The issue seems not to be the same to me. RAM issue

rabume avatar Apr 08 '25 09:04 rabume

Oh, I did not see this mention.

Indeed it does not seem like a duplicate. This doesn't have anything to do with RAM. My usage here doesn't match your issue either.

busybox11 avatar Apr 08 '25 14:04 busybox11

It happens to me also. When I play something, I get like ~70% CPU and ~20% GPU usage. But when I go on the page of played music, these stats drop to normal levels (as the miniplayer is hidden on the page of played music). For me its still happening on version 1.11.2b (MacOS 15.4).

Is there a way to disable this miniplayer? When I open the music video in picture-in-picture mode (which disables the miniplayer on other pages), it is still more efficient (watching the actual video) than just showing the miniplayer.

charamza avatar Apr 13 '25 11:04 charamza

I ended up using custom CSS to hide the animation, as the miniplayer is actually really helpful and was a feature I was missing so much I started building it on my own just before it released officially.

Here's the relevant part of the code:

#zen-media-controls-toolbar {
  & #zen-media-focus-button::after {
    display: none !important;
  }
]

busybox11 avatar Apr 13 '25 14:04 busybox11

Wow, CPU usage dropped by 60% and GPU by 20% to zero. Its like nothing would play, yet the miniplayer is still there. Thank you very much!

charamza avatar Apr 13 '25 17:04 charamza

You're welcome! Happy to help :)

busybox11 avatar Apr 13 '25 19:04 busybox11

I wonder, do you have reduced motion enabled? We could disable the keys if you do have it enabled

mr-cheffy avatar Apr 14 '25 09:04 mr-cheffy

No, reduced motion is not enabled. Nothing special. Sidebar is the default on the left, shown all the time.

charamza avatar Apr 14 '25 11:04 charamza

I also do not. Can reproduce on all my machines, fresh install, new profile etc.. (Linux though, couldn't test on other platforms. Maybe HW Accel is faulty, although it is working fine when playing YT videos)

busybox11 avatar Apr 14 '25 12:04 busybox11

Thanks for the userChrome.css snippet @busybox11. Besides finding the animation distracting, I also saw the CPU usage increase from around 12% to >80% on MacOS.

rustermi avatar Apr 29 '25 08:04 rustermi

@mauro-balades This issue is still active on the latest version, it doesn't seem to be a duplicate of the referenced issue above.

busybox11 avatar Apr 29 '25 11:04 busybox11

I know

mr-cheffy avatar Apr 29 '25 12:04 mr-cheffy

Ah sorry, the mobile app didn't show you unmarked the duplicate. My bad.

busybox11 avatar Apr 29 '25 13:04 busybox11

I ended up using custom CSS to hide the animation, as the miniplayer is actually really helpful and was a feature I was missing so much I started building it on my own just before it released officially.

Here's the relevant part of the code:

#zen-media-controls-toolbar { & #zen-media-focus-button::after { display: none !important; } ]

Even this does not resolve the issue for me (it is loaded correctly as the animation wasn't showing anymore). The only thing that worked was to set zen.mediacontrols.enabled to false, disabling the player entirely.

notherealmarco avatar May 11 '25 14:05 notherealmarco

Even this does not resolve the issue for me (it is loaded correctly as the animation wasn't showing anymore). The only thing that worked was to set zen.mediacontrols.enabled to false, disabling the player entirely.

Are you certain the high CPU usage comes from media controls?

One way to be sure it still isn't loaded in the DOM would be to open the browser's debugging tools (CTRL + ALT + SHIFT + I) and try to find the selected CSS element. Maybe there is another one loaded.

busybox11 avatar May 11 '25 18:05 busybox11

Windows Zen's memory usage is significantly higher than both Microsoft Edge and Firefox. Do you have any power-saving mode similar to Microsoft Edge's efficiency mode?

nasongCool avatar May 23 '25 03:05 nasongCool

Hi, @busybox11. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • High CPU usage due to the media player sidebar's music notes animation in version 1.10.2b on Linux.
  • Issue persists even after removing mods and custom CSS.
  • @charamza and others confirmed similar issues; a custom CSS solution by you helped reduce CPU/GPU usage.
  • @notherealmarco found disabling media controls entirely was the only effective solution.
  • Clarified that the issue is not related to RAM usage.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the desktop repository. If so, you can keep the discussion open by commenting here.
  • If there is no further activity, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Jun 23 '25 16:06 dosubot[bot]

Not stale. Still an issue.

busybox11 avatar Jun 23 '25 17:06 busybox11

Hi, @busybox11. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • High CPU usage due to media player sidebar's music notes animation in version 1.10.2b on Linux.
  • Issue persists despite removing mods and custom CSS; not present on Mozilla Firefox.
  • Related to the Media Controller component; confirmed by users charamza and rustermi.
  • You provided a custom CSS solution to reduce CPU/GPU usage; notherealmarco found disabling media controls effective.
  • Issue remains unresolved and is not related to RAM usage.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the desktop repository by commenting here.
  • If no updates are provided, the issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

dosubot[bot] avatar Jul 24 '25 16:07 dosubot[bot]

Yes, still an issue.

For the record:

Image Image

Still haven't figured out why that happens. Will try to take some time for it.

busybox11 avatar Jul 24 '25 16:07 busybox11

Small progress update after simple Zen profiling:

Image

The drop, followed by high usage then another drop to 0 happened roughly a second after I hovered over the visualizer to expand it and make the icon animation go away.

Taking a look at the Renderer profile results mostly shows EGL nvidia specific function invocations. Nothing seems out of the ordinary, although I would have expected to see more recognizable media-related stuff in the profile.

Image

busybox11 avatar Jul 24 '25 21:07 busybox11

I've been experiencing high cpu usage as well when using media player controls. I've tried provided custom css solution to disable the animation and it seemed to fix the issue for me. But at some point I noticed the issue is back and even with animation disabled I'm again getting high cpu usage. Turns out, at one point I've enabled the noise texture on the sidebar in the theme settings. This causes high cpu usage with media player controls even when the animation is disabled. Turning the noise texture to 0 & using custom css to disable media player animation fixed the problem for me. I'm on apple silicon based macbook and macos 15.6.1.

undcn avatar Sep 03 '25 18:09 undcn

That's weird, I always had the noise texture enabled but it did not seem to have any noticeable impact on performance as far as I could tell.

Unfortunately I'm currently on the other side of the country for work, I can't dig deeper in proper conditions yet.

I'll try to remember to quickly run a simple test on my work machine tomorrow though:

  • Empty profile with two spaces (one with noise background, one without)
  • One essential tab playing audio in the background, another blank one focused
  • Switch between those spaces to observe CPU usage.

@undcn Maybe you could also test something similar to measure how big of an impact the texture has on your end?


As a sidenote, I noticed just before leaving that it was much less impactful on my new computer using a single GPU (R5 3600X w/ 1660 SUPER) and nowhere near as problematic than on my work laptops (Inspiron w/ i7-1375U on iGPU, Zephyrus w/ R9 5900HS, same on iGPU or RTX 3070).

All the machines I have tested this on have working HW Accel, VAAPI, VDPAU, and all browsers (including Zen) report this as well.

Looked like Windows usually handled this a little better overall (less CPU usage caused by this animation) but the issue is still present on all cases, at least on my end.

Will try to dig even deeper when I'll come back home with less work to do.

busybox11 avatar Sep 04 '25 00:09 busybox11

I indeed did not observe any difference in CPU usage with and without noise background. Maybe my work machine is just being faulty but that seems strange.

busybox11 avatar Sep 04 '25 09:09 busybox11

This shoudnt be happening anymore

mr-cheffy avatar Sep 04 '25 09:09 mr-cheffy

Checked on both my Dell and Zephyrus laptops, both on the latest Zen version they all have high CPU usage when the little animation is shown, that gets fixed with my little CSS snippet, and also have high CPU usage when the mini player indicator horizontally scrolls the title.

Couldn't reproduce the grain performance issue though.

busybox11 avatar Sep 04 '25 23:09 busybox11

@busybox11 make sure you are not using any mods, css, etc

mr-cheffy avatar Sep 05 '25 09:09 mr-cheffy

This was tested on a new empty profile, no mods no CSS nothing. Reproductible on all my laptops, will check my desktop when I come back home soon

EDIT Sep 8: Came back home and tested on my other laptop and desktop, still reproductible on the latest git build. Also on empty profiles, no mods no CSS. Also tested on a brand new NixOS install on a different machine.

busybox11 avatar Sep 05 '25 12:09 busybox11

This is a problem for me as well, fresh install, mac OS.

jpochyla avatar Sep 08 '25 12:09 jpochyla

The issue is present in version 1.15.5b. When the notes animation is active, CPU usage is 25–30%. The moment I switch to the tab where the music is playing or hover over the media widget, it drops to 6–8%.

When text in media widget is scrolling CPU usage rise back to 25–30%.

OS Arch linux, CPU i5-7500T

vulpes-vulpeos avatar Sep 13 '25 06:09 vulpes-vulpeos