High power consumption of Firefox and Compiz when locking the screen on Ubuntu

NEW
Unassigned

Status

()

Core
Graphics
P3
normal
2 years ago
a year ago

People

(Reporter: marco, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox49 affected)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
If I lock the screen on Ubuntu and Firefox is open, Compiz and Firefox use ~100% of one of the CPUs.

If I close Firefox before locking the screen, CPU usage is ~0%.
(Reporter)

Comment 2

2 years ago
The profile in comment 1 is a profile while the screen is locked, this one is when the screen is unlocked: https://cleopatra.io/#report=86ab87489eeb7d050943bb5835cb0e362d00550b.
How much of the cpu use is in each of Firefox and Compiz?

Can you get per-thread CPU usage to verify my interpretation of the cleopatra data below?

(In reply to Marco Castelluccio [:marco] from comment #1)
> https://cleopatra.io/#report=a81b6d67e83059457e7809a21571f91f86b2df98

The graphs at the top indicate that the content "thread" is most busy, I guess.

The main thread is in poll() 95.5% of the time, and so the thread would be only
4.5% busy.

The content thread is about 13% busy, spending most of the time that is not
poll() painting in nsRefreshDriver::Tick().

The compositor thread is about 2.5% busy.

(In reply to Marco Castelluccio [:marco] from comment #2)
> this one is when the screen is unlocked:
> https://cleopatra.io/#report=86ab87489eeb7d050943bb5835cb0e362d00550b.

CPU usages look lower in general, but I don't see any striking differences.
Component: Widget: Gtk → Graphics

Updated

2 years ago
Whiteboard: [gfx-noted]
(Reporter)

Comment 4

2 years ago
Created attachment 8758293 [details]
usage.png

(In reply to Karl Tomlinson (ni?:karlt) from comment #3)
> How much of the cpu use is in each of Firefox and Compiz?
> 
> Can you get per-thread CPU usage to verify my interpretation of the
> cleopatra data below?

I'd need some help to get this information. Is there a easy way to get average
usage between two chosen points in time (so I can start before locking the screen and end after unlocking)?

I've attached a screenshot of the CPU usage graph (first part screen unlocked, second part screen locked, last part screen unlocked again).
(In reply to Marco Castelluccio [:marco] from comment #4)
> Is there a easy way to get average
> usage between two chosen points in time (so I can start before locking the
> screen and end after unlocking)?

While not exactly that, "sleep 5 && top -b -n 1 -H" is probably good enough.
(Reporter)

Comment 6

2 years ago
Unfortunately it didn't give me interesting results.

I've tried to run powertop, looks like when the screen is locked CPU usage is higher (34% vs 10%), there are more GPU operations (16 ops/s vs 12 ops/s) and more GFX wakeups (17 wakeups/s vs 8 wakeups/s).

In particular, in the profile while the screen is locked, `intel_mmio_flip_work_func` is the top power consumer (29.4%), the second is Firefox (1.3%).
Summary: High CPU usage of Firefox and Compiz when locking the screen on Ubuntu → High power consumption of Firefox and Compiz when locking the screen on Ubuntu
You need to log in before you can comment on or make changes to this bug.