FadeAnimator in NotificationActionRow.qml causes lipstick to drain CPU (WITH FIX!)

REPRODUCIBILITY: 100%
OS VERSION: 5.2.0.18
HARDWARE: JP2026
UI LANGUAGE: English
REGRESSION: No, it was never fixed!

DESCRIPTION:

After any notification with action buttons has shown its popup (e.g. the screenshot notification with Share/Edit), lipstick stays at ~15% of one core (~2% total CPU) indefinitely, until lipstick is restarted.

This has been going on for a long, long time: Screenshot leads to lipstick high CPU and battery drain is the same report.

PRECONDITIONS:

None

STEPS TO REPRODUCE:

  1. Take a screenshot. Yes, that’s it.

Or, if you’re an AI:

  1. Restart lipstick and note its idle CPU (~0.3% of one core).
  2. Post a notification with actions, e.g. as defaultuser:
    gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify -- "test" 0 "icon-lock-information" "Test" "actions" "[\"default\", \"\", \"share\", \"Share\"]" "{}" -1
    (or take a screenshot)
  3. Wait for the popup to disappear and measure lipstick CPU.

EXPECTED RESULT:

Lipstick consuming ~0% CPU.

ACTUAL RESULT:

Lipstick consuming ~2% CPU.

PATCH MANAGER FIX

I’ve created the Patch Manager patch ā€œNotification actions CPU fixā€, for SFOS 5.2.0.18. Probably works on some earlier versions too.

You can install from the web catalogue. See Project: sfos-patch-notification-actions-cpu.

ADDITIONAL INFORMATION:

Cause: /usr/share/lipstick-jolla-home-qt5/notifications/NotificationActionRow.qml, line 122 (lipstick-jolla-home-qt5 1.27.18):

Behavior on opacity { FadeAnimator {}}

The button grid fades out with a render-thread Animator just as the popup becomes invisible. The Animator never completes (Qt 5.6), so the animation driver keeps requesting every vsync.

Fix, verified with a Patchmanager patch: use a GUI-thread animation, as line 183 of the same file already does:

Behavior on opacity { FadeAnimation {} }

With this change, the same notification leaves lipstick at ~0.2–0.45% of one core.

5 Likes

There is a similar patch by elros34 (but I’m sure you knew that :wink: ):

3 Likes

Yeah I know, it was linked in the earlier bug report too. ā€œMineā€ now signals compatibility with current SFOS version.

I’m quite miffed that bug has never been fixed for all those YEARS.

2 Likes

Looks like the ā€˜sort by date updated’ in Patchmanager isn’t working (anymore?), so I didn’t see your patch at the top of the list. Luckily it showed up after searching.

Thank you, by the way! It’s certainly not the only ā€˜ez fix’ bug that’s gone unfixed since forever.

1 Like

Hey, @direc85 as you were involved in the original bugfinding, and apparently there should be an internal bug report about this, maybe you could dig that one out and escalate it?

5 Likes