[Sony Xperia ZL] Bazoocaze:
Hi,

I installed the latest version, 20150730, it's very stable. The device is a Sony Xperia ZL C6503.

I noted the following minor issues:

- Missing conversative governor

- Missing Performance menu entry in Settings

- Cell standby radio drain issue

Problem: GPU clock, stuck at 200MHz

There is also a problem with the GPU clock, stuck at 200MHz. I found that the thermanager service is incorrectly tripping and setting the GPU max clock to 200MHz. I also found in the logcat that thermanager is tripping for a system shutdown (but the shutdown is not working!).

The logcat keeps showing the following:

W/thermanager(26988): failed to attach resource "lm3533-bl" [sysfs], ignoring
W/thermanager(26988): failed to attach resource "cpu1" [sysfs], ignoring
W/thermanager(26988): failed to attach resource "cpu2" [sysfs], ignoring
W/thermanager(26988): failed to attach resource "cpu3" [sysfs], ignoring
I/thermanager(26988): preparation of resource "backlight" failed, removing
I/thermanager(26988): "shutdown" set to level 0
I/thermanager(26988): "shutdown" set to level 1
I/thermanager(26988): will halt in 5 seconds
I/thermanager(26988): "charging" set to level 0
I/thermanager(26988): "usb" set to level 0
I/thermanager(26988): "backlight" set to level 0
I/thermanager(26988): "gpu" set to level 1
I/thermanager(26988): "modem" set to level 1
I/thermanager(26988): modem: 1
I/thermanager(26988): "cpu" set to level 0
I/thermanager(26988): halting
W/thermanager(26992): failed to attach resource "lm3533-bl" [sysfs], ignoring
W/thermanager(26992): failed to attach resource "cpu1" [sysfs], ignoring
W/thermanager(26992): failed to attach resource "cpu2" [sysfs], ignoring
W/thermanager(26992): failed to attach resource "cpu3" [sysfs], ignoring
I/thermanager(26992): preparation of resource "backlight" failed, removing
I/thermanager(26992): "shutdown" set to level 0
I/thermanager(26992): "shutdown" set to level 1
I/thermanager(26992): will halt in 5 seconds
I/thermanager(26992): "charging" set to level 0
I/thermanager(26992): "usb" set to level 0
I/thermanager(26992): "backlight" set to level 0
I/thermanager(26992): "gpu" set to level 1
I/thermanager(26992): "modem" set to level 1
I/thermanager(26992): modem: 1
I/thermanager(26992): "cpu" set to level 0
I/thermanager(26992): halting

You can note that thermanager is restarting every 5 seconds. The line "gpu" set to level 1 indicates that the service capped the max clock for the GPU.

Analysing the temperature sensor values, I found this:

File /system/etc/thermanager.xml
...
<resource name="kgsl-3d0" type="sysfs">/sys/class/kgsl/kgsl-3d0/max_gpuclk</resource>
<resource name="temp-pba" type="msm-adc">/sys/bus/platform/devices/pm8xxx-adc/pba_therm</resource>
...
<control name="gpu">
<mitigation level="off"><value resource="gpu">400000000</value></mitigation>
<mitigation level="1"><value resource="gpu">200000000</value></mitigation>
</control>
...
<!-- GPU and modem -->
<configuration [COLOR="Red"]sensor="temp-pba"[/COLOR]>
<threshold>
<mitigation name="gpu" level="off" />
<mitigation name="modem" level="off" />
</threshold>
<threshold [COLOR="Red"]trigger="62"[/COLOR] clear="60">
[COLOR="Red"]<mitigation name="gpu" level="1" />[/COLOR]
<mitigation name="modem" level="1" />
</threshold>
</configuration>
...

|root@odin:/sys/devices/platform/msm_ssbi.0/pm8921-core/pm8xxx-adc # grep '.' *
125v:Result:1250098 Raw:37594
625mv:Result:626863 Raw:31240
apq_therm:Result:31 Raw:32699
batt_id:Result:0 Raw:24840
batt_therm:Result:267 Raw:34833
bl_therm:Result:4294967295 Raw:24839
chg_temp:Result:613525 Raw:31104
dcin:Result:20010 Raw:24883
ibat:Result:1740917 Raw:42598
ichg:Result:0 Raw:24840
microamps_requested_pm8xxx-adc-apq_therm:0
microamps_requested_pm8xxx-adc-pa_therm:0
modalias:platform:pm8xxx-adc
[COLOR="Red"]pba_therm:Result:125 Raw:24847[/COLOR]
pmic_therm:Result:35122 Raw:31135
rf_id:Result:0 Raw:24838
uevent:DRIVER=pm8xxx-adc
uevent:MODALIAS=platform:pm8xxx-adc
usbin:Result:4654344 Raw:36712
vbat:Result:4026894 Raw:38534
vcoin:Result:3180024 Raw:35656
vph_pwr:Result:4048962 Raw:38609

So the configuration says that a temperature reading greater than 62 in pba_therm will trip the 200MHz max clock in GPU. But the problems is pba_therm is stuck at the 125 reading. I have done severall test to see if pba_therm changes (gaming, browsing, deep sleep), but the value is solid rock stuck at 125, too.

Anyway, the pba_therm sensor is also tripping the temp-core configuration, which will halt/shutdown the system and keep thermanager restarting.

That is it for now. I will continue to debug this issue. I will try to see if the most recent stock firmware version countains valid thermanager.xml configuration to help reconfigure this misconfiguration.

Thank you for your work,