yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Darth:
[MENTION=6586607]GluulG[/MENTION]

I've removed your link to the "usercloud" site, as it is a pay per click site and not permitted on XDA. So you know.

The play store link is all you need.

Thanks,

Darth

Forum Moderator
[Galaxy Note II Q&A, Help & Troubleshooting] faxel:
when I was browsing suddenly my phone switched off , I coudnt turn it on. I changed battery, tried charge but no hope. but I noticed that when I press and hold power button a red led light on top starts blinking. and nothing happens. I send it to repair. but they coundnt find any problem. even if I press any button screen is dosent turn on. it looks like brick. any one have any idea how to fix it.
[Galaxy Note II Q&A, Help & Troubleshooting] yaro666:
when you connect it to pc sth happening?
[Galaxy Note II Q&A, Help & Troubleshooting] faxel:
nothing happens to pc or phone, no light no sign of driver or sound
[Galaxy Note II Q&A, Help & Troubleshooting] yaro666:
It is SDS and you need to replace emmc.

You can read about first models with faulty emmc chips.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] 3c:
EDIT: Should you experience this issue

on a stock kernel

while there are no wakelocks generated by any apps, a fix has been developped by HomerSp and can be found here. All custom kernels available on XDA integrate it as far as I know. You will find plenty of information about the fix in this thread, however please note no app can solve this because this is a kernel issue. Should you have applied the fix and the issue persists, try doing a factory reset to start fresh.

Got the edge yesterday (SM-G925F version) and rooted it immediately (after receiving OTA), so I'm not sure if it's a bug or rooting that's causing it. I already tried disabling edge screen, and factory reset, but it had no effect.

The standby drain is about 1.5%/h with no deep-sleep. For comparison my old Nexus 6 was draining 1.4%/h with stock kernel and about 0.2%/h with Faux123 kernel as seen on screenshots. I'm pretty sure it's going to be great once the device goes in deep-sleep, but couldn't find any particular culprit except the OS itself!?

Anyone experienced this and managed to solve it?
[Galaxy S6 Edge Q&A, Help & Troubleshooting] mrnovanova:
I read in the root thread that the lack of deep sleep is due to root itself. If you can show me how to check for deep sleep on a non rooted device id be happy to check for you.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] MrHardplastic:
I didn't root my phone, and last night I lost 20% over night during sleep

If my calculation is correct I lost almost 3% per hour while my phone not in use

I guess my phone don't know how to sleep properly
[Galaxy S6 Edge Q&A, Help & Troubleshooting] 3c:
You can use most CPU apps, even though they won't be able to change CPU settings because of lack of root, they will show you CPU times, and most importantly offline mode. I use my own app for that, allowing to track battery history as well and also showing CPU times. You can try the following apps which will definitely show you deep-sleep: 3C CPU Manager or System Tuner or 3C Toolbox, all 3 are free (with ads).

In 3C CPU Manager, in first tab, called CPU, you'll see a 'Sleep' meter on top of the 3 graphs. That will indicate actual sleep time, versus run time. Mine is (was) showing nothing (eg 0 deep-sleep). In second tab called Times, you can check each CPU frequencies time used, it should show offline time, if not that means no deep-sleep! Screenshots were attached in OP.

This seems to suggest this has nothing to do with rooting in the first place. I've only got one rooted app on my device, as always and never seen this caused by root. I've seen it caused by bugged ROMs, bugged kernels and more rarely by recovery issues, but not with my setup.

Anyway, I just rebooted less than an hour ago, and just realized it's going into deep-sleep now! Didn't change recovery which eliminate this as the culprit. Was only developping some new notification for the edge screen all afternoon. Didn't uninstall anything or changed any particular settings either except Edge screen feeds, disabling all feeds except notification and my own new feeds. Maybe that helped?

Also activated the panel left of the home screen with minimal news feeds, tech and science, but I don't see how it would relate to this.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] idksomuch:
Did you use cf auto root? That's how I rooted my tmo 32gb edge and it hasn't been in deep sleep since last Tuesday. I didn't install that ota update people are talking about and have no idea that there was an update and I didn't install or mess with the recovery at all after root and my phone still stays awake.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] mrnovanova:
If offline means sleep then she sleeps like a newborn.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
To make things more weird, I just dumped the currently held wakelocks, and at first sight it appears there is no actively held wakelock keeping the device alive. Which implies a kernel issue, but that is beyond my expertise. Needs some further research.

(Terminal emulator, disconnect USB, "sleep 30 && cat /d/wakeup_sources", turn off screen, wait a minute, turn it back on, and you get a wakelock list with 0 active wakelocks - that's shouldn't even be possible)

Either way I maintain that recovery should have nothing to do with this (binary status though, perhaps?)
[Galaxy S6 Edge Q&A, Help & Troubleshooting] dc/dc:
FWIW, we've been discussing this a lot over in the T-M section, and the recovery seems to fix it. We've also found that a clean install from Smart Switch seems to be helpful.

http://xdaforums.com/tmobile-galaxy-s6-edge/help/rooting-deep-sleep-t3079385

Thanks for all of your work Chainfire!
[Galaxy S6 Edge Q&A, Help & Troubleshooting] gdmlaz:
Yeap all you guys have to do is flash ur stock recovery and deep sleep will be back...... For some reason this root is getting rid of our recovery all together just flash the stock recovery and deep sleep will be fine
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
Too many posts there of people CAPsing random gospel in red letters to make it more of the truth.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
Some further (preliminary, non-extensive, quick) testing seems to indicate that it is indeed the binary status flag rather than the recovery itself that triggers this.

- After CFAR you end up with an official recovery (not necessarily from the matching firmware you were using)

- Binary status: custom, deep sleep issue

- Use root to pull that recovery from the device, trim it so it ends with the correct signature, tar it, flash it via ODIN

- Binary status: official, deep sleep works

- Use root to pull that same recovery again, blank out the signature, push it back (not via ODIN, just DD), reboot into recovery, then back to Android

- Binary status: custom, deep sleep issue is back again

Further testing still required for any real conclusions can be drawn. If this is true (end I certainly hope I end up being wrong) this means custom recoveries like TWRP (which also trigger the custom binary status) would also cause the deep sleep issue. It is the question if the problem is inside the stock kernel, and whether this is intentional (which would be very disturbing indeed) - guess checking out the kernel sources would be in order. On the other hand, it also seems like flashing any properly signed kernel will treat the symptom, it doesn't necessarily need to be the one matching your firmware (maybe not even exact model ?).
[Galaxy S6 Edge Q&A, Help & Troubleshooting] ktetreault14:
This recovery for the N925T is based on cyanogen mod with the ability to install zips but not backup and also DOESN'T have the deep sleep issue (supposedly)

Going to test myself tomorrow before work. Will edit with link

Edit: http://xdaforums.com/showthread.php?p=60072372
[Galaxy S6 Edge Q&A, Help & Troubleshooting] gdmlaz:
^ already posted lol
[Galaxy S6 Edge Q&A, Help & Troubleshooting] eousphoros:
https://github.com/eousphoros/android_kernel_samsung_exynos7420 If you want kernel source with some git history.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
It is interesting that you have noted you do not see the issue with a kernel compiled from source and a custom recovery. Is that kernel using the exact Samsung sources, or a transplant between CM and Samsung, or?

I'm not seeing any clearly relevant code in the kernel sources, though if it is deliberate they could have left it out (also I only looked really quickly, I don't have much time at the moment to dedicate to this). If the problem is even inside the kernel, that is. Note that binary official status is communicated between the bootloader and the kernel / KNOX via the cordon= and connie= in /proc/cmdline, if anyone else is looking.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
Deep sleep issue is also present with the official TWRP (at least, in 20 minutes of testing there hasn't been deep sleep yet).
[Galaxy S6 Edge Q&A, Help & Troubleshooting] eousphoros:
Linode 3.10.61 -> android 3.10 -> samsung sources is the merge order for those kernel sources i posted. One interesting thing I noted is the custom kernel is signed after the build process is done.

Also keep in mind im not even close to stock right now. Custom recovery, custom boot, most of the bloat from ms, ig, fb removed. Removed stock gapps, etc. So im probably not a good study case.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] rjwdon:
So I'm rooted, and installed stock recovery (SM-G925I) and deep sleep has come back, but since last night (~11hours total) it has only been in deep sleep for 24% of the time (around 2hrs 45mins) and it drained 15% battery in the first 6 hours, which is really really ****.

I checked better battery stats for kernel wakelocks/partial wakelocks, and it is saying that "PowerManagerService.Wakelocks" are accounting for ~75% of this... anyone have any idea how to reduce that?
[Galaxy S6 Edge Q&A, Help & Troubleshooting] ktetreault14:
I can confirm testing the unofficial TWRP for Tmo S6 Edge that I do indeed get deep sleep. Also custom kernel.

---------- Post added at 11:44 PM ---------- Previous post was at 11:43 PM ----------

This man is a S6 Edge Genius
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
Again, a custom kernel. More pointers at the kernel being the culprit.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] gdmlaz:
Yeap could vouch I flashed twrp by itself wouldn't get deep sleep..... flashed his kernel after and immediately when to to deep sleep
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
FYI, I just took the SM-G920F kernel source, built it completely originally, transplanted my stock boot.img's ramdisk, and it still shows the sleep issue. Which might mean the issue is somewhere in the source we can possibly find, or its in that ramdisk.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] SkilletDesire:
Temp fix for deep sleep, Deep Sleep Battery Saver: https://play.google.com/store/apps/details?id=com.rootuninstaller.batrsaver
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Alex-V:
a recovery never is the problem for such problems.. it's like apple and banana...
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Brohym:
I had the same problem with this huge battery drain and no deep sleep after rooting. So I cleared the cache, restarted the phone and it looks like this fixed it for me.

Phone goes into deep sleep normal and now the battery drain is back to normal.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] 3c:
Definitely not a temporary fix, tried it, no difference whatsoever even with the most aggressive setting. Furthermore nothing was actually turned off (wifi, apn, etc) and this app is reported to not work on Lollipop anyway.

Unfortunately this is not a valid fix, this is a kernel issue causing deep-sleep issue to come and go after reboot. Without clearing cache, a reboot fixed it many times for me, however it keeps coming back without reason. :(
[Galaxy S6 Edge Q&A, Help & Troubleshooting] prking07:
Couldnt this be the memory leak that 5.0.2 had that was somewhat fixed in android 5.1? Hence why a reboot temporarly fixes it?
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Golubev:
Some interesting about Google Services Wakelocks LINK
[Galaxy S6 Edge Q&A, Help & Troubleshooting] 3c:
A memory leak wouldn't prevent phone from going into deep-sleep. I have the Nexus 6, and running 5.0.2 with Faux123 kernel resulted in very low standby drain. Stock kernel was really crappy in comparison. Here it seems to be a similar issue. When there's no app preventing the device from going into deep-sleep, it can only be the kernel, and more often than not a driver. I had a TF701 which initially suffered from similar problems and removing a .so file solved it, until Asus released a fixed ROM.

I have 5.0.1 on my S6, and have an update to flash, not sure if it's 5.0.2 or 5.1 or if it fixes anything.

FWIW, I just rebooted and the issue is solved for now, 14 minutes since reboot, 14 minutes deep-sleep.

This is not the issue at hand, though it will definitely surface as soon as we get a fixed kernel. Google services wakelocks are a general problem since ages. And with recent Play Services it's getting worse because all apps are using it and tracking the actual culprit is becoming very hard.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] prking07:
Ok. I thought all S6 came with 5.0.2 out of the box. Anyways havent had the no deep sleep problem anymore since i flashed stock recovery and cleared cache. Phone is sleeping like a baby. In the las 28+ hours it has slept nicely.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] sum1one:
KEEP IN MIND.... ( typing in caps to get attention :D )

KEEP IN MIND FOR THOSE WITH BATTERY ISSUES, THIS HAS WORKED FOR EM AS WELL.

Flashing the stock image ( I did not lose root) cleared cache AND DALVIK <<<< very important !

this should help you out. I have not flashed TWRP because I am seeing if there will be a CF auto root file for the edge. I do not want to mess anything up but there have been reports of people having no issues but there are also ppl who are having issues.

HOWEVER.....going back to the first part, that should cute your DS issues as it seems to be working for everyone. You can go check out the CF auto root page and you can do some research in there as there is plenty of it about DS.

good luck...
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Sheldor1967:
@3C

Hi, I installed 3C CPU Manager, and on the CPU page, where it says Sleep, it says N/A.... I got a similar report from one of the other Apps. Should I take that to mean it isn't sleeping at all, or that it can't read the sleep state?
[Galaxy S6 Edge Q&A, Help & Troubleshooting] EuEra:
Does that stock recovery file work with any s6 edge or only t mobile?
[Galaxy S6 Edge Q&A, Help & Troubleshooting] EuEra:
Bless the lord it works non t mobile
[Galaxy S6 Edge Q&A, Help & Troubleshooting] 3c:
Yes, it means it isn't sleeping at all.

I solved this 3 days ago by upgrading to 5.0.2 (originally on 5.0.1) and doing a factory reset. Simply upgrading or flashing stock recovery didn't fix it at all. Now device is sleeping like a baby and draining as low as 7 or 8mA in standby, thanks to XDA members for all the sharing!

A quick warning for users coming from other brands or older Samsung devices, SD card is entirely wiped when doing a factory reset, and there's no option (didn't find it if any) to keep any internal SD card data!

EDIT: Thanks for your feedback, I'll change n/a to 0s in next update :)

EDIT2: Deep-sleep issue came back next day, had to reboot again to fix it, until next time. :(
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Sheldor1967:
Glad to help the cause!

I flashed the stock recovery, wiped 2x and then flashed TWRP again and I now see sleep in the app! And gee I walk away with 55% left and come back an hour later and it's still there!

Now if Google would just fix the freaking memory leaks... I just had my clock app (Dock Clock Plus) hang and burn 30% of my battery before I noticed and stopped it...This would happen with Timely as well. DOH!
[Galaxy S6 Edge Q&A, Help & Troubleshooting] strikerdj2011:
i had the deep sleep problem since i followed the root then twrp then stock recovery cache wipe then flash twrp again sleeping like a babby at night time now just hope we get some roms soon and some custom kernels
[Galaxy S6 Edge Q&A, Help & Troubleshooting] HomerSp:
Hey guys, I've had a look at this problem for the last few days (though on the Flat, and not Edge, it has the same problem) and I have come to the conclusion that it's ultimately related to the bootloader.

I compiled the official kernel (from Samsung's open source center) to look at what's happening and noticed that one of the SCSI drives failed to suspend, so I added some code to know which one, and it pointed me at /dev/block/sdc. I pulled the block and found that that's where cm.bin (from the bootloader chain) is stored. I then added some code to ignore the suspend error, and vóila, deep sleep works again!

I don't know if this is intentional on Samsung's part, and I certainly don't hope it is, but frankly it wouldn't surprise me.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] 3c:
That's a good find, as the deep-sleep issue appears to come back after a while not matter what. Hopefully this will be integrated in a customer kernel pretty soon, such as this one: http://xdaforums.com/galaxy-s6-edge/orig-development/tw-simplkernel-t3091094
[Galaxy S6 Edge Q&A, Help & Troubleshooting] mythos234:
Hi, could you tell me what you added and where? Bootloaders aren't really my thing and I don't have the time to get behind this myself..

You'll get a huge thanks in my thread :)
[Galaxy S6 Edge Q&A, Help & Troubleshooting] HomerSp:
You need to modify drivers/scsi/scsi_pm.c, scsi_dev_type_suspend is what fails. I just overrode the return value to 0 while testing, but some additional checks may be a good idea :)
[Galaxy S6 Edge Q&A, Help & Troubleshooting] mythos234:
Thanks, implemented it and now my testers are checking ;)

Powered by SimplRom and SimplKernel.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Sheldor1967:
What a difference having that fixed makes! Even if it turns out clearing cache is a temporary fix, I only used 40% of my batter in 11 hours... For me, that is tremendous.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] beda_boy:
Hi, how much was your screen on time during the 11 hr period? Just curious as I seem to have lost deep sleep, my batt went down 40% in 7 hrs when phone was idle. And my screen on time was less than 1 hr
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
Thanks for figuring this out. Any idea what cm.bin does specifically?

Note that you can make the issue appear simply by going into the recovery partition (sda6) and 0'ing out the signature on the stock recovery :X
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Sheldor1967:
Sorry, no recollection... Suffice to say that I used much less juice than before the fix...
[Galaxy S6 Edge Q&A, Help & Troubleshooting] HomerSp:
I don't exactly know, it looks either encrypted or compressed to me. There is a mention of CryptoManagerV20 at the top of the file, which suggests it's got something to do with crypto. But other than that I have no idea.

I was looking through the code some more, and found that it fails when it's attempting to synchronize the caches for sdb (sboot) and sdc (cm). I don't know whether it has actually written anything to these blocks (I doubt it though), but that's where it fails. Luckily we can disable this by writing to a sysfs file.

sdb:
echo "temporary none" > /sys/class/scsi_disk/0:0:0:1/cache_type
sdc:
echo "temporary none" > /sys/class/scsi_disk/0:0:0:2/cache_type

This disables the cache synchronize while suspending, and as such makes deep sleep work again.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
Those blocks are actually write-protected, so that wouldn't make any sense (the system writing to it, I mean)
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
EDIT: HomerSp posted a TWRP-flashable ZIP here: http://xdaforums.com/showpost.php?p=60385577&postcount=56

It still requires you are rooted with SuperSU though. If not, flashing back stock kernel and stock recovery with ODIN will still fix the deep sleep issue.

---

If using SuperSU, copy/paste this into an ADB shell, it'll reboot your device, and the problem will be fixed. You might need to grant permissions on-screen after the first line.

su
mount -o rw,remount /system /system
mkdir /system/su.d
chmod 0700 /system/su.d
echo "#!/tmp-mksh/tmp-mksh" > /system/su.d/000000deepsleep
echo "echo 'temporary none' > /sys/class/scsi_disk/0:0:0:1/cache_type" >> /system/su.d/000000deepsleep
echo "echo 'temporary none' > /sys/class/scsi_disk/0:0:0:2/cache_type" >> /system/su.d/000000deepsleep
chmod 0700 /system/su.d/000000deepsleep
reboot

This takes [MENTION=2266182]HomerSp[/MENTION] 's fix listed a few posts up, and has SuperSU apply it on every boot.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] HomerSp:
Hmm... I just had a look on a completely stock system, and those two blocks are not write protected., while they are when you have modified the recovery or boot image. This is very interesting...
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
The same is true for the modem partitions, it has been that way since (I think) the S3. At least for the modem partitions it depends on the binary: official flag in download mode. I assume the same is true for these partitions. I still don't see why the system would write to them, though.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] HomerSp:
I don't know if they actually do, but I do know that it fails to synchronize the cache on those devices due to the write protected flag.

This is actually a linux kernel bug as well, since write protected devices shouldn't enable caching. But I looked through the code, and it looks like they added a check for that in linux 3.18. Unfortunately there's not much we can do about that other than wait and hope that Samsung push out an OTA with a fixed kernel (even if that seems unlikely).
[Galaxy S6 Edge Q&A, Help & Troubleshooting] ShermCraig:
[MENTION=631273]Chainfire[/MENTION] and [MENTION=2266182]HomerSp[/MENTION], thank you so much for your efforts and the time you put in to fix this. For us "less technical" folks, is there any way you can create a flashable fix or if not, perhaps simple step-by-step instructions on how we can fix this on our devices?

I know I speak for many when I say it would be much appreciated. I for one would be willing to buy you a beer! :good:
[Galaxy S6 Edge Q&A, Help & Troubleshooting] Chainfire:
It should not be difficult to wrap the fix I pasted the previous page into a TWRP ZIP, but I do not have more time today.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] ShermCraig:
Is it as simple as copy/paste using something like "Terminal Emulator"? If so, that's easy! :D
[Galaxy S6 Edge Q&A, Help & Troubleshooting] HomerSp:
Try to flash the attached zip in TWRP.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] ShermCraig:
I will, however I did a copy/paste of the script into Terminal Emulator. Phone rebooted (as it was supposed to), so I assume my device is already fixed. Is it okay to still flash your fix? Just want to be sure.

Thanks!
[Galaxy S6 Edge Q&A, Help & Troubleshooting] HomerSp:
It's the same script, so that should be fine, yes :)
[Galaxy S6 Edge Q&A, Help & Troubleshooting] ShermCraig:
Okay, flashed successfully. If you need me to look for anything in particular, just let me know - but so far, so good!! :D
[Galaxy S6 Edge Q&A, Help & Troubleshooting] raw2000j:
Will this work on the tmobile galasy s edge 725t?
[Galaxy S6 Edge Q&A, Help & Troubleshooting] maxal:
Hi is this for the S6 or just the Edge?
[Galaxy S6 Edge Q&A, Help & Troubleshooting] HomerSp:
The S6 and Edge are very similar kernel-wise, so it will work on both.

Yes, it should. Though I can't promise anything.
[Galaxy S6 Edge Q&A, Help & Troubleshooting] LNJ:
So is this fix universal for all S6 or do different variants need the appropriate fix?