Open Bug 1719200 Opened 4 years ago Updated 1 month ago

Playing video with firefox requires 2-3 times more power than playing it with mpv

Categories

(Core :: Audio/Video: Playback, defect, P3)

Firefox 91
defect

Tracking

()

Tracking Status
firefox91 --- affected

People

(Reporter: nagisa, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: power)

Basic information

Steps to Reproduce:

  1. Download some video file to play. For example a video from one of my earlier bug reports.

  2. On linux, run sudo turbostat --Summary --interval 10 --show Avg_MHz,Busy%,Bzy_MHz,IRQ,PkgTmp,PkgWatt,GFXWatt, observe idle power;

    • On my machine they read as
      Avg_MHz	Busy%	Bzy_MHz	IRQ	PkgTmp	PkgWatt	GFXWatt
      5	0.51	1009	2867	40	0.33	0.00
      4	0.43	994	2769	38	0.29	0.00
      
  3. Play some video using mpv, in full screen, observe power readings:

    • On my machine:
      Avg_MHz	Busy%	Bzy_MHz	IRQ	PkgTmp	PkgWatt	GFXWatt
      57	4.80	1181	31795	40	2.44	0.76
      39	4.56	852	27624	41	2.45	0.91
      38	3.93	968	23202	40	2.18	0.75
      
  4. Play same video using firefox, in full screen, using a new profile and in offline mode, as such:

    firefox --ProfileManager --no-remote downloaded.mp4
    

    and observe power readings.

    • On my machine:
      Avg_MHz	Busy%	Bzy_MHz	IRQ	PkgTmp	PkgWatt	GFXWatt
      212	10.40	2039	94823	48	6.34	2.19
      144	13.28	1084	51856	48	6.77	3.64
      124	12.31	1006	48305	43	6.15	3.35
      

Expected Results:

Firefox should be able to be at least as power efficient when playing video as mpv is.

Actual Results:

As you can see from the reproduction steps above playing video with Firefox is about 3 times as power intensive (and some 8°C warmer) compared to just playing the video with mpv.


More information

Screenshot: N/A

Profile URL: Let me know what configuration I should use and I'll happily record one.

Basic systems configuration:

OS version: NixOS (at 75dc3bbdd4f51d5c647491f8c39ca653c0657523), sway, wayland.

GPU model: Whatever is in Intel(R) Core(TM) i5-10210U

Number of cores: 4 physical, 8 logical

Amount of memory (RAM): 16G

dthayer was able to reproduce this during our performance triage meeting. Hopefully our media folk have some idea why playing a video off of the local disk would result in higher GPU usage than when loading the video off of the network.

Component: Performance → Audio/Video: Playback

Huh, the way you describe this issue sounds like its only affecting playback from a local file, but if my memory serves me right, I'm pretty sure that I see this behaviour with video coming from the network as well. That's the context in which I noticed this issue in the first place.

Severity: -- → S3
Priority: -- → P3
Blocks: power-usage
Keywords: power
You need to log in before you can comment on or make changes to this bug.