# High Power Consumption with Firefox

**URL:** <https://community.frame.work/t/high-power-consumption-with-firefox/53481>\
**Category:** Linux\
**Tags:** endeavouros\
**Created:** [June 23, 2024, 2:22pm UTC](https://community.frame.work/t/high-power-consumption-with-firefox/53481 "2024-06-23T14:22:56Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![sinatosk](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@sinatosk](https://community.frame.work/u/sinatosk)\
**Post date:** [September 2, 2024, 9:18am UTC](https://community.frame.work/t/high-power-consumption-with-firefox/53481/15 "2024-09-02T09:18:01Z")

</div>

For some weeks I’ve noticed higher than usualy battery drain during the day. I later noticed this was happening when using Firefox.

using “about:processes” on some websites

- [https://reddit.com](https://reddit.com)
- [https://forums.gentoo.org/viewforum-f-8.html](https://forums.gentoo.org/viewforum-f-8.html)
- there are more websites this is happening with

Reddit front page

 ![firefox_high_cpu_usage](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/f/f/ff93be48761b4989cf52deb3069eabb80c0aa123.png)

my cpu usage is quite high and looking at the output from the “amdgpu\_top” command I see alot of GPU work. Measuring ( using Firefox “about:processes” ) the tab(s), I see that more than 50% of the time it’s the “RefreshDriver tick” and when I expand that, there’s alot of paint and layout going on even though visually everything on my screen ( Firefox area ) is idle/nothing changing.

I’ve checked ( about:support ) to see if all the hardware accelerated flags are enabled and they are ( WebRender and not WebRender software for example )

I’m seeing the same results using Arch Linux ( Linux 6.10.6 ) and Gentoo ( Linux 6.10.7 ), both using KDE Plasma 6.1.4 Wayland with 7840HS and 780M

I’m beginning to think this is bug(s) in Firefox

> [@sonic2kk](#):
>
> EDIT: I can see that Firefox is listing WebRender as its compositor, however, I can see the following message in `about:support` a bit further down:
> 
> ![image](https://us1.discourse-cdn.com/flex001/uploads/framework3/original/3X/0/a/0a859a35437c7efb18d35cf9fbc56b45101c3f7d.png)
> 
> Perhaps hardware accelerated rendering is off!

Looking at [Firefox 129.0.2 source code (534mb~)](https://archive.mozilla.org/pub/firefox/releases/129.0.2/source/firefox-129.0.2.source.tar.xz) ( I didn’t find a git repo of Firefox source code ) and did some grepping and found in source file “widget/gtk/GfxInfo.cpp” between lines 984-990 inclusive

```auto
    ////////////////////////////////////
    // FEATURE_WEBRENDER_COMPOSITOR
    APPEND_TO_DRIVER_BLOCKLIST(
        OperatingSystem::Linux, DeviceFamily::All,
        nsIGfxInfo::FEATURE_WEBRENDER_COMPOSITOR,
        nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
        V(0, 0, 0, 0), "FEATURE_FAILURE_WEBRENDER_COMPOSITOR_DISABLED", "");

```

which basically means Firefox with GTK will not use **WEBRENDER\_COMPOSITOR** feature on Linux

and looking at source file “widget/GfxDriverInfo.h” between lines 17-35 inclusive

```auto
#define APPEND_TO_DRIVER_BLOCKLIST_EXT( \
    os, screen, battery, windowProtocol, driverVendor, devices, feature, \
    featureStatus, driverComparator, driverVersion, ruleId, suggestedVersion) \
  sDriverInfo->AppendElement(GfxDriverInfo( \
      os, screen, battery, \
      (nsAString&)GfxDriverInfo::GetWindowProtocol(windowProtocol), \
      (nsAString&)GfxDriverInfo::GetDeviceVendor(devices), \
      (nsAString&)GfxDriverInfo::GetDriverVendor(driverVendor), \
      (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(devices), feature, \
      featureStatus, driverComparator, driverVersion, ruleId, \
      suggestedVersion))

#define APPEND_TO_DRIVER_BLOCKLIST(os, devices, feature, featureStatus, \
                                   driverComparator, driverVersion, ruleId, \
                                   suggestedVersion) \
  APPEND_TO_DRIVER_BLOCKLIST_EXT( \
      os, ScreenSizeStatus::All, BatteryStatus::All, WindowProtocol::All, \
      DriverVendor::All, devices, feature, featureStatus, driverComparator, \
      driverVersion, ruleId, suggestedVersion)

```

Doesn’t matter what combination, if your on Linux with what Firefox consider GTK, Firefox ain’t using it… fun

> **OFFTOPIC** : I’ve also noticed high cpu usage with Firefox when it’s waiting for data to arrive or eventually website times out ( no rendering is being done )

---

_[View the full topic](https://community.frame.work/t/high-power-consumption-with-firefox/53481)._
