[LG G Watch] Alynna:
Still a bug

There is still a little bug in gohma 2.1, but I fixed it in the script.

SOMETHING sets the governor back to userspace/787200 about a minute into the watches' boot.

I logged in and watched it occur.

However the other parameters now stick.

I fixed it with the following:

#!/system/bin/sh

/system/xbin/sysrw

##############################

# BEGIN CUSTOM USER SETTINGS #

##############################

# increase vibration intensity

# default is 80

echo 85 > /sys/class/timed_output/vibrator/amp

# default is 20

echo 175 > /sys/class/timed_output/vibrator/driving_ms

# switch from userspace to ondemand governor

# echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# echo 787200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

# Defer change until later, see enforcer below.

GOV=ondemand

FREQ=1094400

# set dpi (default is 240, smaller number means smaller text)

setprop ro.sf.lcd_density 200

##############################

# END CUSTOM USER SETTINGS #

##############################

# improve sd cache

if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then

echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb

fi

# improve block speed

for node in `busybox find /sys -name nr_requests | grep mmcblk`; do echo 1024 > $node; done

# gpu rendering

busybox mv /system/lib/egl/libGLES_android.so /system/lib/egl/libGLES_android.bak

busybox sed -i '/0 0 android/d' /system/lib/egl/egl.cfg

# adjust minfree

echo "0" > /sys/module/lowmemorykiller/parameters/debug_level

echo "2560,4096,6144,12288,14336,18432" > /sys/module/lowmemorykiller/parameters/minfree

# improve file system mounts

busybox mount -o remount,noatime,nodiratime,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /

busybox mount -o remount,noatime,nodiratime,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /sys

busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /system

busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /data

busybox mount -o remount,noatime,nodiratime,nodelalloc,noauto_da_alloc,data=ordered,nobh,barrier=0 -t auto /cache

# improve transitions

if [ -e /data/data/com.android.providers.settings/databases/settings.db ]; then

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 0.5 where name = 'transition_animation_scale'"

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 0.5 where name = 'animator_duration_scale'"

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update system set value = 1 where name = 'window_animation_scale'"

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 0.5 where name = 'transition_animation_scale'"

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 0.5 where name = 'animator_duration_scale'"

sqlite3 /data/data/com.android.providers.settings/databases/settings.db "update global set value = 1 where name = 'window_animation_scale'"

fi

# enable sysctl tweaks

busybox sysctl -p /system/etc/sysctl.conf

/system/xbin/sysro

# Wait around for the system to change the governor and change it back, then exit when we're sure its set.

# This function will remain running for a minute to enforce the change, until it's sure the system won't change it back.

enforcer () {

X=0

while [ $X -lt 12 ]; do

if [ ! `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` = $GOV ]; then

echo $GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo $FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

X=0

else

X=$(($X+1))

fi

sleep 5

done

unset X

}

enforcer &