Bug 187696 - [GTK] Epiphany causes high, and perhaps excessive GPU load with amdgpu graphics
Summary: [GTK] Epiphany causes high, and perhaps excessive GPU load with amdgpu graphics
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-16 07:35 PDT by Kristoffer
Modified: 2018-07-19 03:17 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristoffer 2018-07-16 07:35:08 PDT
I have two Sapphire Nitro R9 Fury graphics cards with fans that normally turn off during low load, such as when browsing the web. However, with Epiphany, I noticed fans would start spinning every now and then, so I looked at GPU load, temps and power consumption on my primary card. Take a look at vddgfx, temp1 and power1 compared to when I'm using Firefox:

Firefox 61 (with OpenGL compositing forced on, it's off by default)

amdgpu-pci-0900
Adapter: PCI adapter
vddgfx:       +0.93 V
fan1:         774 RPM
temp1:        +67.0°C  (crit = +89.0°C, hyst = -273.1°C)
power1:       19.00 W  (cap = 260.00 W)

Epiphany 3.28.2

amdgpu-pci-0900
Adapter: PCI adapter
vddgfx:       +1.25 V
fan1:         751 RPM
temp1:        +76.0°C  (crit = +89.0°C, hyst = -273.1°C)
power1:       59.00 W  (cap = 260.00 W)

While offloading work to a GPU can be a good thing, this does seem excessive to me. I can imagine this would hurt battery life quite a bit if this was a mobile device.

In this specific test case I had one tab open with a YouTube-video playing, but pretty much any website shows similar result.

I am running a Wayland session on Debian Sid with GNOME 3.28.2

screenfetch -n
 kristoffer@kristoffer-debian-desktop
 OS: Debian unstable sid
 Kernel: x86_64 Linux 4.17.0-1-amd64
 Uptime: 3h 2m
 Packages: 1980
 Shell: bash 4.4.23
 Resolution: 2560x1440
 DE: GNOME 
 WM: GNOME Shell
 WM Theme: 
 GTK Theme: Adwaita [GTK2/3]
 Icon Theme: Adwaita
 Font: Cantarell 11
 CPU: AMD Ryzen 7 1700X Eight-Core @ 16x 3.4GHz [46.6°C]
 GPU: AMD Radeon (TM) R9 Fury Series (FIJI, DRM 3.25.0, 4.17.0-1-amd64, LLVM 6.0.1)
 RAM: 3246MiB / 32167MiB

Original bug report: https://gitlab.gnome.org/GNOME/epiphany/issues/74
Comment 1 Michael Catanzaro 2018-07-16 07:46:04 PDT
Carlos Garcia and I have both noticed excessive CPU usage under Wayland sessions, but we don't know what's causing it. You're the first to report an issue with GPU usage, though.

It doesn't help that amdgpu graphics are new and not quite popular yet. :(

(In reply to Kristoffer from comment #0)
> In this specific test case I had one tab open with a YouTube-video playing,
> but pretty much any website shows similar result.

It actually shouldn't... YouTube triggers GPU use because it requires either 3D transforms or animations. Other websites should not use the GPU at all. You can verify by playing with the environment variable WEBKIT_DISABLE_COMPOSITING_MODE=1 (should disable GPU use regardless of website) or WEBKIT_FORCE_COMPOSITING_MODE=1 (should force it regardless of website).
Comment 2 Kristoffer 2018-07-16 08:09:15 PDT
I may have inadvertently compared to other media heavy sites. This bugtracker and phoronix.com only shows 15-20W.

WEBKIT_DISABLE_COMPOSITING_MODE=1 did indeed drop GPU power to 20-ish Watts, even on YouTube.