[] Random closing of all apps

Hi - i did not log anything right now. But i looked at System Monitor - and RAM usage did not go over 2200MB (X10 i). Which does not look like 99% percent to me.
I have the app Takeoff which starts apps after boot.
My crash has been while using an android app, phone want black and after some seconds it was possible to turn the screen back an (not shure if had to enter the code) and Takeoff started all my windows - like a after a fresh start.

I’m on and it’s happened to me multiple times where all apps shut down at once - similar to a home screen restart.

A lot more frequently too now is that applications like the native browser will stay open, but the process has shut down - and when I click on the window the program has to start back up again.

1 Like

also happened to me couple of times… yeah, might not be thee oom, apps completely gone from the home screen, not greyed out

1 Like

For me this has been an issue much longer. It is usually the standard internet browser that is the reason to it. It is very annoying why all running apps has to be stopped when only one app is the reason. It is not what you expect from a true multitasking linux based OS and bring memories back to early Microsoft Windows.

1 Like

Yeah OOM killer seems to be pretty damn annoying. I “updated” from Xperia X to X10-2 and it has four gigs of ram which should be quite enough for normal use. Still some programs are being killed all the time in the background and they’re not even memoryhogs so something else is happening. First think probably is that this is aarch64 platform so programs do eat more ram by nature (remember using Windoze 64bit with 2 or 4 gigs of ram? :slight_smile:

Now i tried to adjust the behaviour of the oomkiller and “echo 2 > /proc/sys/vm/overcommit_memory” was not a good idea it seems. Note that this is a trinary value: 0 = “estimate if we have enough RAM”, 1 = “Always say yes”, 2 = “say no if we don’t have the memory”). That killed lipstick (UI) right away and i was left with a black screen unable to do anything, but still sfos was running there. Apparently UI doesn’t cope well if denied any ram (why would it ask too much?)

Wouldn’t dare to disable oomkiller completely (Put vm.oom-kill = 0 in /etc/sysctl.conf) because such irrational behaviour.

Now “echo 1 > /proc/sys/vm/oom_kill_allocating_task” seems most straightforward way and in some sense it does even work! So if application tries to allocate too much memory oomkiller should kill that task instead of the little ones that are helplessly running in the background. So having my daily programs running nicely i try to start web Browser and that dies instantly. Good. Trying second time it starts and i can use it normally and nothing got killed in the background. Funny how browser knew not to ask too much ram the second time it’s run :wink:

/proc/sys/vm/overcommit_ratio seems to be 50 now. There was a good discussion about that in the old forums. [Discussion] Oom Killer fine tuning (overcommit_ratio value) - together.jolla.com
Tried adjusting that but reaper keeps on reaping.

Anything else one can try to save the little ones?


Updated yesterday to (Vanha Rauma). Situation has not improved.

1 Like

Please also check this thread about lowmemorykiller (or lmkd):

Short version: /sys/module/lowmemorykiller/parameters/minfree contains ridiculously high free memory limits (and setting a higher swappiness helps a bit too).

@jovirkku There are logs and a logging command, too.

1 Like

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.

1 Like

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:


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 :smiley:

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:

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? :slight_smile:

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.

1 Like

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 :slight_smile:
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 :smiley:
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.

1 Like