yashsingh1/xdaforums huggingface dataset:
[Mi 3 General] vasishath:
Ofcourse i know that :) i was saying this because the above posts say that it reduces the number of reboots or eliminates them..
[Mi 3 General] deepesh.tickoo:
Some location service provider apks are messing up with the gps and causing the reboots, before the logcat showed up that kernel panics are causing the phone to reboot, which i guess was because of nfc which is now switched off as its not working anyway, so now reboots are very less often and logcats are showing that its because of

1. rotation issue somehow, causing a reboot when the phone is placed in pocket upside down.

2. some 'other' issue which AFAIK is not defined yet.

So our next bid is to try with different gapps or no gapps plus the fix provided before.

And BTW, random reboots are generally caused because of bad framework or kernel, and as ivan has the sources and framework fixes and mods are making the situation better... so ATM this is the best we can and should do.
[Mi 3 General] nsakhare:
:highfive: dude.. Good luck :good:
[Mi 3 General] deepesh.tickoo:
Anybody who can reflash the ROM from fresh and install just the patch (after gaining root) and not the gapps, please test and report about the random reboots without any wakelock apps.

Thanks
[Mi 3 General] rpjuvvadi:
Patch?
[Mi 3 General] deepesh.tickoo:
The patch by RipperRyujin on page no. 39, post #389 to partially fix random reboots.
[Mi 3 General] rpjuvvadi:
Experienced Reboots. Tried the patch. Removed wakelock apps. Was running on WIFI Location Completely OFF.

Attached Logcat took from Terminal Emulator( Dint have mi3 drivers for ubuntu to get ADB working)
[Mi 3 General] srvoleti:
Hope some experienced person will analyse and give suggestion or fix.
[Mi 3 General] elia222:
E/QCOM PowerHAL( 966): Error opening /sys/devices/system/cpu/cpu1/cpufreq/sys_cap_freq: No such file or directory

E/QCOM PowerHAL( 966): Error opening /sys/devices/system/cpu/cpu2/cpufreq/sys_cap_freq: No such file or directory

E/QCOM PowerHAL( 966): Error opening /sys/devices/system/cpu/cpu3/cpufreq/sys_cap_freq: No such file or directory

That may be the issue. Any kernel devs around here?
[Mi 3 General] rpjuvvadi:
Even kitkat rom's cpu1 and cpu2 doesnt have the cpufreq folder.
[Mi 3 General] SkipperRyujin:
Thats true, only cpu0 has fpufreq folder. Im curious about "Error writing to /sys/power/state: Device or resource busy" error, need someone to check the /sys/power/state permission from other phone that running lollipop, i think that the cause of restart by "other" coz if you see the battery history, it will display as white(no battery history like when the phone turned off for some time, but in fact it just a reboot which is less than 1 minute). And then i found some error with domain, coz some file which is important didnt set its domain, and that can make an error too.

is the cpufreq folder exist in mi4 ? please someone who own mi4 check it...

edit: attached some screenshot below, its run from 100% battery from about 8.00 p.m until now (3.00 p.m), also the reboot logged from reboot logger (the time with secs is manual reboot). It show a blank white bar when it rebooted by error and not when i manually reboot it)
[Mi 3 General] lovleshgarg:
cpufreq folder is created when that particular core is online. So it will keep on changing depending upon which cores are online at that point of time. To test, you can just go to /sys/devices/system/cpu/cpu* folder (the one for which cpufreq folder is not present) and then change the value of online file from 0 to 1. After saving the file, for a second you will see that the cpufreq folder will get created.

This should not be an issue.

Actual issue could be related to the /sys/power/state error as also pointed by SkipperRyujin.

There are multiple power state profiles defined by kernel. Two important of them are "mem" and "standby". Normally the state would be "mem" when the phone is awake. Now when the phone tries to go into "standby" state during deep sleep, kernel is not able to change the state because of Device Resource Busy error. This is generally defined in the setPowerMode() method. If we had the sources, we could have looked into it :(
[Mi 3 General] luckydogra:
After removing all nfc related files, No random reboot outside pocket. But random reboots still occurs in pocket.
[Mi 3 General] SkipperRyujin:
Dont face your phone in head-down position at your pocket, and also face the screen out, as it can detect our body as a touch, it help a lot :D . Maybe it related to multitouch + sensor problem bcoz sometimes, when the screen lock, I'm positioning the phone head-down, cover the half screen with hand, touch the capacitive button repeatedly, and try to unlock it, and violaaaa...... the phone reboot :D

Its about sensor and touch related issue, and also with the kernel ( you can try to charge ur phone in off mode, and after the battery display is on, disconnect the charger. In my phone it will hang, bcoz of the charging parameter error), also the fatal error in pipe (i forgot the detail) which is related to kernel
[Mi 3 General] luckydogra:
After removing all nfc related files, No random reboot outside pocket. But random reboots still occurs in pocket.

First one is random reboot and second was a manual + random reboot, and in between all graph is missing. Reboots in pocket only.

No such earthing issue for me while charging. And i have disabled capacitve buttons.
[Mi 3 General] ohcanada:
Based on all the logcat data, we pretty much have 3 problems now

1. Location service is keep giving error. (One thing I noticed that when the gps is not used, the little icon won't appear on the status bar. As soon as the gps is used and shut off, the little icon will stay there forever even if I completely shut off the location)

2. The cpu is confused about power states. I saw libsuspen error in logcat now and I guess the cpu is not very good at getting into deep sleep.

3. Random Rotation Vector error. There are only a very few errors in the logcat about rotation vector and this probably explained why the phone won't reboot in certain orientations...

By not installing the Gapp we can probably eliminate the location service bug. But the other 2 are hard. I remember the snapdragon 800 chip does have step counter built-in and that may be the culprit for giving us random reboot.

And then the last, the cpu power state, we need kernel or framework to solve it...

So the best way to enjoy this blazing fast rom is to run the wakelock app and hope for the best...
[Mi 3 General] akshayAXE:
Random REBOOTS solved

People I have found out a solution to the prevent the phone from random reboots.

I am using Mi3W Indian variant.

The solution works very well, I can say this from my own testing of it since the last 2 days.

The phone even goes to deep sleep :D

The Solution is actually quite simple.

Go to the playstore and install Bluelight Filter for Eye Care.

From the app switch the bluelight filter on and keep the opacity to 0%, If you have Onscreen Navbar then from options apply filter to it too

And That's all you have to do.

Your phone will no longer experience random reboots till the time the filter remains switched on.

I have no clue regarding why the apps works but all i know is that it does work and that's what counts.

I am providing a few screenshots from CPU Spy Plus and the inbuilt Battery Graph.

The blank areas in the graph are of the period when the filter was disabled.

The solution works give it a try.
[Mi 3 General] nsakhare:
dude after installing I got a reboot within a minute after removing the wakeup app..didnt work for me.
[Mi 3 General] fra392:
Can Someone that know chinese, read Ivan weibo? Google translate doesn't

Work too much?? Thx http://m.weibo.cn/u/1697247850
[Mi 3 General] Armin_van_buuren:
I'm testing the phone in your pocket and moving moment and without wanting to claim victory does not restart.

Works or not thanks for taking the time to try and share with us all.
[Mi 3 General] colocynth:
Ivan has posted some screen captures of his friend's lollipop ROM, a buggy one, in his weibo. It's a ROM for another Chinese phone, not Xiaomi.

Other posts are about his complaints against train tickets, not related to roms.
[Mi 3 General] SkipperRyujin:
Hi all, i spend my whole day to reduce the reboot and now i try to add the calib.config for the sensor and try to change some lib file from ivan's kitkat build (mostly result in bootloop, maybe the API is a real different), also changing some parameter in sensor setting. its cause is "other", thats why i'm so curious about it. Hope we'll find some luck without kernel source ;)

well, instead just waiting, its not wrong to try something :D
[Mi 3 General] srvoleti:
Oh Nice to hear that! Wish you Good luck, Will wait for your post then.
[Mi 3 General] ohcanada:
I found an interesting thread about that special gapp on the chinese miui forum. The reason why flashing that gapp won't cause reboot is because it includes the superui.apk. That holds the wakelock and thus prevent reboot.

Well...back to square one....
[Mi 3 General] Riichard63:
Ahah thanks for all these informations about CPU configuration on system files. Yes everything is normal but my phone still cann't go to maximum frequency xD
[Mi 3 General] The Dork Knight Rises:
Yeah, I decided to try out the new AnTuTu, and first time I got a score of 27000+!!!

Then I manually locked the cpu at max freq, worked for single cite tests, but still went down to 1190 MHz for the multi core tests... Scored the usual non-miui 38000 :( [MENTION=4276944]SkipperRyujin[/MENTION] how did you manage 40000+ score on lollipop?
[Mi 3 General] Riichard63:
I managed to get 44 000 once. I don't know why but at boot I get all 4 cores at maximum frequency.

And now when I reboot all cores are locked at 300MHz... I change it with an overclock app but when I lock my device it goes back to 300 xD it seems that overclocking apps are totally messing the system.

Envoyé de mon MI 4W en utilisant Tapatalk
[Mi 3 General] SkipperRyujin:
Since you mentioned it, i'd recheck with the newest antutu with a fresh install, add the "trick" i mentioned in previous post, and then try the last edit with adding calib.cfg from latest miuiv6 ( see the attachment). I'm using minimal gapps and greenify apps also. Nothing more, i think...
[Mi 3 General] SkipperRyujin:
Ur device is mi4 right? can u check if there is a calib.cfg file in /data folder?
[Mi 3 General] Riichard63:
Hi SkipperRyujin, I checked on MIUI 6 with ES root explorer and on android 5.0. no one of the get this file (it's the / folder wich contain "sys", "system" ect right? Root folder of the devce, I guess yes because it's the only path that contains data folder :p). What does it contains?

Thanks a lot for trying to help =)
[Mi 3 General] SkipperRyujin:
Im just curious with the line ro.qcom.ad.calib.data=/data/calib.cfg

I also didnt find it in /data folder. Just to clarify if that also happen in mi4
[Mi 3 General] The Dork Knight Rises:
By 'trick', you mean replacing those two files (init.qcom.post_boot.sh and changepowermode.sh) right?

And could you attach the calib.cfg file you're using?
[Mi 3 General] Riichard63:
So yes it's the same for Mi4, file juste doesn't exists.
[Mi 3 General] SkipperRyujin:
I just extract from miuiv6 4.12.12, see attachment

Can you please check the /sys/devices/system/soc/soc0/id? What value is in there? Also is the mi4 using msm8974?
[Mi 3 General] The Dork Knight Rises:
So I just put it in /data? Do I have to change permissions?
[Mi 3 General] SkipperRyujin:
Well, i actually put it in /system/etc and change the address in build.prop to there. The permission is rw-r--r--, owner root, group root

Oh, almost forget. Edit the build.prop, find line

ro.vendor.extension_library=libqti-perfd-client.so

Change to

ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so
[Mi 3 General] Riichard63:
Hum values are :

-Android 5.0 : 213

-MIUI 6 : 213

And for the Mi4 it's the MSM8974AC
[Mi 3 General] SkipperRyujin:
WOW, thats out of my tought before... thanks a lot

*working again, wish me luck...
[Mi 3 General] Riichard63:
Good luck to you :)

Ahah I don't understand everything but you're doing a great job ;)
[Mi 3 General] SkipperRyujin:
:D

I just think that the platform is different so i can try to apply a different value in other parameter but yeah, its the same....

Out of options right now, but i can assume the bin file for charge_monitor is still using kitkat version. Also some lib. And the gms error isn't the one of the "big culprit" of the random reboot. My device reboot twice today, right after the battery is fully charged and i disconnect the charger and a random reboot by kpanics (what? Again?)

PS: hey, you can edit the init.qcom.post_boot.eh file, search for echo 1 > /sys/module/msm_thermal/core_control/enabled and change value to 0 (echo 0) under the target=msm8974. Don't be alarmed if your device got hotter :D

Also I found some people at lg g3 forum editing the processor limit according to thermal control to higher frequency. I already try it and it also work (with the compensate, ofcourse).
[Mi 3 General] Riichard63:
Oh okay, I really hope you'll find a solution for your random reboot issue :)

Hum so if I change this value it'll allows me to get max frequency? Should I use the files you shared on this topic? (Are they compatible with Mi4?)

Envoyé de mon MI 4W en utilisant Tapatalk
[Mi 3 General] SkipperRyujin:
Ofcourse not always at max freq, but it can help about lagging in some game, if ur device not warm enough, ofcourse. Its still better to get lag than a smoke made by burned hardware :D

If you wish to get higher freq, then the file is useless coz it edited to set the procs running as low as possible, but yes, you can use it coz the platform is same (its also under same program, only in changepowermode.sh it wont work coz i only edit the mi 3 parameter)
[Mi 3 General] Riichard63:
Finaly I took time to check and it was already echo 0 for this line, that's weird =/
[Mi 3 General] i snort flour:
New cm12 out it's running smoothly and reboot issue may be solved testing now. Skipperryujin you should help with the Dev as they are looking for help you could help them speed it up and get higher benchmarks currently benchmarking 35k for me I'll get the thread link and edit this post.

Thread URL: http://xdaforums.com/showthread.php?t=2962822
[Mi 3 General] The Dork Knight Rises:
Downloading now. But no camera is a bummer.
[Mi 3 General] Armin_van_buuren:
Hopefully soon find the solution to the camera.
[Mi 3 General] Riichard63:
Hum so okay, nothin works with me xD

Sorry for bothering you with questions for Mi4.

Here are 2 screenshots, the first one is when I edit frequencies, everything working fine. The second one is when I boot my phone or when I lock it (goes back to lowest freq)
[Mi 3 General] SkipperRyujin:
Wew, try to check changepowermode.sh under mi4 , search in "middle". Also add command

stop mpdecision

Before the mark ";;"
[Mi 3 General] i snort flour:
Wrong button hehe but yeah it has some bugs to work out but they been rolling out a new build at least one a week and the main devs are working on one good rom rather than a bunch of buggy roms and they are encouraging help from all devs willing to help so it shouldn't be long before the bugs are worked out it doesn't reboot but that's because it don't go into deep sleep mode from what I've seen
[Mi 3 General] Riichard63:
Hum okay I will try soon, but I have to re-install all the rom because of a restauring error, it doesn't boot now =/

Thanks a lot for trying to help me :)

Sleep well ;)
[Mi 3 General] DevanshKhandel4:
Guys any1 has solution for turning on NFC on mi3 lollipop
[Mi 3 General] SkipperRyujin:
Yeah, the OP edit the parameter so the cpu0 is never in idle state

Thanks....

I spend my whole weekend by changing parameter, changing libs etc etc, and countless reinstalling system , and now I got insomnia :'(
[Mi 3 General] i snort flour:
I just ran another benchmark after reinstalling rom and rooting my phone and this is what I got
[Mi 3 General] Riichard63:
And you didn't change anything? The way that this rom is acting with CPU frequencies is really weird.

So SkipperRyujin I tried to ad the stop mpdecision line where so told me to ad it but it didn't do anything.

So I changed the last "start mpdecision" to "stop mpdecision". Now my CPU reach his max frequency but is only working on 2 cores (core 0 and core 3).

I'm going to try to edit more stuffs xD But I'm not sure about what I do.

I may check the file from MIUI 6.

Edit :

Okay I think I've found why I wasn't able to change my CPU frequencies. Correct me if I'm wrong (I try to learn as much as possible) but MPDecision will force the CPU frequency, so it's impossible for user to manually set frequencies using an overclock app.

Edit 2 :

Okay I start to see how it works, I was on /sys/devices/system/cpu/cpu1/ and /sys/devices/system/cpu/cpu2/ I opened the "online" file and changed the value to 1, now all my 4 cores are online. But when I restart my device it goes back to lower frequency and still shut down some cores.

Edit 3 : (sorry for so much editions... But I'm a bit noobish and trying to improve myself)

So I compared these files with MIUI 6 files, they are exactly the same. But on MIUI 6 we have 2 performances modes (balanced and performance). Ivan kept these files but on Android 5.0 we don't have any switch button between these 2 modes, so the device is running like MIUI 6 balanced mode. So I may keep MIUI 6 performance mode lines and modify it to use an other CPU governor (like ondemand which is my favourite) and keep maximum frequency.

Finally I start to understand some stuff!
[Mi 3 General] The Dork Knight Rises:
So I switched to this CM12 build by [MENTION=6251486]david_korku[/MENTION], and guess what? My benchmark scores have shot up to 44500ish...

I do believe the guy has pretty much overcome most of the kernel and framework problems. As of now, major bugs are that Camera, BT, NFC, USB-OTG don't work.

And oh yeah, quite possibly the worst thing, booting takes approx 10+minutes.:rolleyes:

I can live without a Camera or Bluetooth for a while, but I hate waiting (FOR 10 MINs!!) for my phone to boot up.:(
[Mi 3 General] i snort flour:
Front camera works only the rear camera thinks it's being used by another app
[Mi 3 General] Riichard63:
Hum, for this CM build it may be possible to use file from Ivan's rom. OTG is working on AOSP. But it may be kernel related no?

Edit : So I tried several modifications of the changepowermode.sh file like tunning the governor, putting performance parameters instead of "middle" parameters. (It was performance governor, frequency was locked at some maximum (1.7GHZ only... But never get to 2.5 when loads get high. It reached 2.5 when not needed) So I guess there is an other file which manage frequencies (or maybe the kernel? I hope not).
[Mi 3 General] SkipperRyujin:
Well, basically if you set the persist aries power profile to high, it set the cpu to run all cores regardless mpdecision coz it stopped (see sub high in changepowermode.sh, it already stop) but as i said, you still cant force the cpu to run all cores and at max freq (it will burn your device :D, maybe if you try the cm12v2, and you feel how hot it is, you'll change your mind :D ). Some apps also didnt support multicore rendering. You can add any sub parameter, for example "low" mode, just add it following the syntax program and call it from build.prop. mpdecision is the one which responsible to make the more / less core online depending on governor, thermal, etc.

4 all mi3w user, this is the latest screenshot from my cpu spy, and yeah, i place my phone in pocket, upside-down, and no reboot :D . Lets see a couple hours if i get any reboot.

Also some screenshot from reboot logger. I got some idea and changing some parameter again 3 hours ago, and reboot manually, and booted up until now in my pocket

Edit: [MENTION=5084493]Riichard63[/MENTION], see this,http://xdaforums.com/showthread.php?t=2769899

Since ondemand and interactive is almost the same, its good to start with
[Mi 3 General] srvoleti:
Oh! Nice to see that. Will wait for your next post to try the rom again...
[Mi 3 General] SkipperRyujin:
I just cant stand the heat... its so hot when i touch the upper screen...

The kernel is same as ivan build, so i think its software problem. And a phone which cant enter deepsleep is just like forcing someone to always standby, and that hurts my heart :D

I cant help with the build coz im not good enough at building / porting rom, only know some basic like i do before (well, im windows user, :D )
[Mi 3 General] Riichard63:
Ahah no I don't want to force it to stay always at maximum frequency, I know that such device can become really hot (like pocket heater xD). I already tried to set the performance governor with max frequency of 2.45GHz but when I try a stress test wich require a load of 100% the frequency automatically drops to 1.19 GHz (sometime 1.5 or 1.7) regadless of max frequency which was set.

I also tried something else, I deleted the changepowermode.sh. And guess what? The phone is booting and CPU management stay the same. I also tried to edit the init.qcom.post_boot.sh file (/system/etc). Changes were applied at boot, when using the phone sometime frequency was reaching 2.45GHz, but like each time when I run a stress test or a benchmark the frequency drops to a lower one when CPU load is really high. Normally when CPU load is high the frequency should reach he maximum right?

In my opinion changepowermode.sh is just a MIUI file which is not essential with this build. Or maybe we should add a toggle that uses this file to change the performance mode like the one we have with MIUI.
[Mi 3 General] The Dork Knight Rises:
I literally JUST restored my Ivan AOSP 5.0 backup. Both builds have serious issues...The one with the Camera fix took 55% of my battery overnight (and I slept for only 5-6 hrs!!), while the other one has Miscellaneous battery drain. And the booting times, GOD!

But it does have awesome CM features, so I'll be keeping an eye on development.

But BTW, my phone DID go into deep sleep in that ROM...(but yeah, whatever method is being used is still draining battery...more than WakeLock apps, so I'm back to AOSP)

Hopefully you've finally solved the reboot bug! :good:

Please share whatever changes you made, once you're done checking!:fingers-crossed:
[Mi 3 General] SkipperRyujin:
Well, if you dont use persist aries power mode, then changepowermode is not used. But in init-qcom it also set the same parameter with default changepowermode (middle) so if you change it and disable the changepowermode it will set to default setting in init-qcom.

---------- Post added at 01:00 PM ---------- Previous post was at 12:53 PM ----------

Yeah, the camera daemon really suck the battery. I just try to change some parameter taken from cm12 and then try to recreate the situation where reboot mostly happen. The booting time is maybe caused by manual patch for systemui coz i try the v2 build, change some parameter in build.prop and it booted normally, but sometimes without systemui :D . Lets hope the reboot is only because the "suspend" mode in cpu0
[Mi 3 General] Riichard63:
Maybe, but I don't know what it is and how tu use it with this rom =/ I'm gonna search for it.

I feel a bit noobish, but I try to understand :p I'm really new with editing system files. Habitually I just flash roms and that's all. (and some topics may be hard to understand as english is not my native language at all)

Edit : nvmd I found the line in the build.prop :p