Official LineageOS 19 for Fairphone 3/3+

So, as the wiki stated “can i get feature xxx? Don’t ask”, i checked on reddit…
Answer: smart charging is supposed to appear in future aosp versions. (So, probably not in 20, i take it).
Re zram, they consider that way too technical for the average user, so this will stay available only if you root your device…

One could try to get it accepted if proposed as a patch on gerrit… So code reading (and understanding) it is :slight_smile:

1 Like

So, trying to learn how the Lineage-Source works… Built it already for the emulator, and comparing it to the FP3. Everything already is in place, interestingly. zram.ko is loaded, device is existent. Only thing missing is the step in init.qcom.rc that’s activating zram in post-boot. The source seems to do it for every device (emulator definitely boots with zram activated).
So, only thing missing in FP3 is setting the disksize, doing a mkswap on the blockdevice and swapon it…
Just now building the FP3 image and checking how this looks…

Looking forward to LOS20. In the meantime, I think I’m going to wipe and reinstall the current version. I’ve found performance to be lacking in some pretty basic use cases and hope it’s just something a restart will fix. ZRAM helped my battery woes, but more and more I feel this phone is just showing its age in some areas. Not necessarily through its own faults, probably more that apps and websites lazily rely on the latest and greatest specs to work.

Well, so i tried to learn how this could work. As already specified earlier, all is in place to activate zram. So, taking the ideas from the emulator build, I reach at:

klaus@gaston:~/android/lineage/device/fairphone/FP3/rootdir/etc$ diff -u init.qcom.rc{-orig,}
--- init.qcom.rc-orig	2023-01-04 16:18:09.262828058 +0100
+++ init.qcom.rc	2023-01-04 16:18:14.101824077 +0100
@@ -1028,3 +1028,16 @@
     user system
     group system
     disabled
+
+# Enable zram only once per boot. From:
+
+# We want one opportunity per boot to enable zram, so we
+# use a trigger we fire from the above stanza. If
+# persist.sys.zram_enabled becomes true after boot,
+# we don't want to run swapon_all at that time.
+
+on property:sys.boot_completed=1
+    trigger sys-boot-completed-set
+
+on sys-boot-completed-set && property:persist.sys.zram_enabled=1
+    swapon_all /vendor/etc/fstab.${ro.hardware}

and

klaus@gaston:~/android/lineage/device/fairphone/FP3/rootdir/etc$ diff -u fstab.qcom{-orig,}
--- fstab.qcom-orig	2023-01-04 13:23:25.641306650 +0100
+++ fstab.qcom	2023-01-04 12:47:32.747893534 +0100
@@ -16,3 +16,5 @@
 
 /devices/platform/soc/7864900.sdhci/mmc_host*        /storage/sdcard1 vfat  nosuid,nodev         wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
 /devices/platform/soc/7000000.ssusb/7000000.dwc3/xhci-hcd.0.auto*  /storage/usbotg  vfat  nosuid,nodev  wait,voldmanaged=usbotg:auto
+/dev/block/zram0	none	swap	defaults	zramsize=50%
+
klaus@gaston:~/android/lineage/device/fairphone/FP3/rootdir/etc$ 

I’m not yet sure how to set the property, especially, if I want to allow the normal users to enable or disable swap, and wether it should be 50% or 38% (which I have good experience with)

As I need my FP as a daily driver, I can’t test this modification. Anyone with a test phone available?

Sorry for the late reply, haven’t got a mail notification, Hope you have fixed the boot loop or are you still stuck in it?

Just wanted to say with this phrase, that you have to select the right package constellation e.g. ARM64 with MindTheGApps 12.1 for LOS 19 and a FP3 device. What worked for all that have replied was the MindTheGapps-12.1.0-arm64-20220605_112439.zip. Best now used with the latest LOS 19 package.

Another topic: i’d like to use a vpn based on wireguard. But i get a strange error with no Google hit. Only thing i can think of, is the functionality in the kernel, after all? Would be my only explanation

Hi,
Because you’re suspecting it to be a kernel issue, I have one possible fix in mind as of now. Right now we do not have wireguard enabled in our kernel.

Would you be interested in enabling this and trying it out?

All you have to do is, add CONFIG_WIREGUARD=y in kernel/fairphone/sdm632/arch/arm64/configs/lineageos_FP3_defconfig → Build → Install and validate.

If it works, we can take it in to the sources officially.

Thanks.

1 Like

I think i can try this, should not disturb the rest of the phone, i guess :wink:

Thanks

Hi,
am I the only one, who is suffering very often a starving system - most often it’s the “systemui” app, which takes so long time, so that I’m offered by the system to stop this system app. Sometimes it’s also another app like “magic earth”.
It wasn’t that bad with the stock ROM, so I’m really suspecting that I have to switch back to stock ROM, to get fun with my FP3.

I opened the bug FP3-LOS 19.1: System instable after leaving standby - potential problem due to permission problems of system apps like Systemui, Appop (#5317) · Issues · LineageOS / issues / android · GitLab where I reported the coincidence of freezing apps and error messages like:

**Permission Denial**: receiving Intent { act=android.intent.action.SERVICE_STATE flg=0x1000010 (has extras) } to ProcessRecord{4e6c879 1901:com.android.**systemui**/u0a112} (pid=1901, uid=10112) requires android.permission.ACCESS_FINE_LOCATION due to sender android (uid 1001)

Somebody else reported a change in Android, which causes a very strict handling of interaction permissions like this - Diff - abb41637225c95d5530bff275531a446be66a18c^! - platform/frameworks/base - Git at Google

Is it just my FP3, which is too often freezing due to “out of memory” problems in the background, which are causing massive killing of apps, so that the needed apps can’t execute?

Bye,
Achim

That’s probably a ongoing discussion whether we need zram enabled or not. Some people (including me) use rootibg to be able to activate swap (zram). I can run my system without problems for weeks this way

My Fairphone has also been very sluggish for semesters. Like Iklaus, I added a way to activate/raise the zram, but probably not enough since it’s becoming sluggish again.

Hi,
therefore I’d be so happy, if somebody could fix the permission problems for system apps like systemui. I regard it as suspectible, that I find several permission problem log lines immediately in front of out of memory problem lines. My understanding is, that systemui needs some information to control its state engine - and gets massively disturbed due to this permission problems - and this erroneous state could cause this huge memory consumption (memory leak?). If my idea would be correct, the increase of ZRAM would only hide the real problem. If I use the settings menu to control the permissions of systemui, I find the information, that systemui has already all permissions → this is an indication, that systemui SHOULD have all permissions - but some important permissions are currently missing.

Bye,
Achim

Hmm, is this really a LOS19.1 issue or is it linked to any mod like MindTheGapps? I’m running the current patch level of LOS19.1 with MircoG and don’t experience any issues like described in your bug report. :face_with_raised_eyebrow:

For some time, i used 1.5GB, but, like others, i switched to 2GB, which seems to be just right. Also, those devices which have zram activated ship with 2 as well.
Got me a pixel on ebay (fp3 was just too expensive;-)), to try those modifications

Hi, I use wireguard app without problem to access Google.

1 Like

You’re on this specific los version? Do you use the play store version or from f-droid?

LOS 19.1 with mindthegapps. I don’t remember which store I used. Probably F-droid. App version is v1.0.20220516

1 Like

Hi,
this might be the case, as I’m using MindTheGapps (version 12.1.0-arm64-20220605_112439; as this is the open gapps version which is recommended by LOS). Additionally I’m using Nova Launcher (I tried already the alternative launcher “Evie” - but this change didn’t avoid the problems; I switched already to the new beta version to test, if this resolves the problems).

So if others are not finding error messages regarding permission denial to system apps, then this difference might indicate the reason for these problems.

Can anybody please tell me, which part is responsible to declare to the system that system apps like systemui should get all needed permissions? - is this a responsibility of MindTheGapps? or LOS?

Bye,
Achim

Hi, I have the exact same set up. Just checked, systemui does not claim it needs fine location (also, I’m not sure I would grant it :wink: )
I see those messages occasionally, but I can’t say I have sluggishness (uptime 7 days now), but that sure depends on personal usage stats

Hi Iklaus,
don’t you get messages about systemui not responding with the options to kill it or to wait?
Sometimes other apps like Magicearth suffer the same problem.

On each case, where systemui or another app was not responding, and where I took a logfile - I found some of those permission problem lines short before a flood of out-of-memory emergency loglines.

I deinstalled already the Corona-Warn-App for Germany just to reduce background apps - without success.

Question:
Where does “systemui” app belong? - LOS or MindTheGap?
→ which part is responsible for configuration of synchronisation of registration to get permissions and accessing only accessible services?

Could I use adb to add the needed access rights in some suitable config files? - then I’d try this just to see, whether things get better without permission problems (this might indicate, that systemui does not have suitable handler for not getting some information).

Bye,
Achim