yashsingh1/xdaforums huggingface dataset:
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
I have no input into the development of this rom & have not developed anything for it

The only thing I have compiled for this phone is twrp with the support for encryption

The device tree was sent to lineageos months ago for official support but as far as I'm aware there has been no response

Since lenovo took over Motorola updates for their devices have been alot slower - however they are still one of the best companies that provides support for their devices.

If you look at companies like Samsung you are lucky to get one major software update for your phone & that's including their flagship models - this is because they like putting so much (let's call it rubbish) on their phone on top of the vanilla android

The one big problem android has is device fragmentation regarding its operating system - until Google force companies to update it will never get better but the only way they can do that is by taking control of the operating system like Apple does & that would be a disaster for Android being open sourced
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
by talking with [MENTION=4728903]TheFixItMan[/MENTION] in the following thread (https://xdaforums.com/g5/help/batterry-drain-android-stand-t3692185/page2), I investigated a little more the battery drain issue,

Here is what kernel Adiutor shows us :

the big core cluster is set to Interactive governor, but LITTLE core cluster is set to performance (which looks totally overkill... and battery hungry, isn't it?), regardless of the performance profile or the load.

by setting it to interactive the LITTLE cores are correctly using every clockspeed steps. [MENTION=6810779]wzedlare[/MENTION] Is there any reason that I missed that LITTLE cores are step to performance scheduler by default?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] wzedlare:
As I know, all cores are set to interactive as default.Check g5 device tree to see my point: https://github.com/Wzedlare/android...ic/blob/cm-14.1/rootdir/etc/init.qcom.rc#L884

Of course, since I do not have the device, there might be some other factors that I could not notice.If you are not the only one reporting this issue, I might work on a fix in my free time.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
Thank you for pointing this out, as I can see you only set cpu0 governor and assume it will set the governor for all the 8 cores..

but from what I can see on my device using :

#!/system/xbin/bash

for c in {0..7}
do
pathVarA="/sys/devices/system/cpu/cpu$c/cpufreq/scaling_"
pathVarB="_freq"
pathVarG="governor"
catGov=$(/system/bin/cat "$pathVarA$pathVarG")
echo -e "\tcpu$c \ngovernor: $catGov"
for i in 'min' 'max' 'cur'
do
catFreq=$(/system/bin/cat "$pathVarA$i$pathVarB")
echo "$i freq: $catFreq"
done
echo "------"
done

When you set governor for cpu0 it only affects the big Cluster (0 to 3):

adb shell echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

cpu0 to cpu3 are set to interactive

When you set governor for cpu4 it affects the LITTLE cluster (4 to 7):

adb shell echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

cpu4 to cpu7 are set to interactive
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ektus:
Also, the "powersave" mode available from the battery settings doesn't seem to have much effect. I'd expect it to send the "big" CPU cluster into hibernation and the "small" cluster into interactive or some such. This should greatly reduce power consumption. Furthermore, it's been discussed earlier in this thread that the min_frequency values are way high.

But as long as there's active development, there's hope :)

Regards

Ektus.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] uran235:
Why is this great ROM not official? Will it ever be? Why is there no official Cedric lineageOS?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
See the response I gave to someone else at the top of this page
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
For some reason I rebooted after setting profile to 'powesave' and got the following (cf screenshot):

0-3 Off, 4-7 capped at 902MHz and

an " unknown " governor....

So looks like performance profile really are implemented but aren't applied properly.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
I've tried to find a similar approach on other msm8937 devices and found the following in init.qcom.post_boot.sh of bq tenshi :

# enable governor for perf cluster
echo 1 > /sys/devices/system/cpu/cpu0/online
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "19000 1094400:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
echo 1094400 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
echo "1 960000:85 1094400:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

# enable governor for power cluster
echo 1 > /sys/devices/system/cpu/cpu4/online
echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
echo "1 768000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq

https://github.com/LineageOS/androi...2c81c/rootdir/etc/init.qcom.post_boot.sh#L554

as you can see both clusters are initialized with governor, freq, target load and such.

I hope this will help you,

have a nice day!

PS: I can't find any reference to Heterogenous Multi-Processing on motoG5?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
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
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] jakot:
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:

-

-------- 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)
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ektus:
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.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
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/
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
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.)
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] jakot:
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.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
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
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] meinzz200:
Is it possible for you to provide your script?
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
In this case you are certainly right :)
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
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:

#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.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
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
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] meinzz200:
Thank you very much!
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
This the workaround I am using too, but we still lack a properly working HMP and/or core hot-plugging :)
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
You would need someone who has knowledge of kernel building & I have no coding knowledge in that department
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
Neither do I ...

(And I have no time to learn, but that would be worth the pain, power efficiency-wise)
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ShanePunk123:
Tried your instructions from the scratch but still same issues....
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
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
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
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.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] andyro2008:
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
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] applesauceChris:
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 :)
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
It should not, and although some users seem to have battery life issues on stock rom, I hope lenovo did configure it properly.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
I know they didn't configure crypto/selinux correctly which is why magisk doesn't work correctly so who knows
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ektus:
It has happened again, this time without me doing anything. The phone was idle, Wifi off, powersafe mode active, and stuck at the animated lineage boot logo for one third of the battery. Reboot by long-pressing of power switch, keep volume pressed to enter bootloader, shut down, start up again and settings are gone.

If it happens again, is there a way to gather diagnostic data after the fact?

Regards

Ektus.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
I was about to say get last_kmsg, but as you need to reboot by yourself while stuck in bootloop you'll get "hardware reset" and not the reboot cause...

What you call power save mode is :

- the "orange mode" or

- the one you get in battery settings > performance profiles, along with balanced and performance?

Why do you need to go to BL ? Doesn't it reboot simply by holding power until it reboots by self ?

Your case is quite difficult to troubleshoot, we cannot ask you to log to file hours or days of logs until it crashes again ....
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] bojnice:
to be official

How long does it take for ROM to become official? Where is the problem that it takes so long? M.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ektus:
Additionally, in my case the settings are gone, developer mode is off after the reboot, so it's unlikely I could do anything with ADB.

Exactly.

I haven't done much with that one, at least not since last Saturday when the last event happened. I do have Kernel Adiutor installed, but the only change I made there was to set the kernel governor for the "little" cluster to "interactive", and IIRC not permanent.

It does reboot, but that's a warm boot and it doesn't look like it can complete that boot attempt either. It was during my work hours, too, so I had neither time nor resources to investigate further. It would have shutdown sooner or later anyway due to drained battery.

As long as it was automatic, why not. But that's the problem. The writing of the logfile would have to be triggered upon entering the reboot, and the cause for the reboot must not interfere with writing the logfile. It would have to be stored on the data partition.

Data and applications did survive, application permissions only partially and I don't know how many of these have been restored when re-connecting my account. I don't do Google backups, normally, just local ones with oandbackup.

Regards

Ektus.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
The last time I faced that, it was my motoG first gen nand memory that was ageing and corrupting data and such...(crashing the device, and getting into bootloop)

did you change sdcard cache size ? I had an old device that would crash when the cache size was not the default one.

If you can find a pattern in the issue (like 3 days gap between two crashes or make a specific action before), then it could be possible to track it down better
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
You need to ask lineageos this question

All the op can do is submit it and await a response

For example I submitted my twrp to become official - it was accepted but it hasn't become official as the twrp maintainer is too busy to create the patches for the site
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ektus:
It has crashed twice so far, and has been stable before. It's just a couple months old, so old age shouldn't be a problem, and it was during idle hours where normally nothing at all happens. So either there's a hardware failure, or the event has been triggered by some application (e.g. by trying to display an alert or some ads).

If it were memory related, it should be possible to detect the faulty component (and eventually trigger the reboot) with a memtest program.

I'll continue (trying to) use the phone normally and investigate further if it happens again.

Regards

Ektus.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] matmutant:
Us right now :

:angel:
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] Cairo100:
Can someone help me? What do I have to do in this step? Sorry but it's my first compilation. I'm trying to compile LineageOS 15[IMG="Error terminal"]https://i.imgur.com/2ch6u1i.png[/IMG]
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
You need the following files containing the following text in your device/motorola/cedric folder

AndroidProducts.mk

#
# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/lineage.mk \
$(LOCAL_DIR)/full_cedric.mk

vendorsetup.sh

add_lunch_combo lineage_cedric-userdebug

Once you have these in terminal type

source build/envsetup.sh

lunch

(select lineage_cedric-userdebug)

brunch cedric

You do not breakfast because cedric is not in the lineageos repo

Also note if you are using a lineage 14.1 device tree you will need to change some other files as well as the paths have changed from cm to lineage (eg vendor location)

for example in lineage.mk

change

# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

to

# Inherit some common CM stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)

You will have to work out the rest - it will tell you when you lunch what errors there are in finding make files
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
out of interest - how many different launchers do you have installed as it looks like you have loads

What I would do is a complete re-install including the wipe of user data

So backup everything on internal storage to sd card or a pc as your internal storage will be wiped

Put phone into fastboot mode and in a terminal/command prompt window type

fastboot erase userdata

Now go into twrp and select wipe

advanced wipe

format system data cache art/delvik cache

goto home screen

install

select rom zip

goto home screen

install

select nano gapps zip

goto home screen

install

select su-addon zip

wipe cache/delvik art cache

restart
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] ektus:
Just three: "Pixel Launcher" (normally active), OpenLauncher and "Google Now Launcher"

That's going to need some time and effort. Perhaps sometime next week.

I've got open_gapps-arm-7.1-stock-20171025 installed, btw., not the nano variant.

Regards

Ektus.
[Moto G5 ROMs, Kernels, Recoveries, & Other Develop] TheFixItMan:
I prefer nano gapps because stock also installs all the apps like Gmail YouTube books movies etc to system

I don't use most of the Google apps except Gmail & YouTube so installing the rest into system is pointless.

Also when the app updates it doesn't overwrite the system app so you double up on everything - good if you need to roll back to system version but bad for taking up twice the amount of space in data

Nano gapps gives you all the google framework functionality but allows you to install any Google apps yourself from playstore into data & not into system

Try with nano gapps next time & install Gmail YouTube etc yourself

Also I don't know if your launcher could be causing crashes - I recommend evie launcher