Screenshot leads to lipstick high CPU and battery drain

REPRODUCIBILITY: 20% (occurs weekly) / 100% (screenshot method)
BUILD ID = OS VERSION: 4.1.0.24
HARDWARE: XA2 Ultra, X10 II
UI LANGUAGE: Finnish
REGRESSION: Yes, kinda

DESCRIPTION:

I have been experiencing sudden and unexplained battery drainage overnight with my XA2 Ultra, and now with Xperia 10 II, too. When I have looked at htop it has every time been lipstick process (with a long list of parameters) that is stuck. This can drain some 50%+ of the battery on my XA2 and just last night ~25% of the battery on my Xperia 10 II.

I am quite sure this happened with 4.0.1, too, but I’m not confident enough to tag it.

PRECONDITIONS:

Unknown.

STEPS TO REPRODUCE:

Keep using the phone for a day or two
Edit: Take a screenshot.

EXPECTED RESULT:

Lipstick process acts normal.

ACTUAL RESULT:

Lipstick process gets stuck and consumes ~16.8% CPU the whole time, preventing sleep mode, leading to battery drainage.

ADDITIONAL INFORMATION:

Rebooting home screen doesn’t work, as lipstick is too stuck. Power cycle fixed the issue, until it appears again.

2 Likes

I just triggered this by taking a screenshot!

I had WhatsApp open, I opened toeterm and htop to monitor the situation, and took a screenshot of the screen for test. Immediately lipstick started to consume CPU, and minutes later, it’s still up. The full command is:

/usr/bin/lipstick -plugin evdevtouch -plugin evdevkeyboard:keymap=/usr/share/qt5/keymaps/droid.qmap --systemd

For diagnostics’ sake, I turned off autostart of Android app support, and removed the two culprits I am suspecting: Whisperfish and Battery Buddy. I restarted the phone, started fingerterm this time, and boom - Lipstick consumes roughly one CPU core again.

I tried to restart homescreen using Jolla Utilities, but that resulted in a frozen image. I could long-press power button, and tap the general area where the power button should be, and I was able to power off the device gracegully. Now very interesting…

I’m going to test this with my XA2 Ultra later today.

2 Likes

When I restart the home screen, the X10II just glitches itself out the door. XA2U works fine. Edit: XA2U home screen restart works after triggering the bug, and it also fixes the bug - only to be re-triggered by taking another screenshot…

Both X10II and XA2U can be triggered to battery draining lipstick by taking a screenshot.

The following do not suffer from this screenshot behavior:

  • Jolla Phone (2.2.0)
  • Jolla Phone (3.4.0)
  • Xperia X (4.1.0.23)
  • Xperia X (4.1.0.24)

My plain XA2 is running another OS at the moment, so I can’t test that one.

There was a problem in restarting lipstick on X10II. This has been fixed to the upcoming OS release 4.2.0. With that, by taking a screenshot, I cannot trigger the lipstick process higher than to about 10% (of CPU) and for few seconds only.

2 Likes

Great, thank you! Let’s wait for 4.2.0 then!

Should it fix XA2, too?

It looks like the issue occurs by just using the phone… I have had to reboot my phone five times already and have to do it once more… Nothing fancy going on; Firefox, Storeman (browsing and reading comments), WhatsApp, Deezer, SMS phone calls… I really hope this has been fixed properly, as the battery drainage is substantial.

Hi direc85, can you try Project: sailfishos-notification-preview-high-cpu-usage-patch and let us know if it works for you too?

I’m still at 4.1, because of Whisperfish, so I tried the patch (by commenting the line), rebooted, took a screenshot, and it worked. No more CPU suckage! Just before that, I took a screenshot and it resulted in high CPU usage… So yeah, it seems to fix the issue…!

This bug still exists in 4.2, but at least I can reboot lipstick now :slight_smile:

The patch above still fixes the issue.

This should still be investigated by someone from Jolla IMO

The high CPU item still exists on 4.2.0.21 final, and the patch is needed to avoid it.

I unmarked the solution as to make it clear that the root bug still exists.

1 Like

Is the patch @vlagged linked already in upstream? I have a Xperia II 10 with SailfishOS 4.2.0.21, and I’m suffering from the same bug as @direc85 is.

Looks like Patchmanager doesn’t work with AArch64 yet. How can I apply the patch until it gets mainlined or Patchmanager gets updated?

There’s a prerelease version of patchmanager 3.1 in chum:testing[1] - you can try that before it hits Openrepos

[1] Show sailfishos:chum:testing / patchmanager - SailfishOS Open Build Service

1 Like

Thanks! Though I already managed to apply it manually.

I’m not familiar with OBS on SailfishOS. I guess I’ll have to look into it later.

Maybe related? Screenshot with vol+/- and from CLI causes reboot - #3 by poetaster

This still affects at least XA2 Ultra with SFOS 4.4 EA

Thanks for reporting this, and for checking it on the latest release.

I’ve created an internal bug report about it and tagged it as “tracked”.

2 Likes

Thanks for creating a ticket for this!

I do have to add that for handful of times, the latest being just today, I have ran into similar issue on my X10II (lipstick using a lot of cpu) without a screenshot being involved. It was fixed by restarting home screen. So, it could be common with certain notifications, or unrelated… I’ll try to reproduce this with the screenshot in a few days time.

Thanks for that. Any further info that we can use to refine the bug report would be helpful.

The contents of the patch, just for reference for those who do not use patchmanager:

--- /usr/share/lipstick-jolla-home-qt5/notifications/NotificationActionRow.qml
+++ /usr/share/lipstick-jolla-home-qt5/notifications/NotificationActionRow.qml

@@ -63,7 +63,6 @@ Grid {
     }
 
     opacity: _active ? 1.0 : 0.0
-    Behavior on opacity { FadeAnimator {}}
     enabled: _active
 
     Repeater {
3 Likes