Are your modifications applicable for other devices also, or is this Xperia 10iii specific?
I had a look at Jolla Phone and Xperia X yesterday, and I was sent Xperia 10 values, and they all were “low” aka. didn’t suffer from the same issue.
So, lmkd and its configuration is present all the way back to Jolla Phone, so in theory this is applicable to many (all?) models running Sailfish OS. In practice however, only Xperia 10 III was in need of adjustment (haven’t tested my XA2 Ultra and Xperia 10 II yet).
I observed on my Xa2Ultra that only four parameters are given in minfree, is the implementation different, or is there an overload functionality in place for lmk?
I don’t know, I just noticed the same thing. Applies to Xperia X, too, so I guess it’s an armv7hl vs. aarch64 thing.
I’ve posted something similar in the oom thread, but what OP describes is a lipstick restart which might suggest Fernschreiber is hitting some Qt bug, oom leaves greyed out covers, OP says covers are gone. Do all people experiencing missing app covers had Fernschreiber running?
IIUC, it has four “zones” or “steps” where it operates, also the adj
file should contain the same number of numbers (but don’t touch those). It has four different limits of memory set (or six), after which a bigger set of processes is considered to be killed, based on their oom score. Basically it increases granularity, if it has more zones. The working principle is the same.
That sounds like a Lipstick crash indeed. I tried Fernschreiber only briefly, but I don’t remember anymore how it went. Well, it worked, but I have no memory if it crashed or not.
The four values used in the XA2Ultra appear not to be device specific, at least I can find exactly these values in this code of lmk:
https://github.com/spotify/linux/blob/master/drivers/staging/android/lowmemorykiller.c
Yeah, you correctly identified that, those values are the defaults for the lowmemorykiller
. The weird thing is that Sony defines custom values during init. Those are the same for XA2, 10, 10 II. But while 10 and 10 II listen to this config, with XA2 for some reason they still are at default, so that must be a bug specifically with that device’s configuration.
I get a “lipstick crash” too, but at the moment i think it’s because oomsnuffer doesn’t have anything to do it then decides to nuke the whole f*****g ground
The memory usage is accumulating while the phone is up and for example after couple of weeks oomsnuffer then decides to kill lipstick and restarts, I then immediately startup Lighthouse again and it shows memory usage is at about 60-70% still while no apps are running! It seems only reboot claims them back.
What i have done to keep my sanity is a little script i use after a reboot to spice things up. I start my normal apps which i would really much like to keep running and then open Toeterm and run the script which does:
#!/bin/bash
echo -800 > /proc/pidof harbour-jollaopas
/oom_score_adj
echo -800 > /proc/pidof harbour-lighthouse
/oom_score_adj
…
etc… you get the idea. few more apps in the list Toeterm too. oom killing the shell when ssh was running in it was pain in the ass!
eventually it gets to a point that my programs do run and work an oombastard leaves them be, but when i open browser or email or something then they get snuffed pretty soon after opening even when on foreground. Hilarious isnt it?
Well…thought i might as well make a sdcard with just one partition 0x82 into it and see how that goes… Will report back later.
edit: it seems the forum doesnt show the script correctly. well you all know how to insert commands output to the current command line…
This finally led to me to abandon Sailfish. I’ve had the patience since Jolla1 through Xperia 10 II. I’ve been total fan having almost all TOHs to Jolla1, delighted about Jolla C and tablet (yes, lucky me!), bought license and eventually series of Xperias with Sailfish. In general I have two Jolla1, two JollaC, one tablet and three Xperias (with Sailfish). I know how hard embedded kind of development is and was e.g. with Jolla1, but guys, come on… The overall quality has not evolved that much. Even my Nokia N9 has more quality. I understand it is really neat to develop and tweak all sort of things in the background and under the hood. Most companies do this and it is a trap! Do not forget the features bringing actual customer value. I hope Jolla and Sailfish all the best, but turn the development focus a bit around and we might see once again.
Well, reporting back now. Did install a 16 gig mSD card with just one swappartition in it. Activating it did ease oomreaper’s activities to near zero! But the fun didn’t end there
Swap in a sdcard isn’t really that fast. Some funny moments occurs many times a day when phone just halts for a 2-5 minute intervals when changing back to main screen, browsing the web, waiting for the keyboard to show up, trying to answer a call!.. etc.
Killing of programs is damn annoying, but so is this. I must say aaarch64 is a biiig mistake on this platform. Actual amount of ram should be doubled on the device (sony’s fault). With extra swap enabled the ram usage is about 4-6 gigs with medium usage. And at that point i hope you’re not in a hurry to make a call or check something out from the web.
can we have the 32bit sfos back?
Have you tried to reduce the minfree values yet? Tinkering with the oom_score_adj
values is not recommened, because IIUC the OS ajusts them already during runtime.
Haven’t tried to do that. I bet programs will get killed anyway since the memory just gets full pretty soon. Especially if Aliendalvik is running too. I’ll take a shot now though! Pretty fed up with waiting for the slow swap
I’ve actually checked the oom_score_adj values occationally after changing them and they’re always -800 after changing them manually. Would have to quit the running program and restart it for it to get the default value. OS doesn’t touch them during runtime.