It is not normal. By documentation, it provides D-Bus api “mplementing a shutdown/sleep inhibition logic for application”. It is possible that some application uses it. Try D-Bus monitor to find more…
But I am not sure what exactly these properties mean. My guess is that it is signaling if session is active and it is caused by short cpu sleeps…? Not sure without reading documentation / source code.
But I believe that this activity is not caused by another application, they are signals triggered by logind.
I have installed htop recently, since top is no longer as useful as it used to be.
It shows systemd-logind is always the process with the most CPU time (usually twice lipstick, six times sensors.qcom and even the Sailtrix matrix client). Compare this to the desktop, where it is one of the least CPU time using programs!
If you look at this using strace you’ll see that at least the file I/O, if that is to blame, starts as soon as the display is turned off. So no I don’t think it’s a timing/measuring issue.
Although I’m not sure if a timing case wouldn’t look just like that.
I would rather avoid dealing with upstream of this particular piece of software.
(Oh and should’t it be Jolla who file it? They are “my distro” in this scenario, and upstream bugs should be done through the “distro maintainer” usually.)
But if it’s unavoidable, any hints on how to gather proper logs from logind and udevd in order to be able to make a proper bug report there?
Also, more info here which explains what and how happens here.
So this explains why udev and logind use CPU in concerto, and in principle all of that is expected behavior (except that this is a single-seat system all of that is kinda pointlessly overcomplicated, (like almost anything what comes out of freedesktop.org)).
(Sorry if you’re bored by this if it seems common knowledge to you. Myself I find it new, if annyong-to-get, knowledge.)
My TL;DR for now is, all those file accesses are cause by the set-ACL-if-user-becomes-inactive feature, and are therefore normal.
Which brings me back to the original topic: if this is NOT what is causing the load, what is?
Looking at udev straces this time, I see a lot of execve and related syscalls. Now, spawning external processes, that’s something we want to avoid. What could cause it?
A little grepping leads quickly to /lib/udev/rules.d/999-android-system.rules which is an autogenerated config file and is full of things like this:
#:/sys/devices/system/cpu/cpu* cpufreq/scaling_min_freq 0664 system system
# sys rule
DEVPATH=="/devices/system/cpu/cpu*", TEST=="/sys/$devpath/cpufreq/scaling_min_freq", RUN+="/bin/chmod 0664 /sys/$devpath/cpufreq/scaling_min_freq", RUN+="/bin/chown system:system /sys/$devpath/cpufreq/scaling_min_freq"
so this spawns a chown and a chmod every time CPU device nodes change (which due to power saving is rather often).
And now you know why all my server systems are sans systemd Not to kick at that bucket, but one note on your comment before this one, this IS a multi-user system, though we want it to behave like a single seat, it isn’t.
Did you note the device node perms before and after sleep/wake? I don’t see a reason for the perms to change on wake/sleep.
Did you try commenting The rule out I haven’t looked at it, but would guess it’s superfluous. That’s what’d I’d try if I wasn’t so busy debugging QML
(EDIT: no, the following sentences are wrong. See the source code comments linked below.)
I have as a test replaced all the RUNs with corresponding OWNER, GROUP, MODE lines. Now many of those relate to cpuN paths, which appear and disappear as power saving turns the cores on and off.
So correcting/setting ownerships through udev is okay in this case I think.
Also, that RUN+="chown/chgrp" has been a best practice in past udev rule days, and that file is autogenerated by some droid-hal-* script from Android configuration.
I wonder if that script just uses Ye Olde Way because it has always done that, and the OWNER, GROUP, MODE would be better. If it is indeed equivalent.
Ok, I’m on a community device so it looks a bit different (21 matches in 999-android-system). I don’t think my naive approach will work, but I also don’t think it’s relevant. Even with the frequency, the cpu usage doesn’t make sense. BUT you said above that strace reveals it’s I/O that’s to blame.
I just did a quick and dirty check (4.3 on the volla) using the dbus-monitor --system approach and got tons of serial (comms/wifi connma and co., dhcp) activity which DOES seem a bit frequent for a phone that’s in sleep/idle. But I didn’t see anything related to sound?!
1096 622 mediaex S 258g6916.5 4 0.0 {mediaextractor} media.extractor aextractor
1136 622 mediacod S 258g6916.4 5 0.0 {mediaswcodec} media.swcodec oid.media.swcodec/bin/mediaswcodec
WTF? (ps, that journald produces so much load … ducks and runs).
But realistically, only lipstick is producing any load. I think this may be device dependant? And I’m running community, so…
Erg. What’s really disturbing is how much cpu Tidings eats in idle. Sigh. I have even more work to do.
EDIT, like 3. So, sitting here watching htop, lipstick and journald produce between 2-5% of cpu load with the phone in sleep (well, is it in sleep if I’m running htop, not really). Connman runs a steady 0.6 almost constantly.
After closing everything, I now see lipstick talking to the lipstick scanner and at about one 5th the period, connman. dbus-monitor. and journald really sucks. in comparison to rsyslogd.