05-30-2023, 11:59 AM
my views starts to be final at this point, unless something new comes up.
i start to recommend permanent fixes for distributions, until we know more.
basically, there is powersaving bug, which affect all pinephones, which is more difficult replicate. there is frequency change bug, which is easier to replicate, but some of the pinephones are affected. probably related to manufactiring series.
and warning, there are similar bugs, which may or may not have similar side-effects. some cases those can be circumvented by following kernel parameter. these bugs may be caused by excessive ram usage.
easy copy-paste
command, which shows stuff.
i start to recommend permanent fixes for distributions, until we know more.
basically, there is powersaving bug, which affect all pinephones, which is more difficult replicate. there is frequency change bug, which is easier to replicate, but some of the pinephones are affected. probably related to manufactiring series.
and warning, there are similar bugs, which may or may not have similar side-effects. some cases those can be circumvented by following kernel parameter. these bugs may be caused by excessive ram usage.
Code:
# kernel parameter
lima.sched_timeout_ms=3000
easy copy-paste
Code:
## file location example
## /lib/udev/rules.d/98-prevent-flipping-frames-bug.rules
## prevents powersaving of flipping frames bug
KERNEL=="1c40000.gpu", SUBSYSTEM=="platform", DRIVER=="lima", ATTR{power/autosuspend_delay_ms}="-1"
KERNEL=="1c40000.gpu", SUBSYSTEM=="platform", DRIVER=="lima", ATTR{power/control}="on"
## prevents frequency change of flipping frames bug
KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{min_freq}="432000000"
KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{max_freq}="432000000"
KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{target_freq}="432000000"
## may open new bugs, kernel parameter lima.sched_timeout_ms=3000 may be needed.
#KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{min_freq}="120000000"
#KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{max_freq}="120000000"
#KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{target_freq}="120000000"
## may open new bugs, kernel parameter lima.sched_timeout_ms=3000 may be needed.
#KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{min_freq}="312000000"
#KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{max_freq}="312000000"
#KERNEL=="1c40000.gpu", SUBSYSTEM=="devfreq", ATTR{target_freq}="312000000"
## prevents modem disapearrings and disconnections.
#ACTION!="add", GOTO="eg25_end-edit"
#SUBSYSTEM!="usb", GOTO="eg25_end-edit"
#DRIVER!="usb", GOTO="eg25_end-edit"
#ENV{DEVTYPE}!="usb_device", GOTO="eg25_end-edit"
#
## NOT Default attributes values
#ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{power/control}="on"
#ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{power/autosuspend_delay_ms}="3000"
#ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{power/wakeup}="enabled"
#ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{power/persist}="0"
#
## for pinepohne pro
##ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", ATTR{power/persist}="0"
#
#LABEL="eg25_end-edit"
## end of modem preventions
command, which shows stuff.
Code:
# showing some parameters
echo cat /sys/class/devfreq/1c40000.gpu/trans_stat
cat /sys/class/devfreq/1c40000.gpu/trans_stat
echo cat /sys/class/devfreq/1c40000.gpu/min_freq
cat /sys/class/devfreq/1c40000.gpu/min_freq
echo cat /sys/class/devfreq/1c40000.gpu/max_freq
cat /sys/class/devfreq/1c40000.gpu/max_freq
echo cat /sys/devices/platform/soc/1c40000.gpu/power/autosuspend_delay_ms
cat /sys/devices/platform/soc/1c40000.gpu/power/autosuspend_delay_ms
echo cat /sys/devices/platform/soc/1c40000.gpu/power/control
cat /sys/devices/platform/soc/1c40000.gpu/power/control
echo cat /sys/devices/platform/soc/1c40000.gpu/power/runtime_suspended_time
cat /sys/devices/platform/soc/1c40000.gpu/power/runtime_suspended_time
echo cat /sys/module/lima/parameters/sched_timeout_ms
cat /sys/module/lima/parameters/sched_timeout_ms