yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device General] munjeni:
Yes definitelly! camera.qcom.so is definitelly our sony camera hal. :) It uses libexcal and libcacao to make hal. Sadly I spent two days working on wrong hal until I found today that things is not the same like on stock rom about camera but I have used stock kernel + stock blobs (stupid camera.msm8974.so), something was strange in logcat and I was suspicious that I'm using wrong hal :D
[Sony Cross-Device General] rcstar6696:
Ask Alin and chirayu :) but it sounds you know all so do it like you want

I don't want to waste my time here
[Sony Cross-Device General] Swidilator:
Forgive my ignorance on the matter, but what's the reason we don't use camera HALs from later versions of android, such as 6.0.1?
[Sony Cross-Device General] SuperLamic:
Because munjeni has amami (z1c) which doesn't have 6.0.1 stock.
[Sony Cross-Device General] tomascus:
Oh damn my apologies, looks like Sony really did put a random lib for no reason.

Im just thinking what would happen if we partially rewrite the camera HAL to use "stock Android" implementations of post processing and camera view, since that could enable us to avoid relying on cacao and cald completely.

Does the 1.3.3 branch implementation with open source camera also do this? Or are the Sony libs still present ?

---------- Post added at 12:11 PM ---------- Previous post was at 11:21 AM ----------

@SuperLamic, btw it's [MENTION=6979267]nailyk[/MENTION] 's IRC channel, not mine
[Sony Cross-Device General] mkdmc:
[MENTION=4120742]munjeni[/MENTION]

Check your pm

Let's start porting stock camera hal to aosp!
[Sony Cross-Device General] munjeni:
otg_irq is missing in drivers/usb/phy/phy-msm-usb.c

diff --git a/arch/arm/boot/dts/qcom/msm8974.dtsi b/arch/arm/boot/dts/qcom/msm8974.dtsi
index cddb983..f7213c2 100644
--- a/arch/arm/boot/dts/qcom/msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom/msm8974.dtsi
@@ -1790,7 +1790,8 @@
compatible = "synopsys,dwc3";
reg = <0xf9200000 0xfc000>;
interrupt-parent = <&intc>;
- interrupts = <0 131 0>;
+ interrupts = <0 131 0>, <0 179 0>;
+ interrupt-names = "irq", "otg_irq";
usb-phy = <&hsphy>, <&ssphy>;
tx-fifo-resize;
};
diff --git a/drivers/usb/phy/class-dual-role.c b/drivers/usb/phy/class-dual-role.c
index ce889dd..51fcb54 100644
--- a/drivers/usb/phy/class-dual-role.c
+++ b/drivers/usb/phy/class-dual-role.c
@@ -86,7 +86,7 @@ void dual_role_instance_changed(struct dual_role_phy_instance *dual_role)
pm_wakeup_event(&dual_role->dev, DUAL_ROLE_NOTIFICATION_TIMEOUT);
schedule_work(&dual_role->changed_work);
}
-EXPORT_SYMBOL_GPL(dual_role_instance_changed)
+EXPORT_SYMBOL_GPL(dual_role_instance_changed);

int dual_role_get_property(struct dual_role_phy_instance *dual_role,
enum dual_role_property prop,
[Sony Cross-Device General] davidteri91:
https://github.com/sonyxperiadev/kernel/commit/3105938e83c1d92f4d73f03182f60ffda52c5bfa
[Sony Cross-Device General] rcstar6696:
Charging fix

here is the charging fix it works on castor_windy and sirius

https://github.com/rcstar6696/kernel/commit/5d02b3928dac6f29d4aca58a166728b2be57a4b5
[Sony Cross-Device General] drakonizer:
Can confirm that it doesn't work on honami. Attached screenshots taken while phone plugged in.
[Sony Cross-Device General] davidteri91:
working for me ... I have Honami
[Sony Cross-Device General] rcstar6696:
Wait then is your bug a diffrent one my device chaeges everytime but when i unplug it it shows charging
[Sony Cross-Device General] munjeni:
Yes! No more deadlocks after switching from ac charger to pc usb port! Great!! We have one remaining thing to fix: charging on pc usb port is detected as a ac charging!
[Sony Cross-Device General] rcstar6696:
Is that something bad?
[Sony Cross-Device General] brickhayabusa:
[MENTION=5621191]rcstar6696[/MENTION] Yeah i think because the pc doesn't recognize the device.?
[Sony Cross-Device General] munjeni:
Not bad but it need to be detected as a usb source instead of ac source :)
[Sony Cross-Device General] drakonizer:
But right now, things have sort of inverted. When I plug in once, charger is detected and all is fine. But when I unplug and plug in again, the charging icon doesn't change, and throughout Android, there is a sort of mixed reaction to the input. For example, Battery saver says it can't turn on because the device is charging, but the battery settings itself does not say the device is charging.

I suppose this can be called an improvement, but not a complete fix. Don't get me wrong, I appreciate your work greatly. I am just sharing my findings.
[Sony Cross-Device General] munjeni:
On amami everything is right expect charging source detection (its always detected as a ac charger). Did you enabled CONFIG_SONY_USB_EXTENSIONS=y in defconfig? I have enabled it!
[Sony Cross-Device General] drakonizer:
I will try that and get back to you.
[Sony Cross-Device General] munjeni:
I have done some things, pc usb source is now detected but ac charger is not working now

diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c
index 3c3fec6..a8e6005 100644
--- a/drivers/usb/dwc3/dwc3-msm.c
+++ b/drivers/usb/dwc3/dwc3-msm.c
@@ -1642,15 +1642,19 @@ get_prop_proprietary_charger(struct dwc3_msm *mdwc)
dp = get_prop_usb_dp_voltage_now(mdwc);
if (IS_ERR_VALUE(dp)) {
dev_err(mdwc->dev, "%s: read D+ voltage fail\n", __func__);
- return dp;
+ //return dp;
}

dm = get_prop_usb_dm_voltage_now(mdwc);
if (IS_ERR_VALUE(dm)) {
dev_err(mdwc->dev, "%s: read D- voltage fail\n", __func__);
- return dm;
+ //return dm;
}

+ // msm8974 don't uses qpnp-smbcharger so let make default charging sourc to DWC3_SDP_CHARGER
+ if (IS_ERR_VALUE(dp) && IS_ERR_VALUE(dm))
+ return DWC3_SDP_CHARGER;
+
ret = DWC3_INVALID_CHARGER;
for (i = 0; i < (sizeof(chgs) / sizeof(chgs[0])); i++) {
if (IN_RANGE(dp, chgs[i].dp.hi, chgs[i].dp.lo) &&

We don't have this even after enabling CONFIG_QPNP_SMBCHARGER:

get_prop_usb_dp_voltage_now

get_prop_usb_dm_voltage_now

We need to investigate on that! For example we can do that by looking into usb current?
[Sony Cross-Device General] munjeni:
How we can determine diferencie between usb and ac source?? Maybe something like this?

diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c
index 3c3fec6..46bcde3 100644
--- a/drivers/usb/dwc3/dwc3-msm.c
+++ b/drivers/usb/dwc3/dwc3-msm.c
@@ -1642,13 +1642,23 @@ get_prop_proprietary_charger(struct dwc3_msm *mdwc)
dp = get_prop_usb_dp_voltage_now(mdwc);
if (IS_ERR_VALUE(dp)) {
dev_err(mdwc->dev, "%s: read D+ voltage fail\n", __func__);
- return dp;
+ //return dp;
}

dm = get_prop_usb_dm_voltage_now(mdwc);
if (IS_ERR_VALUE(dm)) {
dev_err(mdwc->dev, "%s: read D- voltage fail\n", __func__);
- return dm;
+ //return dm;
+ }
+
+ // msm8974 don't uses qpnp-smbcharger but we can determine diferencie between ac and usb with this??
+ if (IS_ERR_VALUE(dp) && IS_ERR_VALUE(dm)) {
+ if (dwc3_chg_det_check_output(mdwc)) {
+ return DWC3_SDP_CHARGER;
+ } else {
+ ret = DWC3_INVALID_CHARGER;
+ goto chgout;
+ }
}

ret = DWC3_INVALID_CHARGER;
@@ -1662,6 +1672,7 @@ get_prop_proprietary_charger(struct dwc3_msm *mdwc)
}
}

+chgout:
if (ret == DWC3_INVALID_CHARGER) {
dev_warn(mdwc->dev, "%s: voltage not in range, D+=%d, D-=%d\n",
__func__, dp, dm);
@@ -1771,10 +1782,11 @@ static void dwc3_chg_detect_work(struct work_struct *w)
mdwc->ext_chg_active = true;
}
}
- dev_dbg(mdwc->dev, "chg_type = %s\n",
+ printk("chg_type = %s\n",
chg_to_string(mdwc->charger.chg_type));
mdwc->charger.notify_detection_complete(mdwc->otg_xceiv->otg,
&mdwc->charger);
+ return;
default:
pm_runtime_put_sync(mdwc->dev);
return;
@@ -2756,7 +2768,7 @@ static int dwc3_msm_power_set_property_usb(struct power_supply *psy,
if (mdwc->charger.chg_type != DWC3_INVALID_CHARGER)
mdwc->chg_state = USB_CHG_STATE_DETECTED;

- dev_dbg(mdwc->dev, "%s: charger type: %s\n", __func__,
+ printk("%s: charger type: %s\n", __func__,
chg_to_string(mdwc->charger.chg_type));
break;
case POWER_SUPPLY_PROP_HEALTH:
[Sony Cross-Device General] munjeni:
On qpnp ac is propertly deteced but still failed on pc usb source type detection;

amami:/ # dmesg | grep qpnp_chg_rb_work
[ 124.670453] qpnp_chg_rb_work: stopping worker usb/dc disconnecteddwc3_msm_power_set_property_usb: charger type: USB_PROPRIETARY_CHARGER
[ 133.190687] qpnp_chg_rb_work: stopping worker usb/dc disconnecteddwc3_msm_power_set_property_usb: charger type: USB_CDP_CHARGER
[ 593.700459] qpnp_chg_rb_work: stopping worker usb/dc disconnecteddwc3_msm_power_set_property_usb: charger type: USB_PROPRIETARY_CHARGER
[ 606.940498] qpnp_chg_rb_work: stopping worker usb/dc disconnecteddwc3_msm_power_set_property_usb: charger type: USB_CDP_CHARGER
amami:/ #

it must be detected as USB_SDP_CHARGER
[Sony Cross-Device General] rcstar6696:
This must be a rhine specific issue shinano works here after unplug it get reorganized correct
[Sony Cross-Device General] munjeni:
PC recognises device perfectly if you build with CONFIG_SONY_USB_EXTENSIONS=y! But charging source on device is always AC while on pc usb!

Why this always gets 0??

dwc3_msm_read_reg(mdwc->base, CHARGING_DET_OUTPUT_REG)

is this wrong?

#define QSCRATCH_REG_OFFSET	(0x000F8800)

#define CHARGING_DET_OUTPUT_REG	(QSCRATCH_REG_OFFSET + 0x1C)

Edit:

probably we can't use right CONFIG_SONY_USB_EXTENSIONS, in most case not rhine compatible? Getting a mhl will be a nightmare without using CONFIG_SONY_USB_EXTENSIONS :)
[Sony Cross-Device General] munjeni:
I think this can be fixed now:

amami:/ # dmesg | grep DDDD
[ 7.008035] dwc3_chg_check_dcd, DDDD=2
[ 7.009268] get_prop_proprietary_charger, DDDD=0
[ 7.009273] dwc3_chg_det_check_linestate, DDDD=0
[ 7.058029] dwc3_chg_det_check_output, DDDD=1
[ 7.138032] dwc3_chg_det_check_output, DDDD=0
[ 38.758389] qpnp_chg_rb_work: stopping worker usb/dc disconnecteddwc3_chg_check_dcd, DDDD=2
[ 46.534000] get_prop_proprietary_charger, DDDD=0
[ 46.542323] dwc3_chg_det_check_linestate, DDDD=0
[ 46.588137] dwc3_chg_det_check_output, DDDD=1
[ 46.668074] dwc3_chg_det_check_output, DDDD=1
[ 55.108114] qpnp_chg_rb_work: stopping worker usb/dc disconnecteddwc3_chg_check_dcd, DDDD=2
[ 57.823583] get_prop_proprietary_charger, DDDD=0
[ 57.832178] dwc3_chg_det_check_linestate, DDDD=0
[ 57.878053] dwc3_chg_det_check_output, DDDD=1
[ 57.958049] dwc3_chg_det_check_output, DDDD=0
[ 137.524014] dwc3_chg_check_dcd, DDDD=2
[ 137.539686] get_prop_proprietary_charger, DDDD=0
[ 137.549559] dwc3_chg_det_check_linestate, DDDD=0
[ 137.598579] dwc3_chg_det_check_output, DDDD=1
[ 137.678460] dwc3_chg_det_check_output, DDDD=0
[ 166.918189] qpnp_chg_rb_work: stopping worker usb/dc disconnecteddwc3_chg_check_dcd, DDDD=2
[ 170.745164] get_prop_proprietary_charger, DDDD=0
[ 170.753488] dwc3_chg_det_check_linestate, DDDD=0
[COLOR="Red"][ 170.798437] dwc3_chg_det_check_output, DDDD=1
[ 170.878447] dwc3_chg_det_check_output, DDDD=1[/COLOR]
[ 180.008538] dwc3_chg_check_dcd, DDDD=2
[ 180.024209] get_prop_proprietary_charger, DDDD=0
[ 180.033305] dwc3_chg_det_check_linestate, DDDD=0
[ 180.078688] dwc3_chg_det_check_output, DDDD=1
[ 180.158627] dwc3_chg_det_check_output, DDDD=0

red code says 2 x DDDD=1 which mean it detect AC or USB, bug lives in some things which calls that dwc3_chg_det_check_output in dwc3_msm.c
[Sony Cross-Device General] :
Possibly this?

https://github.com/sonyxperiadev/ke....3.3_rb2.14/drivers/usb/dwc3/dwc3-msm.c#L1685

This is the only difference in the function calling dwc3_chg_det_check_output

Also, this call is what was skipped with the latest usb fix:

https://github.com/sonyxperiadev/kernel/commit/b27cb0a9d95e7295104cf5499c2da01703c4c0de
[Sony Cross-Device General] munjeni:
Got it! See post above! \0/ Don;t know if workaround breaks other platform but for msm8974 chagin source detection is fixed!

For msm8974 CONFIG_SONY_USB_EXTENSIONS=y must be in buildprop!
[Sony Cross-Device General] m0d:
Sony Aosp defconfig already have it set for shinano platform!

https://github.com/sonyxperiadev/kernel/tree/aosp/LA.BR.1.3.3_rb2.14/arch/arm/configs
[Sony Cross-Device General] munjeni:
rhine not :)
[Sony Cross-Device General] davidteri91:
as I know CONFIG_SONY_USB_EXTENSIONS is not needed by rhine .... only shinano and 8994
[Sony Cross-Device General] munjeni:
Yes I know but things is totaly broken when build without that, for example "stay awake" not working, wakeup screen not working, after changing from ac to usb usb is no more working...etc, anyway stock rom allready have things from CONFIG_SONY_USB_EXTENSIONS things so there is no reason why rhine platform can't use that (it will need for mhl)
[Sony Cross-Device General] davidteri91:
I don't know what kind of problems are you having since my honami works

it is recognized when chanrging from AC charger and charging from USB

https://drive.google.com/file/d/0B-e5eQvKq2t2WWE2aWhwYzcwUE0/view
[Sony Cross-Device General] drakonizer:
Looks like something is wrong with your diff file, I cannot seem to apply it.
[Sony Cross-Device General] nailyk:
I tried to apply it to change the goto part and have the same result:

nailyk@rimmon5 :) % patch -p1 --dry-run < /tmp/charger.patch ~/cyanogen/14.1/kernel/sony/msm
checking file drivers/usb/dwc3/dwc3-msm.c
Hunk #1 succeeded at 1504 with fuzz 1.
Hunk #2 FAILED at 1514.
Hunk #3 FAILED at 1644.
Hunk #4 FAILED at 1664.
Hunk #5 FAILED at 1693.
Hunk #6 FAILED at 1729.
Hunk #7 FAILED at 1753.
Hunk #8 FAILED at 1773.
Hunk #9 FAILED at 2758.
8 out of 9 hunks FAILED

weirder part is if you look at the code to find why patch wont apply there is no reason. I guess munjeni editor replace tab by spaces or something like this (that why only the first line succeed). Anyway it is applicable 'by hand'.
[Sony Cross-Device General] drakonizer:
EXACTLY. I applied the patch by hand too (lucky for us it isn't too big). Let's see how it works :P
[Sony Cross-Device General] nailyk:
You where too fast for me! I wasn't able to find the right way before you manually applied it:

nailyk@rimmon5 :) % unexpand -t 8 /tmp/charger.patch | patch -p1 --dry-run ~/cyanogen/14.1/kernel/sony/msm
checking file drivers/usb/dwc3/dwc3-msm.c
Hunk #8 FAILED at 1796.
Hunk #9 succeeded at 2782 (offset 1 line).
1 out of 9 hunks FAILED
[Sony Cross-Device General] munjeni:
In case you have not enabled CONFIG_SONY_USB_EXTENSIONS (I am in hope you not enabled them) , try to connect phone to ac charger and than connect phone back to usb, adb and things will not work anymore!
[Sony Cross-Device General] davidteri91:
already did and as I said you that flag is not needed by rhine
[Sony Cross-Device General] munjeni:
This is a new clean patch (use it in case you aplied https://github.com/sonyxperiadev/kernel/commit/b27cb0a9d95e7295104cf5499c2da01703c4c0de), and also you must add CONFIG_SONY_USB_EXTENSIONS in your defconfig if it not exist.

But WTH is going on with ac/usb detection, for example if I not apply my workaround booth ac and usb is detected as a ac charger, booth sources works but phone say ac charger on booth source, but if I not apply patch only usb detection works but ac charger not works in any way! Anybody have idea whats going on? Last time when I tried previous patch it worked one time on ac, seccond time when I tried only usb worked, ac not worked anymore.
[Sony Cross-Device General] munjeni:
Which flag? On my pc if I not enable CONFIG_SONY_USB_EXTENSIONS usb not working anymore if I connect phone from ac charger to pc usb! My pc is 6 months old, probably its something related to pc usb v3 but I can confirm that things! Lets see what other guys says about things. For me its not working without CONFIG_SONY_USB_EXTENSIONS.
[Sony Cross-Device General] munjeni:
I am sorry for making confusion here, but please let colect things, please everybody who testing usb things please give your feedback! For example:

First of all make git sync with sonyxperiadev kernel tree, you must do that first.

1. build kernel without any patch and without CONFIG_SONY_USB_EXTENSIONS, whats going on on your PC if you connect phone firstly to the AC charger and than connect them to the PC usb port, is adb and things working? For me its not working.

2. enable CONFIG_SONY_USB_EXTENSIONS in your defconfig and make another kernel build, whats going on when you connect phone to ac and than connect to usb? For me everything is working except that while on pc usb phone reports charging source as ac.

3. enable CONFIG_SONY_USB_EXTENSIONS and apply my patch, whats going on when you connect phone to ac and then connect to pc usb? For me phone now after connecting to ac and then to pc usb port is working and also charging source is now propertly detected as a usb charger. But from some to me unbeliewable and unknown reason ac charger is no more working! This is a patch which breaks ac from an unknown reason or I am soo stupid to find a reason http://xdaforums.com/showpost.php?p=69382475&postcount=416 . Without that patch booth charging source is working but pc usb port makes phone think that ac source is connected. With patch pc usb is working and also charging source is propertly detected as a usb charging source but while on ac charger charging is not working. WTH
[Sony Cross-Device General] drakonizer:
I tried your patch and it's working fine, without any issues like you said. AC to USB and USB to AC transfers have no bugs. I tried it a couple of times, and so far, things are well. I have CONFIG_SONY_USB_EXTENSIONS enabled by the way
[Sony Cross-Device General] dex87xda:
https://www.youtube.com/watch?v=rpJClz4dAPg

WOW
[Sony Cross-Device General] Masterblop:
New blobs: http://dl-developer.sonymobile.com/eula/SW_binaries_for_Xperia_AOSP_M_MR1_v05_EULA.html
[Sony Cross-Device General] [Fenix]:
Well it states Xperia X, Z5 and Z4 tablet. Nothing good for our devices lol

Still hoping :laugh:
[Sony Cross-Device General] munjeni:
Ac charger working? All things ok like while on pc it displays usb charging, while on ac ac charging?
[Sony Cross-Device General] jerpelea:
your camera now has proper preview and i will calibrate AF for v6 release
[Sony Cross-Device General] Luncer:
its great

but can we hope to blob releasing in few days?
[Sony Cross-Device General] brickhayabusa:
what about the charging bug?
[Sony Cross-Device General] drakonizer:
Yes, I tested it multiple times. No issues at all. Great job man. You should seriously commit to sonyxperiadev git and join the hangouts group.

---------- Post added at 05:15 PM ---------- Previous post was at 05:11 PM ----------

ETAs to jerpelea? Seriously?

The last 2 pages were about this. Man come on, this thread is DEVS ONLY. This is also the only place where munjeni is willing to work, so don't clutter.
[Sony Cross-Device General] [Fenix]:
I misunderstood the description of the video then, also blobs that just released are not for N but for M.

My bad :silly:

Waiting for news master :D
[Sony Cross-Device General] brickhayabusa:
i mean if jerpelea puts the "fix" on the new blobs.

i read the 2 posts.
[Sony Cross-Device General] drakonizer:
Really? If you really DID read the past 2 PAGES, you'd know the blobs are not at fault, and that munjeni fixed the issue. If you want, you're welcome to do a build and test it out and prove me wrong.
[Sony Cross-Device General] brickhayabusa:
well, I misunderstood that fact, but anyway, thanks for the info i will build and test.

and i'm not forcing to munjeni or jerpelea to work.
[Sony Cross-Device General] munjeni:
You didn't used any other patch other than this one http://xdaforums.com/showpost.php?p=69382475&postcount=416 + CONFIG_SONY_USB_EXTENSIONS ?? And your kernel is in sync with sonyxperiadev branch?
[Sony Cross-Device General] drakonizer:
Yes! I dont know what's wrong with your build. I'm happy anyway :P
[Sony Cross-Device General] munjeni:
Is SuperSU-v2.78 working on AOSP 7.1.0 r4 ? Anybody tried?
[Sony Cross-Device General] munjeni:
Whats a next for fixing? In call echo? That would be a great if we make a list of bugs and make them priority, e.g 1. 2. 3....
[Sony Cross-Device General] drakonizer:
It works flawlessly. You have to reflash each time you change boot.img though

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

True. We should collect info here and then ask [MENTION=4311238]SuperLamic[/MENTION] to update the OP.

I, for one, don't see any issues other than cam, after the recent blob release.

Does anyone else have a kernel panic on powering off the device? It results in being unable to turn on the phone without a hard reset.

Also [MENTION=4120742]munjeni[/MENTION] does your device sleep? Mine doesn't. I thought it was due to the fm radio service, but it turns out it isnt. Might have to use some apps like BBS to debug.
[Sony Cross-Device General] munjeni:
There is some isue with missing battery monitor/mannager (I forgot its name, you can see that in logcat) and sometimes if you look into battery usage you can notice something like 15435664334566 mA and in same time battery drain. When there is good usage no battery drain. As I know there also was deadlock in kernel usb module after disconnecting phone from AC charger, but its already fixed. It was only one isue related to "cant reboot". You can check that if you connect phone to AC and disconnect, if charging icon dont disapears it mean bug is stil present, if not everything ok. About sleeping, see screenshoot some pages back, after 12 hours (2 to 3 hours use + 9 hours on sleep) of usage 65 percent of the battery was left which mean it sleeps (in my case its so close to stock rom), in general N is realy good
[Sony Cross-Device General] drakonizer:
Nope. I plugged to AC and unplugged a number of times, and rebooted too. Nothing you mentioned has happened. The charging icon disappears. If you want I can record the screen and post a video here. Trust me, at least in my case, things are as good as can be.

I think you should try a clean start. Re sync the kernel from xperiadev and patch it from scratch, to ensure it isn't one of your other patches that is causing the issue.

Hmm, looks like my deep sleep issue is isolated.
[Sony Cross-Device General] munjeni:
Ok I beliewing, yesterday when I tried something realy unbelievable was related to usb patch, I not found a reason why it not worked but worked one time only. Deep sleep... Its sleeps, see post above (refresh page) about some isues which I found
[Sony Cross-Device General] drakonizer:
That would explain why things work well for me. My deep sleep is broken.
[Sony Cross-Device General] munjeni:
You can do "logcat >/storage/blabla/logcat.log &" trought terminal emulator and disconnect usb and turns screen off for 5 minutes, then killal logcat process and look into logcat to see what worked in background
[Sony Cross-Device General] p@to:
When I try your rom, it doesn't work
[Sony Cross-Device General] munjeni:
For me too! On my boot.img I have added cwm recovery (you have noticed blue blinking led which mean time for pressing volume key to enter into recovery mode), I think I know now why supersu not work. Because supersu modifies boot.img on the fly? It can't modify bootimage which is in my rom since I have two ramdisks, one is android seccond it cwm. Anyway, anybody found what is modified inside boot.img after installing supersu? If I get that info I will add support for it in next update!
[Sony Cross-Device General] munjeni:
I found this now in supersu installer script:

# Fix Samsung deep sleep issue. Affects enough millions of users to include.
if ($SAMSUNG); then
cp_perm 0 0 0700 $COM/000000deepsleep /su/su.d/000000deepsleep
fi

Probably you have a isue on supersu? You can try without supersu
[Sony Cross-Device General] aquaboy11:
That sounds like a good idea. I do have to improve on my debug skills though, as I'm pretty new to developing. I'm trying out tons of stuff and learn things here and there, so I might come up with some usefull things now and then :p.

SuperSU works fine for me. One problem I do have after flashing is that my camera breaks for some time. After a few hours/days I try again and it starts working again. I thought it might have something to do with dm-verity, as it is disabled on my kernel, and when flashing SuperSU it says it patches dm-verity. I fixed the issue with focusing accidentally a week ago, but I forgot where I did it. I'll try if I can find it again and then I'll share it here.

Below a picture of my battery usage (it sometimes randomly drops to -22% and goes back to ±50% after a minute).