[7.1.x] LineageOS 14.1 for Moto G5 [cedric][UNOFFICIAL]

Search This thread

andyro2008

Senior Member
Nov 22, 2012
250
89
Rosario
I also notice this behavior with the governor of the LITTLE cores on AICP, made an script in Tasker to correct it. Also.i disabled big when the screen is off. So far the battery is awesome.

Enviado desde mi Moto G5 mediante Tapatalk
 

jakot

Member
Sep 27, 2014
8
2
sudden bootloop

Hi,

I've been using this for a couple of months, still on the August(?) build. Everything has been running great!
But today all of a sudden my phone is stuck in the lineage boot animation. I don't know why/when it rebooted. I've cleaned dalvik + cache and removed the sd card, to no avail.
Is there anything I can try which does not involve wiping my data? Any pointers for debugging?

I am speculating that there was an auto-update of an app which somehow bricked it.

EDIT: got a logcat.
some potentially interesting bits:
-
Code:
-------- beginning of crash
08-11 13:04:54.990  1306  1626 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiStateMachine
08-11 13:04:54.990  1306  1626 E AndroidRuntime: java.lang.StringIndexOutOfBoundsException: length=0; index=0
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at java.lang.String.charAt(Native Method)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at com.android.server.wifi.WifiNetworkHistory.readNetworkHistory(WifiNetworkHistory.java:352)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at com.android.server.wifi.WifiConfigManager.readNetworkHistory(WifiConfigManager.java:1887)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at com.android.server.wifi.WifiConfigManager.loadConfiguredNetworks(WifiConfigManager.java:1716)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at com.android.server.wifi.WifiConfigManager.loadAndEnableAllNetworks(WifiConfigManager.java:464)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at com.android.server.wifi.WifiStateMachine$SupplicantStartingState.processMessage(WifiStateMachine.java:4613)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at com.android.internal.util.StateMachine$SmHandler.processMsg(StateMachine.java:980)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:799)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
08-11 13:04:54.990  1306  1626 E AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:61)
 
Last edited:

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London
I'm on the October 18th, 2017 build, but have had a similar experience last Saturday, see https://xdaforums.com/showpost.php?p=74246220&postcount=689

I did loose some data, but was able to recover within a couple hours. I was updating some apps (mostly google) prior to the problem, but the crash happened when I was away from the phone.

Iv not had any crashes or anything like that

Only thing I suggest is reflash the latest nano gapps - this will remove the previous versions & replace with the latest version into system (it will not erase any data & settings should remain)

Select arm 7.1 nano
http://opengapps.org/
 
  • Like
Reactions: applesauceChris

matmutant

Senior Member
Mar 17, 2011
3,395
4,743
~/
andrux-and-me.blogspot.com
Moto G
Moto E
I also notice this behavior with the governor of the LITTLE cores on AICP, made an script in Tasker to correct it. Also.i disabled big when the screen is off. So far the battery is awesome.

Enviado desde mi Moto G5 mediante Tapatalk

by setting correctly the governor of the LITTLE cores I simply got like 50-70% increase of battery life!
for core disabling I don't know, usually cores are mostly in deep sleep when screen is off as device is sleeping, so there shouldn't have much impact disabling cores (although as most task screen off are background tasks and should be well handled by LITTLE cluster.)
 
  • Like
Reactions: andyro2008

jakot

Member
Sep 27, 2014
8
2
Fixed the boot loop, somewhat by accident ;)
I cleaned out wpa_supplicant.conf from twrm, but forgot to re-set the proper permissions after pushing the stripped down file. That lead to WiFi getting disabled and the phone booted again. After fixing the file permissions everything is back to normal.
Looks like it was this bug.
 
  • Like
Reactions: andyro2008

andyro2008

Senior Member
Nov 22, 2012
250
89
Rosario
by setting correctly the governor of the LITTLE cores I simply got like 50-70% increase of battery life!
for core disabling I don't know, usually cores are mostly in deep sleep when screen is off as device is sleeping, so there shouldn't have much impact disabling cores (although as most task screen off are background tasks and should be well handled by LITTLE cluster.)
I could be wrong, but even with the screen off, any app adquiring a wake-up still can use big cores. By example, Spotify playing music will keep the big cluster on almost all the time.

Disabling big, Spotify will run without problems on LITTLE and the battery life is noticeable better.



Enviado desde mi Moto G5 mediante Tapatalk
 

matmutant

Senior Member
Mar 17, 2011
3,395
4,743
~/
andrux-and-me.blogspot.com
Moto G
Moto E
I could be wrong, but even with the screen off, any app adquiring a wake-up still can use big cores. By example, Spotify playing music will keep the big cluster on almost all the time.

Disabling big, Spotify will run without problems on LITTLE and the battery life is noticeable better.



Enviado desde mi Moto G5 mediante Tapatalk

In this case you are certainly right :)
 

andyro2008

Senior Member
Nov 22, 2012
250
89
Rosario
Is it possible for you to provide your script?


Sure, but it's not a script, it's a tasker project. If you have tasker (paid app) yo can import the .prj.xml file, to review, modify and use it.

If you don't have tasker, you can use a child app built with Tasker App Factory. Basically it's the mentioned prj.xml but compiled to run in an standalone app. I included the APK file in the same zip just in case. Of course it needs ROOT and it doesn't have UI.
It will apply the correct Governor on boot, disable big cluster when the display is off, and enable it again when it's on.

https://drive.google.com/file/d/0B-TdkpAffsTDbHR6UklTdWJmNGM/view?usp=drivesdk

If you want only the shell script used to set both governors in interactive, to add it in a init.d script:


Code:
#big GOV
chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 'interactive' > /sys/devices/system/cpu/cpu0/cpufreq/ 
chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#LITTLE GOV
chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo 'interactive' > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

Hope it's usefull.
 
Last edited:

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London
You can set the little to run interactive using kernel adiutor and also set it to apply changes on boot

Since setting to interactive the little cores run mostly at 768mhz instead of constantly at 1094mhz
 

Attachments

  • Screenshot_20171024-130025.png
    Screenshot_20171024-130025.png
    122.5 KB · Views: 338

meinzz200

Member
Jun 13, 2015
6
0
Sure, but it's not a script, it's a tasker project. If you have tasker (paid app) yo can import the .prj.xml file, to review, modify and use it.

If you don't have tasker, you can use a child app built with Tasker App Factory. Basically it's the mentioned prj.xml but compiled to run in an standalone app. I included the APK file in the same zip just in case. Of course it needs ROOT and it doesn't have UI.
It will apply the correct Governor on boot, disable big cluster when the display is off, and enable it again when it's on.

https://drive.google.com/file/d/0B-TdkpAffsTDbHR6UklTdWJmNGM/view?usp=drivesdk

If you want only the shell script used to set botj governors in interactive, to add it in a bit.d script:




Hope it's usefull.

Thank you very much!
 

ShanePunk123

Senior Member
Oct 10, 2014
208
56
New Delhi
Make sure you have flashed it correctly - Iv written my instructions loads of times but here it is again

Go into twrp recovery
Goto wipe
Select advanced wipe
Wipe the following - dalvik/art cache system data cache
Go back to home screen
Install
Select rom zip
Go back to home screen
Install
Select gapps zip (I recommend nano gapps - you need arm 7.1 nano http://opengapps.org/)
Go back to home screen
Install
Select su addon zip https://mirrorbits.lineageos.org/su/addonsu-14.1-arm-signed.zip
Wipe delvik/art cache
Restart

Tried your instructions from the scratch but still same issues....
 

andyro2008

Senior Member
Nov 22, 2012
250
89
Rosario
This the workaround I am using too, but we still lack a properly working HMP and/or core hot-plugging :)
Do we need core hotplug? Yesterday my SOT was 8 hours... It's a lot, and with the 8 cores enabled.

Disabling LITTLE cores tends to increase the time that big is at high clock speed, and the SOT is noticeable lower 6 hours.

Enviado desde mi Moto G5 mediante Tapatalk
 
  • Like
Reactions: matmutant

matmutant

Senior Member
Mar 17, 2011
3,395
4,743
~/
andrux-and-me.blogspot.com
Moto G
Moto E
Do we need core hotplug? Yesterday my SOT was 8 hours... It's a lot, and with the 8 cores enabled.

Disabling LITTLE cores tends to increase the time that big is at high clock speed, and the SOT is noticeable lower 6 hours.

Enviado desde mi Moto G5 mediante Tapatalk

If I understand HMP correctly, it works this way :
- the scheduler is energy-aware and knows which core are performance ones, which ones are power-efficient. thus can send a process to a specific cluster depending on the demand.
- big cores are mostly idle or off by default
- LITTLE cores are on, and get the process sent to them, if the process takes too much time to complete, the task is sent to the big cluster (of it the process is flagged as cpu intensive by the history)
- most background processes are sent to LITLLE cluster, most foreground ones are sent to big cluster by default.


for now, our cores are all on, and processes are sent mostly by magic to whatever core is available without taking into account the type of cluster...
It is like we have an 8 cores SoC with unbalanced cores without any performance or powersave benefits (against a balanced 8 cores one and a properly big.LITTLE aware system) which means a cpu intensive process could be sent to the LITTLE cluster and take much longer to be processed than if it had been sent to one core of the big cluster.
It is not as bad as keeping the LITTLE cluster at max freq as it is by default... but it is far from the optimum that can our msm8937 can reach.
I am struggling to find help with another device using HMP on msm8937, and although I understand roughly how all this work, I don't have the required knowledge/skill to implement it in our kernel.
 
Last edited:

andyro2008

Senior Member
Nov 22, 2012
250
89
Rosario
for now, our cores are all on, and processes are sent mostly by magic to whatever core is available without taking into account the type of cluster...

Mmmmm, I will test to disable LITTLE when the display is ON. If it's working as you say, perhaps it will improve the battery life without affecting the performance.

Anyway my SOT is 8 hours. Could it be more?



Enviado desde mi Moto G5 mediante Tapatalk
 

applesauceChris

Senior Member
Mar 18, 2017
86
35
Hello, I'm kindda amateur around here, so just wanted to ask if the Stock ROM has the same LinageOS's kernel bug that you are talking about (big core - LITTLE core related bug?). Thanks :)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Experimental new build with March 05th, 2024 security patches available

    https://www.dropbox.com/scl/fi/2m9w...dric.zip?rlkey=meg8jy7e8qte60xj1beh47myu&dl=1

    This build is to be considered alpha as it is lacking two patches from July 2021 as can be read on Gerrit. The patches from August, 2021 through March, 2024 have also been included, but no updated patch level. It still reports June 5th, 2021, as it is lacking the two patches from July of 2021 from the "not implemented" section. There seems to be no progress in backporting these patches :-(

    I've got it installed and running on my own device for a day now.

    As always, these builds don't contain any patches to closed source drivers, as those would have to be supplied by Lenovo. Who have long since stopped supporting this device.

    Builds prior to November 12th, 2023 have been deleted from my dropbox to mitigate space constraints.

    Use at your own risk!

    Regards
    Ektus.
  • 102

    mwRBiAz.jpeg


    Code:
    /*
    * I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed (like it did for me...).
    * Please do some research if you have any concerns about features included in the products you find here before flashing it!
    * YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.
    * Your warranty will be void if you tamper with any part of your device / software.
    * Same statement for XDA.
    */

    LineageOS is a free, community built, aftermarket firmware distribution of Android 7 (nougat), which is designed to increase performance and reliability over stock Android for your device.

    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review.



    What's working :

    • Boots
    • Touch
    • RIL [Calls, Mobile Data, Dual SIM]
    • Wifi
    • Wifi Tethering
    • Bluetooth
    • Camera
    • Camcorder
    • Audio
    • Sensors
    • Flash
    • GPS
    • Notification LED
    • Fingerprint
    • OTG
    • VoLTE
    • FM Radio

    Known issues:
    • Fingerprint(Fixed in the build 05/25/2017)
    • OTG(Fixed in the build 05/29/2017)
    • Camcorder(Fixed in the build 06/01/2017)
    • VoLTE(Fixed in the build 06/27/2017)
    • Wi-Fi Obtaining IP problem in some variants.(Fixed in the build 06/27/2017)
    • Video player stutters.(Fixed in the build 06/28/2017)
    • FM Radio(Fixed in the build 06/28/2017)
    • Rear Camera in 3rd party apps does not work on some users.(Fixed in the build 06/30/2017)
    • USB tethering function does not work.A Third party app such as pdanet might be a solutiıon.(Fixed in the build 06/30/2019)

    Instructions :

    Downloads :

    Source Code:

    XDA:Rom Information
    LineageOS 14.1,cedric, ROM for the Moto G5

    Contributors
    wzedlare, vache, CodeZero, ektus
    ROM OS Version: 7.1.x Nougat

    Version Information
    Status:
    Stable

    Created 2017-05-25
    Last Updated 2023-09-10
    18
    The build with january security patch is now on the thread.
    16
    New build(18/10/17) is now available to fix "Krack" vulnerability.
    16
    just got Oreo booted on our beloved Moto G5
    15
    New Build 12-11-2017.Big thanks to vache and jobinrjohnson for their helps.Changelog:
    Code:
    - Root obtaining problems(a.k.a segmentation faults) are fixed.
    - Governor of the little clusters is interactive now.
    - Some other optimizations.