Ask / Submit

[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
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 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


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

1 Answer

Sort by » oldest newest most voted

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

Odorobo gravatar image

I had kinda similar thing. Consider reading my question:

edit flag offensive delete publish link more



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
Login/Signup to Answer

Question tools



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

Seen: 2,211 times

Last updated: Oct 17 '17