[Galaxy S3 Neo Original Android Development] helloyello:
[MENTION=4988157]windmane[/MENTION]

Thanks for the tip! Didn't know I have htop in LOS ...

I ran htop and observed that system_server is always eating between 6-11% of CPU, mostly around 9-10%. It's only one core (the first) used. There are no other processes loading the CPU (apart from htop).

My battery is also old and regarding the logd service, well, I still have some issues with LOS16 and might need to be able to log things.

[MENTION=8750475]Humaxxx[/MENTION]

I tried the Kernel Aduitor App - really good! Noticed I have only the first CPU active, still loaded at ~40% all the time and the frequency hops between 998&1401MHz, very rarely drops at 787MHz.

In the Kernel > CPU section there is an interesting option called: Multicore Power Saving (Try to group tasks into the least cores possible) which is not enabled. Wondering which /sys/ filesystem file I need to activate for that and if it helps. I could do it directly in Kernel Aduitor, but I don't like such approaches, not understanding what I'm actually modifying.

Will try to set the the CPU at max 1190, although I'm sure I'll cripple the performance. Still trying to understand why I have such high load for simple tasks in LOS and maybe further fine tune the CPU driver & governor.

Thanks for the GPS test, I might need a newer iGO version that recognizes the GLONASS rx format (still not sure if that naming is standard). Indeed The S3 GPS stuff is lazy on both stock and LOS, compared to other devices.

I was strictly referring to Cell Broadcasts messages, which are used by the authorities worldwide to announce (regional) security alerts, not only COVID019 related, but other threats too - earth quakes/fires/tsunamis& other imminent "catastrophes". In the EU there is even forbidden to manufacture & sell phones that are not able to receive and display such messages. And these messages are like SMS, received directly over the mobile provider carrier.

On the CPU scaling governor study:

- this is what I'm testing now, reverted a lot of things that are set by default in LOS16

echo 1401600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo 0 > /sys/module/msm_thermal/core_control/enabled
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
echo 20 > /sys/devices/system/cpu/cpufreq/ondemand/freq_step
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/input_boost
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 300000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
echo 0 > /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_early_factor
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_interim_factor
echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 10000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate_min
echo 787200 > /sys/devices/system/cpu/cpufreq/ondemand/step_up_early_hispeed
echo 998400 > /sys/devices/system/cpu/cpufreq/ondemand/step_up_interim_hispeed
echo 300000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
echo 1 > /sys/module/msm_thermal/core_control/enabled
echo 0 > /sys/module/cpu_boost/parameters/boost_ms
echo 0 > /sys/module/cpu_boost/parameters/sync_threshold
echo 0 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 0 > /sys/module/cpu_boost/parameters/input_boost_ms
echo 0 > /dev/cpuset/camera-daemon/cpus
rm -rf /dev/cpuset/camera-daemon
echo 0 > /dev/cpuset/foreground/cpus
echo 0 > /dev/cpuset/background/cpus
echo 0 > /dev/cpuset/system-background/cpus
echo 0 > /dev/cpuset/top-app/cpus
echo 0 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus

There are two observations I made, that you could transmit to the devs (maybe they are reading directly this post).

In the file:

https://github.com/LineageOS/androi...b/lineage-16.0/rootdir/etc/init.qcom.power.rc

- there is a section which defines the scaling governor for when the phone is charging (interactive). It doesn't looks to work, because in my case it still remains on ondemand.

- then in the section where the scaling governor is set, it begins with disabling the thermal control, just to be able to turn online all the cores, after which the governor is set individually on each core. Finally re-enabling the thermal control. I don't believe that's necessary because /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor is the only path that actually exists (cpu1,cpu2,cpu3 don't have a cpufreq/scaling_governor subdirectory) and it's enough to set the governor on the first core (cpu0) because apparently it will apply on all other cores too.

In one of my older posts I was confused about the entries in /sys/devices/system/cpu/cpu0/cpufreq/related_cpus, noticing only 2 cores instead of 4. Well, as soon as they become online, they get populated in the /sys/devices/system/cpu/cpu0/cpufreq/related_cpus.

________

Others (for devs):

Related to the issue with the WiFi2,4GHz & BT, where the WiFi disconnects, I managed to get more logs, including the kernel log (dmesg) and couldn't notice anything wrong.

In the logcat logs I always see this line when the disconnect happens:

wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid=ro:ut:er:ma:ca:dd reason=3 locally_generated=1

Like the phone just dumps the WiFi connection without any apparent reason.

The same I could observe on the router - where I activated the debug - hostapd tells me that the station (phone) simply & gracefully disconnected.

Some referernces I found on the Internet (maybe) related to this:

https://stackoverflow.com/questions/59400614/can-not-establish-wifi-connection-android-api29

https://stackoverflow.com/questions/54042900/android-9-drops-wifi-connection-with-no-internet

Some other intersing obseravtions in the kernel log:

- graphics driver crashing (noticed it a few times - apparently when the phone is booting)

[ 70.173297] ------------[ cut here ]------------
[ 70.173315] WARNING: at ../../../../../../kernel/samsung/msm8226/drivers/video/msm/mdss/mdss_mdp_util.c:105 mdss_mdp_set_intr_callback+0x10c/0x12c()
[ 70.173327] replacing current intr callback for ndx=8
[ 70.173332] Modules linked in:
[ 70.173357] [<c010cdb0>] (unwind_backtrace+0x0/0x138) from [<c01aca50>] (warn_slowpath_fmt+0x58/0x7c)
[ 70.173375] [<c01aca50>] (warn_slowpath_fmt+0x58/0x7c) from [<c04452b4>] (mdss_mdp_set_intr_callback+0x10c/0x12c)
[ 70.173393] [<c04452b4>] (mdss_mdp_set_intr_callback+0x10c/0x12c) from [<c0454b08>] (mdss_mdp_video_start+0x230/0x894)
[ 70.173410] [<c0454b08>] (mdss_mdp_video_start+0x230/0x894) from [<c043c7b4>] (mdss_mdp_ctl_start_sub+0x70/0x420)
[ 70.173425] [<c043c7b4>] (mdss_mdp_ctl_start_sub+0x70/0x420) from [<c043ff28>] (mdss_mdp_ctl_start+0x10c/0x23c)
[ 70.173443] [<c043ff28>] (mdss_mdp_ctl_start+0x10c/0x23c) from [<c045db8c>] (mdss_mdp_overlay_start+0x1bc/0x284)
[ 70.173460] [<c045db8c>] (mdss_mdp_overlay_start+0x1bc/0x284) from [<c045f050>] (mdss_mdp_overlay_on+0xb0/0x19c)
[ 70.173480] [<c045f050>] (mdss_mdp_overlay_on+0xb0/0x19c) from [<c0479148>] (mdss_fb_blank_sub+0x88/0x294)
[ 70.173497] [<c0479148>] (mdss_fb_blank_sub+0x88/0x294) from [<c047cf2c>] (mdss_fb_blank+0x1d4/0x21c)
[ 70.173512] [<c047cf2c>] (mdss_fb_blank+0x1d4/0x21c) from [<c042e740>] (fb_blank+0x3c/0x68)
[ 70.173526] [<c042e740>] (fb_blank+0x3c/0x68) from [<c042f0b0>] (do_fb_ioctl+0x554/0x5d8)
[ 70.173541] [<c042f0b0>] (do_fb_ioctl+0x554/0x5d8) from [<c029c6ac>] (do_vfs_ioctl+0x48c/0x58c)
[ 70.173562] [<c029c6ac>] (do_vfs_ioctl+0x48c/0x58c) from [<c029c7f8>] (sys_ioctl+0x4c/0x70)
[ 70.173579] [<c029c7f8>] (sys_ioctl+0x4c/0x70) from [<c01063a8>] (__sys_trace_return+0x0/0x18)
[ 70.173589] ---[ end trace c86ea3681f91da90 ]---

- and this is what happens when the WiFi 2.4GHz gets disconnected (Signal/Skype on Bluetooth test)

[ 148.048695] wlan: disconnected
[ 148.048716] wlan(0) 00:00:00:00:00:00 Standalone
[ 148.096846] init: Received control message 'stop' for 'wpa_supplicant' from pid: 390 (/system/bin/wificond)
[ 148.096929] init: Sending signal 9 to service 'wpa_supplicant' (pid 2574) process group...
[ 148.103194] libprocessgroup: Successfully killed process cgroup uid 0 pid 2574 in 6ms
[ 148.115844] init: Service 'wpa_supplicant' (pid 2574) received signal 9
[ 148.118280] init: processing action (init.svc.wpa_supplicant=stopped) from (/init.qcom.rc:691)
[ 148.120455] init: Command 'stop dhcpcd' action=init.svc.wpa_supplicant=stopped (/init.qcom.rc:692) took 2ms and failed: service dhcpcd not found
[ 148.500120] audit: audit_lost=537 audit_rate_limit=5 audit_backlog_limit=64
[ 148.500146] audit: rate limit exceeded