We have moved to a new Sailfish OS Forum. Please start new discussions there.
56

[bug] lipstick constantly uses 16% of CPU

asked 2015-01-27 16:36:26 +0200

Self-Perfection gravatar image

updated 2017-10-17 15:32:45 +0200

I've noticed, that after several days of phone usage lipstick process starts to constantly use 16% of CPU time. Luckily this happens only when the screen is turned on.

$ ps -FC lipstick
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
nemo       974   913  1 59460 77196   0 Jan21 ?        01:56:51 /usr/bin/lipstick -plugin evdevtouch:/dev/input/event0:rotate=0 -plugin evdevkeyboard:keymap=/usr/share/qt5/keymaps/boston.qmap --systemd

Note consumed CPU time for just a week of usage. If I restart lipstick (attention, following command stops all gui apps):

systemctl --user restart lipstick

It's CPU usage returns to normal ~0% in idle (it might burst sometimes when switching apps or scrolling desktop, but in this case it seems normal).

But after a couple of days lipstick "hangs" again. Seems like a bug to me as it is likely drains battery considerably.

I've tried to investigate the case a bit with strace. A couple of threads of long-running lipstick are heavy busy with futex and reading/writing [eventfd] file descriptor.

Update 2015-02-05: I have a strong feeling that lipstick leaks memory over time as well. Here is memory usage for 2.5 days old lipstick process:

[root@Jolla nemo]# pmap -d `pgrep ^lipstick$` | tail -1
mapped: 266164K    writeable/private: 98152K    shared: 46544K

And here is memory usage for freshly started lipstick:

[root@Jolla nemo]# pmap -d `pgrep ^lipstick$` | tail -1
mapped: 206424K    writeable/private: 64396K    shared: 21952K

"writeable/private" is the most relevant number.

If someone has uptime of lipstick more than a week, please post here output of following command (needs root)

pmap -d `pgrep ^lipstick$` | tail -1; ps -FC lipstick

Update 2015-03-07: Looks like my conclusion about memory leak is not correct. Restarting lipstick indeed frees lots of swap space, but the reason is that upon restarting lipstick lots of other services restarts. And most of memory freeing is caused by restarting aliendalvik.

However, in 1.1.2.16 the problem seems to be even more severe. I've seen 24% constant CPU usage and even more.

Update 2015-03-19: It happened again, lipstick uses ~15% CPU user time and ~9% system time constantly when the screen is turned on (~24% total). Stopping all applications and aliendalvik does not help. Data requested by @chris.adams:

I have not noticed any difference in journalctl messages and mcetool output before and after restarting lipstick, though CPU usage returned to normal after lipstick restart.

Update 2015-03-26: Sometimes sensord process enters similar state: constantly using ~7% CPU when the screen is turned on and goes idle when the screen is turned off. Sometimes I see both lipstick and sensord on top of top output and sometimes just one of these process are occupied with their strange job. I am not sure though that these situations are related.

Update 2015-04-02: @giucam suggested, that it looks like lipstick is busy with rendering. Good guess! top in displaying threads mode shows, that most of the CPU time is consumed by QSGRenderThread thread. I've checked swithcing between the events view / the launcher / a fullscreened app. It does not affect CPU usage.

$ ps -o comm,time -LC lipstick
COMMAND             TIME
lipstick        00:21:57
hwcCommitThr    00:00:00
QThread         00:00:34
QQmlThread      00:00:06
dconf worker    00:00:00
gdbus           00:00:01
QQuickPixmapRea 00:00:00
GL updater      00:05:36
QSGRenderThread 00:26:07    <----little rascal!
QThread         00:00:00
cor::qt::Actor_ 00:00:36
QQuickXmlQueryE 00:00:00
Qt bearer threa 00:00:07
QThread         00:00:01
Qt HTTP thread  00:00:00
QProcessManager 00:00:00

Update 2017-10-17: I noticed new post about similar problem - High CPU usage by lipstick since 2.1.2. I might have the same issue on my Jolla C with 2.1.2, though I checked just once, longer observation required. The CPU consumption is not constant this time, but appears in ~5 seconds bursts. Also it seems that bursts appear when app tries to get GPS fix (satellite icon is blinking). Again QSGRenderThread seems to be the culprit:

$ ps -o comm,time -LC lipstick
COMMAND             TIME
lipstick        01:10:09
IdleInvalidator 00:00:02
hwcUeventThread 00:00:03
hwcVsyncThread  00:03:12
QEvdevTouchScre 00:01:01
QQmlThread      00:00:07
dconf worker    00:00:00
QDBusConnection 00:05:29
gmain           00:00:00
gdbus           00:00:01
qtaround::mt::A 00:02:16
Qt bearer threa 00:00:47
GL updater      00:01:10
QSGRenderThread 00:55:40
NemoThumbnailLo 00:00:00
QQuickPixmapRea 00:00:05
Qt HTTP thread  00:00:00
Qt HTTP thread  00:00:05
Qt HTTP thread  00:00:00
edit retag flag offensive close delete

Comments

For info: added the 'lipstick' tag

saturn ( 2015-01-28 00:08:22 +0200 )edit

I noticed this too, and it was again 16% CPU in my case also. With in hour my battery got down from 49% to 13%. I'm seeing drastic battery drain these days. Normally before recent update with tohd disabled I could get upto 2 days battery life. Now its not even a day.

copyninja ( 2015-02-05 11:26:22 +0200 )edit

Does this happen when there are no GUI apps running?

bulkin ( 2015-02-05 15:52:54 +0200 )edit

@bulkin yes no application was running!

copyninja ( 2015-02-05 16:58:13 +0200 )edit

Mine is running since 2.2. and it's using even more memory then yours:

mapped: 276080K    writeable/private: 104296K    shared: 47676K
Sailor ( 2015-02-05 19:59:07 +0200 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2015-01-28 01:41:10 +0200

Odorobo gravatar image

I had kinda similar thing. Consider reading my question:

https://together.jolla.com/question/73543/high-cpu-and-memory-load-with-no-apps-running/

edit flag offensive delete publish link more

Comments

2

Restarting android support does not return lipstick CPU usage to normal in my case.

Self-Perfection ( 2015-01-28 15:37:36 +0200 )edit

Have you tried testing over ssh, with screen off?

chris_bavaria ( 2017-10-17 18:45:53 +0200 )edit
0

answered 2019-12-19 20:32:41 +0200

PizzaProgram gravatar image

updated 2019-12-19 20:34:01 +0200

For me the highest consumption is caused by:

  lipstick          00:20:14
  HWC_Ueventthrea   00:21:30
  qtaround::mt::A   15:20:03

I'ts daining the battery withing a day fully. (5-7% CPU even with screen off)
(Xiaomi Redmi 5 (vince) - version 3.2.0.12)

edit flag offensive delete publish link more
0

answered 2020-01-21 21:36:43 +0200

AlexOm gravatar image

updated 2020-01-21 21:58:36 +0200

I had lipstick constantly uses no less than 100% of cpu time... Then I have turned off some Vk-account synchronyzation profiles followed by restarting UI and Voila it stopped heating & eating battery! + after additional clean up of almost all vk-related DB & cache & Images-cache files from user profile .local/... directory and recovery of base installed lipstick packages I have DISABLED image downloading for those Vk-account profiles and limited account-synchronization event synchro-time to only 24hours. So after that manipulations lipstick process now is more honest for cpu&battery-usage. - Have no idea what is precisely the reason of such cruel behaviour but I could suppose that could be due to some buggy Image-handling issue from account's profile either less probably thanks to news feed images.

edit flag offensive delete publish link more

Comments

...moreover strange is flight-mode cpu-loads caused by this process.

AlexOm ( 2020-02-08 19:32:13 +0200 )edit

Found a bit more reasons: high cpu-usage starts by opening a feed news link with a web-browser (checked for harbour browser). Nevertheless the browser is closed lipstick still continues some hard working since that time. So would imagine this behavior is tightly related to the lipstick's feed news link processing. Looks like it is quite different from the usual browser starting from the desktop app-icon.

If Only doesn't open that feed news link (after lipstick packages re-install/cleanup) but just read feed screen you may have the quite normal lipstick's cpu-usage and good battery saving as it looks for my case. (SFOS 3.2.1.20)

AlexOm ( 2020-03-11 07:30:36 +0200 )edit

The most strange lipstick's habit is periodic cpu usage even if device in flight mode. I think it is very strange to try check up feed news constantly or whatsoever if there are no any Mobile/Wi-Fi connections available isn't it??

AlexOm ( 2020-03-28 20:27:46 +0200 )edit
Login/Signup to Answer

Question tools

Follow
10 followers

Stats

Asked: 2015-01-27 16:36:26 +0200

Seen: 2,988 times

Last updated: Jan 21 '20