yashsingh1/xdaforums huggingface dataset:
[Xperia Z Original Android Development] iKillCypher:
for anyone still getting battery drainage let me guide you on how to remove this completely

1) Download KMV Latest ROM After 1/7 Build

2) Download -> http://www.androidfilehost.com/?fid=23501681358556552

PLAY SERVICES / PLAY GAMES UPDATER

Updates Google Play Services to v5.0.84 (1259630-03x)

and Google Play Games to v1.6.07 (1129543-3x)

3) Download -> http://www.androidfilehost.com/?fid=23501681358559742

Updated GApps

now go to recovery -> flash KMV first then gapps and then play services updates once done factory reset and clear cache and then reboot now you should noticed that battery drainage should be gone if you still noticed battery drainage check for other wakelock :) this should fix the annoying battery drainage once and for all

have fun

also thanks thomas :) finally had the time to update from 19/06
[Xperia Z Original Android Development] BrateloSlava:
No.
[Xperia Z Original Android Development] BrateloSlava:
Who are tried to set CPU voltage at this model via init.d script? Example, please.
[Xperia Z Original Android Development] Tommy-Geenexus:
The stock colours are horrible, the gamma is now way better, still not perfect.

Sent from my Xperia Z
[Xperia Z Original Android Development] thomas1991_12:
Its impossible to please everyone with one combination, but I agree this is much better then stock. Maybe a little bit less red would be even better, but no time to finetune it right now. If anyone else feels like it, you could always do a pull request.
[Xperia Z Original Android Development] BrateloSlava:
[MENTION=2228255]thomas1991_12[/MENTION]

1. I tried to set all settings through the script. View attachment 99_init.7z Intellithermal don't started via script, but TricksterMOD start it successfully... Why - I don't know... (If any part of the script needed - you can pick up.)

2. Try this patch - msm: fb: Little hack to allow the lowest brightness value to be as low as possible.
[Xperia Z Original Android Development] fards:
Hmm that's not a nice looking fb hack. Might cause serious issues with resume.

badly smell corrected from my xperia z
[Xperia Z Original Android Development] B14ck7hund3r:
233 blobs and patches? When did this happen?
[Xperia Z Original Android Development] BrateloSlava:
1. In script in this my post some lines need be removed. Otherwise, phone doesn't have deep sleep.

delete this:

stop adaptive
stop pnpmgr
stop thermald
stop system_monitor

2. Some patches:

- rcu: Precompute RCU_FAST_NO_HZ timer offsets

- power: quickwakeup: initial driver + msm: pm-8x60: add suspend_again handler

- PM: enable all sleep states

- ARM: topology: Add efficiency coefficient for Krait. However, it seems to me that the patch needs to install some more from this list.
[Xperia Z Original Android Development] heorung:
Why i cann't see intellithermal setting in Trickster Mod?
[Xperia Z Original Android Development] BrateloSlava:
Have you installed cm-11-20140709-UNOFFICIAL-yuga.zip?
[Xperia Z Original Android Development] heorung:
Oh sorry , I'm on 20140708 build :D
[Xperia Z Original Android Development] BrateloSlava:
How, then, this application reduces the brightness below the minimum? It turns out, that somehow it can be done.
[Xperia Z Original Android Development] BrateloSlava:
Some patches:

1. cpufreq: Introduce new relation for freq selection + cpufreq: interactive: this governor is fundamentally different from Ondemand

2. lz4: ensure length does not wrap + lz4: fix another possible overrun

3. qup_i2c: sync uo to this commit: myfluxi/kernel_msm@2950e68 + msm: rq_stats: sync up to this commit: myfluxi/kernel_msm@563589f
[Xperia Z Original Android Development] fards:
Lux uses an overlay.

The patch is likely to cause a loop where it can't resume
[Xperia Z Original Android Development] jpacho89:
Hello,

Need some help please. After updating to last nightly (09-07-2014) I got some issues:

-Home button doesn't work.

-Status bar is not working properly. It doesn't open quick settings panel when I scroll down from the right border, even with it enabled in settings. Doesn't work also with 2 fingers. It neither changes to quick settings panel, the icon doesn't work. Only can acces when I scroll from below to the right, and anyway settings icon doesn't work in quick settings panel.

-Power button options are activated from settings but they don't appear!! Only shut down, reboot and screenshot.

And the most amazing thing, I have tryed to revert back, but problems persist after flashing 08 or 07 build!! I have wiped cache, dalvik and system. I am on ART but other builds worked flawlesly. Do I have to wipe boot maybe?

Anyone suffering same problems???

Thanks!
[Xperia Z Original Android Development] BrateloSlava:
There is some way to reduce the minimum threshold brightness without using a third party application?
[Xperia Z Original Android Development] andyrubin1:
It seems the "breathing light" is lost after flashing this from stock?

I'm talking about the indicator light that fades in and out slowly effect.

Thanks in advance.
[Xperia Z Original Android Development] golfgtiedition30:
No such problems here. Clean install :)
[Xperia Z Original Android Development] Burag:
And by stock you mean stock CM11 (CM10.2?) or Sony's ROM?
[Xperia Z Original Android Development] Tommy-Geenexus:
[MENTION=2228255]thomas1991_12[/MENTION]

Here are some useful patches:

[v4] binfmt_elf.c: use get_random_int() to fix entropy depleting

msm: makefile: we don't need these in mako

qseecom: Remove debug messages
[Xperia Z Original Android Development] jpacho89:
Finally decided to wipe data and do a clean install. Everything is working fine again. Maybe I messed some files with file manager, don't know exactly what happened.

Anyway thanks, magnificent ROM again!
[Xperia Z Original Android Development] BrateloSlava:
I look at yesterday's patches (CyanogenMod/android_kernel_sony_apq8064). Some of them we need:

1. kgsl_pwrscale: Rework policy sysfs implementation

2. board-8064-gpu: Increase bus freq at lowest GPU frequency

3. cpufreq_conservative: Improve support for micro idle accounting

4. kgsl: Implement conservative scaling policy + kgsl: conservative: change perms to 664

I hope that the author will appear on the weekend time to please us with new release.

The current version of the kernel makes me happy with its performance and energy consumption. Currently confuse me just a few things. I have not found a way to reduce the power consumption of the screen. GPU often increases the frequency to the maximum. Probably need a more optimal and energy-saving GPU governor. Or - tuning existing.

My fixed variant of init.d script View attachment 99_init.7z with CPU undervolting. If any errors - you may remove it with View attachment 99remove-CWM.zip

Some screenshots of new settings parameter:

P.S.

I'm read topic Share your Undervolt settings & battery life and recommend it for reading.
[Xperia Z Original Android Development] andyrubin1:
Sony's ROM.
[Xperia Z Original Android Development] BrateloSlava:
Some update:

- intellidemand: cumulative updateis to version 5.5 (!!! requires adaptation of the frequencies for our phone !!!)

- intelli_plug: only apply suspend/resume logic if active
[Xperia Z Original Android Development] Tommy-Geenexus:
Latest build is running even faster, it seems the use of hardfloat gives some serious performance benefits.
[Xperia Z Original Android Development] thomas1991_12:
Those changes have yet to be included in the next build.
[Xperia Z Original Android Development] Tommy-Geenexus:
OK nice, then the next build will be even better.
[Xperia Z Original Android Development] aidfarh:
Just as I suspected, intelliplug screen off max frequency doesn't work. Here's how I tested:

Set the cpu governor to performance.

In adb shell, as root, run the following to set intelliplug screen off max frequency:

echo 702000 > /sys/module/intelli_plug/parameters/screen_off_max

Turn the screen off

in adb shell, run the following to check the cpu frequency:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Expected output is 702000. Instead, I'm getting 1512000, indicating that setting screen_off_max is not effective.

EDIT: I've made a hack to fix this: https://github.com/aidfarh/android_...mmit/ef3fe9767e39d4600729b91eef5afaa976bca565. Feel free to cherry-pick or maybe you can find a better way to fix this.
[Xperia Z Original Android Development] fards:
A lot of the problem is the panel on the xz seems to need high voltages to drive it. I never found the tech sheets for it,, so couldn't get timings etc,, as I wanted to experiment with lowering refresh rates. but from experiments some time ago it doesn't like lowered voltages. Which is a pity as it could save tons of battery
[Xperia Z Original Android Development] thomas1991_12:
Isnt performance governor designed to keep it at max? Dunno if intelliplug should overwrite that behaviour, on the build Ill upload today screen off times works fine with intellidemand and ondemand (havent tested anymore)
[Xperia Z Original Android Development] BrateloSlava:
[MENTION=2228255]thomas1991_12[/MENTION]

It would be very nice to add in kernel support the latest version of zram+zsmalloc from faux123.

( zram + zsmalloc )
[Xperia Z Original Android Development] iKillCypher:
how fast do you want the rom to be :cyclops:

it is already blazing fast from what I can tell over here :cowboy:

someone should make a boot animation xD this is pretty much a customized updated CM/AOSPA rom now
[Xperia Z Original Android Development] thatguy222:
Since this is a Sony kernel, can it be installed on a locked bootloader device? I currently use NUT'S dual recovery.
[Xperia Z Original Android Development] hutilicious:
this isnt a sony kernel and cant be installed on locked bootloader
[Xperia Z Original Android Development] AngelBob:
[MENTION=2228255]thomas1991_12[/MENTION]

Having a slight issue compiling your kernel:

In file included from kernel/sony/apq8064/include/linux/module.h:17:0,
from kernel/sony/apq8064/drivers/thermal/intelli/msm_thermal.c:20:
kernel/sony/apq8064/include/linux/moduleparam.h:19:28: fatal error: opening dependency file drivers/thermal/intelli/.msm_thermal.o.d: No such file or directory
#define ___module_cat(a,b) __mod_ ## a ## b
^
kernel/sony/apq8064/include/linux/moduleparam.h:20:27: note: in expansion of macro '___module_cat'
#define __module_cat(a,b) ___module_cat(a,b)
^
kernel/sony/apq8064/include/linux/moduleparam.h:29:10: note: in expansion of macro '__module_cat'
struct __module_cat(name,__LINE__) {}
^
kernel/sony/apq8064/include/linux/module.h:92:32: note: in expansion of macro '__MODULE_INFO'
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
^
kernel/sony/apq8064/include/linux/module.h:134:42: note: in expansion of macro 'MODULE_INFO'
#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
^
kernel/sony/apq8064/drivers/thermal/intelli/msm_thermal.c:606:1: note: in expansion of macro 'MODULE_DESCRIPTION'
MODULE_DESCRIPTION("originally from Qualcomm's open source repo");
^
compilation terminated.
make[4]: *** [drivers/thermal/intelli/msm_thermal.o] Error 1
make[3]: *** [drivers/thermal] Error 2
make[3]: *** Waiting for unfinished jobs...

Any idea?
[Xperia Z Original Android Development] thomas1991_12:
Delete kernel folder and resync, then try a: make mrproper in the kernel dir.
[Xperia Z Original Android Development] AngelBob:
Still the same error
[Xperia Z Original Android Development] ari197:
it's compiled with Sony's binary but it doesn't have Sony's digital signature .. so no, you can't use it with locked bootloader ..
[Xperia Z Original Android Development] thatguy222:
Thanks for clearing that up Hut and Ari.
[Xperia Z Original Android Development] langeveld024:
No, Sony kernel blobs and sources are used in his great custom kernel, but a custom kernel means unlock bootloader before flashing.

Otherwise device won't boot.

[edit]

Oh sorry didn't saw hut and ari's answers
[Xperia Z Original Android Development] aidfarh:
How do you test whether or not it's working with intellidemand and ondemand, since these two governors are not designed to keep the frequencies high?

---------- Post added at 06:23 AM ---------- Previous post was at 06:08 AM ----------

I'm also getting the same error when trying to compile the latest kernel. Tried the make mrproper thing and still didn't work. I'm wondering how Thomas does it. I ended up applying this hack to make it work: https://github.com/aidfarh/android_...mmit/1eefec3a07d5b6f99325d9896eca15cf4bf6b2d7
[Xperia Z Original Android Development] aidfarh:
Okay, I decided to do some testing. I set the cpu governor to intellidemand. Ran stability test to keep the cpu utilisation high and turned off the screen. In adb shell, polled the cpu frequency and it showed that the frequency still goes to 1512 MHz even though intelliplug screen_off_max is set to a lower value. Same deal with ondemand. So the conclusion is that intelliplug screen off max frequency doesn't work even with intellidemand and ondemand.
[Xperia Z Original Android Development] arkticwolf:
This is probably my first post in atleast 5 years.

I just want to say thank you to the authors of this software. Finally there is a stock experience on my XZ that's blindingly fast, and has the headphone jack working. I've tried about six other CM-flavoured ROMs and just couldn't get sound out of my headphones.

I literally cannot fault this, you deserve a beer or 15. :)

Cheers
[Xperia Z Original Android Development] Gustavo RD78:
Where can I find the source?
[Xperia Z Original Android Development] thomas1991_12:
github.com/daeiron - added to OP
[Xperia Z Original Android Development] Burag:
Is the intelli_plug enabled by default or do I need to take some extra steps to try it?
[Xperia Z Original Android Development] thomas1991_12:
I use the FauxClock app for everything, its an ideal app for all the functions in my kernel. You could enable it manually with;

echo "1" > /sys/module/intelli_plug/parameters/intelli_plug_active

You could make an init.d script to do it for you.
[Xperia Z Original Android Development] naitik2012:
any one tried latest CM11 12-07 ? any change log

Thanks :)
[Xperia Z Original Android Development] BrateloSlava:
Everything works. You can install and use.
[Xperia Z Original Android Development] BrateloSlava:
[MENTION=2228255]thomas1991_12[/MENTION]

I looked into the topic by the kernel for Z1.

1. Maybe we too should enable Kernel Same-page Merging support? (in config - Kernel features - Enable KSM for page merging)

2. sched: Set MC (multi-core) sched domain's busy_factor attribute to 1
[Xperia Z Original Android Development] Darren_J:
Can you add White balance function to your ROM?
[Xperia Z Original Android Development] naitik2012:
on latest CM11 navigation bar is fully transparent no more black shadow :D but status bar still have black shadow..
[Xperia Z Original Android Development] BrateloSlava:
[MENTION=2228255]thomas1991_12[/MENTION]

Strange. I synced the latest changes. When compiling an error:

CC arch/arm/mach-msm/acpuclock-krait.o
In file included from arch/arm/mach-msm/perf_trace_counters.h:163:0,
from arch/arm/mach-msm/perf_trace_counters.c:16:
include/trace/define_trace.h:79:43: fatal error: ./perf_trace_counters.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
scripts/Makefile.build:307: recipe for target 'arch/arm/mach-msm/perf_trace_counters.o' failed
make[1]: *** [arch/arm/mach-msm/perf_trace_counters.o] Error 1

I deleted the local project, synchronized project from scratch. The error persists.
[Xperia Z Original Android Development] thomas1991_12:
For the guys having build problems try this:

1. rm -rf kernel/sony/apq8064

2. cd kernel/sony/apq8064 && make mrproper

3. rm -rf out/target/product/yuga/obj/KERNEL_OBJ (or just a make clobber for everything)

4. repo sync and build

Should help, as I just tried a build from clobber and had no problems.
[Xperia Z Original Android Development] thomas1991_12:
Im not a big fan of zram and KSM usage, as they may reduce RAM usage a bit, but they will increase CPU usage. As we have plenty of RAM, I dont think we should use those.

ATM i am more interested in finding out if I can get the screen to use less battery, need to find some datasheets about the screen.
[Xperia Z Original Android Development] fards:
The sharp data sheets showed up here, but I've never been able to DL them

http://www.panelook.cn/LS050T1SX01_SHARP_5.0_LCM_overview_cn_17692.html

The other screen option is the JDC mdy70* (Jasper display company)
[Xperia Z Original Android Development] aidfarh:
Are you sure about this? Step 1 totally removes the apq8064 directory, so the cd in step 2 would not work.
[Xperia Z Original Android Development] thomas1991_12:
Oops sync first of course:silly:
[Xperia Z Original Android Development] BrateloSlava:
I think you will not be very difficult to add support for this technology. And use it or not - decides to let the end user.

Especially, because energy consumption is very large in this display, we will not be too much use energy with this zram technology.
[Xperia Z Original Android Development] lonixlon:
Not sure if it's possible, but an option to stop charging at 80% or 90% would be good for out batteries.
[Xperia Z Original Android Development] hutilicious:
this is a rumour
[Xperia Z Original Android Development] FakeSmile:
Xposed framework will work with this rom cause i miss the customizations?I used DU rom and i really like the customization options.
[Xperia Z Original Android Development] diabole:
Yes xposed worx very well on this rom

Skickat från min Xperia Z via Tapatalk
[Xperia Z Original Android Development] FakeSmile:
Which gapps to use with the 20140712 build?
[Xperia Z Original Android Development] BrateloSlava:
[GAPPS][4.4.x] OFFICIAL Up-to-Date PA-GOOGLE APPS (All ROM's) [2014-07-08]
[Xperia Z Original Android Development] hadramos:
sorry but i have always a problem with battery drain :(

(I have followed the #477 post)
[Xperia Z Original Android Development] ZeRoWaR:
Me too, also tried the above and played around with it, but still heavy drainage, i can't activate high precision or my battery dies in 2 hours!
[Xperia Z Original Android Development] BrateloSlava:
Without disabling synchronization and positioning unlikely you will be able to achieve positive results in energy saving battery.
[Xperia Z Original Android Development] hadramos:
It is impossible to do that! No synchro and no precision, why use my smartphone:)

Please one solution ? or change custom ROM ?
[Xperia Z Original Android Development] heihei_ivan:
I also have huge battery drain with Google Play Services and I'm on the version CM11 20140711

With Wakelock Detector it shows that the culprits are NlpWakelock and NlpCollectorWakelock, and finally I found out this post: http://xdaforums.com/showthread.php?t=2453850

Following this post I downloaded Wakelock Terminator, and used it to prevent Google Play Services to create wakelocks, and specifically disallowed NlpCollectorWakelock.

After doing so my phone is able to get into deep sleep (at least for these two hours), that post claimed this configuration wouldn't affect user experience of location-based services such as Google Maps but it is yet to be confirmed.

(I just did this change two hours ago and it would need more time for me to confirm this is a real temporary workaround such that battery drain does not re-occur)
[Xperia Z Original Android Development] BrateloSlava:
1. All necessary actions to me I perform manually.

2. Wait for an updated version of the Google Play.
[Xperia Z Original Android Development] hadramos:
Very thanks i will test..

---------- Post added at 12:07 PM ---------- Previous post was at 12:06 PM ----------

What are your action manually?
[Xperia Z Original Android Development] BrateloSlava:
For example, synchronize contacts. Turned on wi-fi and manually synchronize. And I use an alternative widget to see the weather (Digital clock & world weather).
[Xperia Z Original Android Development] buche23:
Shift in Battery drin

Hi guys,

I also do experience the battery drain, but according to BBS it's not the partial kernel wakelock caused by google play, but the PowerManagerService.WakeLocks

I formated sytem, reinstalled 07-11 version and the newest GAPPS, if anyone cares.

I noticed today that the phone heated up right after I made a call (and therefore my data connection dropped) at 16:48.

The only error I saw in my log was the following

07-15 16:49:29.261 E/kickstart(930): ERROR: function: start_sahara_based_transfer:260 IMEI reserved0 = 494d4549
07-15 16:49:29.261 E/kickstart(930): ERROR: function: start_sahara_based_transfer:261 IMEI reserved1 = 35977505
07-15 16:49:29.261 E/kickstart(930): ERROR: function: start_sahara_based_transfer:262 IMEI reserved2 = 22352010
07-15 16:49:29.261 E/kickstart(930): ERROR: function: use_wakelock:550 Failed to open wake lock file /sys/power/wake_lock: Permission denied
07-15 16:49:29.391 E/kickstart(930): Received file "/dev/block/platform/msm_sdcc.1/by-name/m9kefs1"
07-15 16:49:29.391 E/kickstart(930): 786432 bytes transferred in 0.129s (5.81 MBps)
07-15 16:49:29.391 E/kickstart(930): Successfully downloaded files from target
07-15 16:49:29.391 E/kickstart(930): ERROR: function: use_wakelock:550 Failed to open wake lock file /sys/power/wake_unlock: Permission denied
07-15 16:49:29.401 E/kickstart(930): Sahara protocol completed

Complete log attached. Maybe this is usefull to anyone with better coding skills.

EDIT: Haha, just found this on BBS Help Page:

The PowerManagerService wakelock

This wakelock shows as a sum of the partial wakelocks on many phones. If this wakelock is #1 go to the Partial Wakelocks to find out more.

So I guess I'm back to square 1...
[Xperia Z Original Android Development] heihei_ivan:
I just went jogging with Runtastic, and high accuracy location was turned on, everything was fine, the location was precise. Google Maps was also working.

And this gives me another ache. Google Play Services re-appeared at the top of battery usage. This time the wakelock involved is NlpWakelock. But I also realised that I forgot to turn high accuracy location off after using Runtastic. So now I turned location settings back to battery saving and add NlpWakelock to Wakelock Terminator. And I am wishing the battery drain to go away :(

My phone has the latest Google Play Services installed.. but in the Nexus 5 forum I saw other people saying this version resolved the problem.. Now I'm doubting if it's Sony's fault instead of Google Play Services. As I remember when I was on official CM11 this problem didn't exist, or at least not obvious.

UPDATE:

I'm just a user that knows how to root and flash a new ROM, but this issue is forcing me to learn something new.. When I use dumpsys power to investigate a bit closer. And what I got was:

Wake Locks: size=2
PARTIAL_WAKE_LOCK 'NlpWakeLock' (uid=10023, pid=1771, ws=WorkSource{10184 com.runtastic.android.pro2})
PARTIAL_WAKE_LOCK 'NlpWakeLock' (uid=10023, pid=1771, ws=null)

Interesting stuff. Runtastic has a NlpWakeLock (does this mean that?) And from uid and pid I guess these two wakelocks are created by it too. And on Stackoverflow I saw someone saying Android does not terminate wakelocks itself but the processes have to do so before they shuts down. What's more strange is that I could not force Runtastic to stop LOL so I rebooted the phone

After rebooting, dumpsys power gives this. MediaScannerService has not been blamed in anywhere else so I ignore it for now. Seeing no other NLP wakelock now, so I can go for sleep, at least not having to worry my phone would consumer more energy than the charger provides. LOL

Wake Locks: size=1
PARTIAL_WAKE_LOCK 'MediaScannerService' (uid=10006, pid=2567, ws=null)

UPDATE 2

Phone seems to be able to go into deep sleep after rebooting. Good to see this before sleeping. Good night world.
[Xperia Z Original Android Development] golfgtiedition30:
For battery drain , disable Google location services. Also make sure you are using the very latest gapps. Seems to work for me :)