Scrolling Heavy Javascript Pages: Why Are Fans Busier on Linux?

Scrolling through web pages that make heavy use of Javascript, e.g., Twitter, on Linux consistently spins up my CPU air cooler fans more than Windows on the same hardware using the same browsers. Enough to be annoying.

I’ve noticed little difference between browsers or distributions. Fan curves are set in UEFI.

Are Linux Javascript implementations less efficient, putting more demand on the CPU?

Are there tweaks to mitigate this?

No, they are the same. Javascript is a JIT compiled language. So how it is treated by your system depends on how that specific browser vendor has implemented/optimised JS for your OS.

IIRC Google uses Clang and Mozilla uses Rust; each is cross-platform.

Look into the frequency-scaling governors. It’s likely your distro is opting for a more performance-oriented governor.

A quick google-fu found this:

Playing with CPU frequency didn’t produce any noticeable change. On Performance, Conservative, or OnDemand, scrolling or loading a page – like scrolling a few lines in this page – spins up the CPU fans from inauduble to annoying.

And, I don’t want to be bothered needing to play with cpufreq all the time.

I’ve actually noticed this for a l-o-n-g time, on multiple Linux distributions. Older versions of Firefox would even, sometimes, lock up if I scrolled rapidly through a large page.

Using the same browsers, on the same hardware, on the same pages, in Windows and the audible impact on the fans is much less.

This is Ryzen hardware and I’m not sure I trust what lm-sensors is telling me (says the CPU fans are at 0 RPM when they clearly spinning & that the GPU fans are spinning when they visibly are not) but accurate numbers count less here than “by ear”.