yashsingh1/xdaforums huggingface dataset:
[RAZR HD Android Development] flying_dutchman:
To be honest I thought it was just me having this issue (don't recall the earlier discussions+script), it started with CM12.1 (clean install, currently running nightly 0928), CM11 was still fine. If anything could help, and is easy installable, would appreciate it ;)

Some other issues I face every now & then, also as of CM12.1:

* slow response (eg like when selecting/opening an app; checking recent apps, heading to homes screen)

* battery heating up relatively fast, without having real activity (just running Chrome or a game Age of Conquest

* blue glittering

Would the option of OOM be any help there?

cheers
[RAZR HD Android Development] Zeljko1234:
You can try to play with OOM setting but Android and apps are getting more and more heavy, memory demanding.

Anyway, looks like that governor tweak really works. In half hour no single stutter. Phone seems more responsive too.

If you like to test it, change /sys/devices/system/cpu/cpufreq/interactive/boost to 1. Default is zero. Just tested and indeed, changing back to 0, stutter starts, to 1, stops :)

Next setting to play with is hispeed_freq. To find optimal freq for smooth music play and be gentle to battery. Right now, first core is manly around 113400 frequency, default value in hispeed_freq.
[RAZR HD Android Development] CWGSM3VO:
I'm not familiar with "boost" but "input_boost" I am (I haven't looked in a while) -- stock Moto uses 918MHz as it's default ramp-up speed. CM has always used 1.134GHz for the same.

The tweak script of mine really isn't relevant per se as the interactive governor from then vs now is completely different. I seem to recall the boost flag was purposely disabled to allow for the cpu-boost code to take over when necessary. Check out the init scripts to see how this is configured (or walk through gerrit to find relevant commits).

Personally, I think we're OK where it is. My phone doesn't lag, no chop, no problems at all.

But experimenting never hurts :)
[RAZR HD Android Development] CWGSM3VO:
One thing to note here folks -- the official nightlies do not have BFQ turned on, my unofficial builds do. You will see a difference. Once it's "turned on" officially, people will be flocking here in droves (again) to say how awesome CM is ;)
[RAZR HD Android Development] lcc014:
C, how do we turn on BFQ in official nightly?
[RAZR HD Android Development] CWGSM3VO:
Use the following from elevated (root) terminal/shell prompt to enable BFQ+IOPS:

echo bfq > /sys/block/mmcblk0/queue/scheduler
echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo bfq > /sys/block/mmcblk1/queue/scheduler
echo 0 > /sys/block/mmcblk1/queue/iosched/slice_idle

I suspect the official nightly will only enable it for mmcblk0 (internal SD) and not mmcblk1 (external SD) but I enable it for both. If you get an error (especially with the lines containing bfq) then your build is probably too old or you're not root.

I've posted up 9-30 unofficial as well (upload should be done soon).

It's only missing one Trebuchet commit, but otherwise current to cmxlog at the time of this writing:

Trebuchet : Update grid + cancel drag on searchablesChanged)

Other difference vs stock CM is I'm currently using IBM java instead of OpenJDK (stock CM) or Oracle Java (what I normally would build with).

EDIT: Sorry, no xt926 builds. Takes 1h30m to build CM in a VM on my laptop (I really need to buy SSD's for it...) with ccache and even longer without.
[RAZR HD Android Development] lcc014:
C, thank you so much.
[RAZR HD Android Development] CWGSM3VO:
- Slow response can be mitigated in a variety of ways, try enabling BFQ if your build is new enough.

- My battery heats up too, I see the thermal daemon alarms and then it settles again. Usually on first boot after flash is when I notice it.

- This is due to framebuffer not being completely filled as I recall, not really much can be done for it. I enabled an extra framebuffer page in my builds of old to work around this and it mostly does but still can happen. Can't recall if this ever made it way back into CM 12.1 again, I know it's enabled on other devices.

When in doubt, always check the OP, I try to keep it current with new info (although the BFQ info isn't there yet).
[RAZR HD Android Development] zekemo:
I can access the internet on 3G if that's what you're asking. I tried flashing one of the newer nightlys and got stuck in boot loops. Coming from the most up to date OTA I also ran into TWRP errors. I posted in another forum and cm11 seems to fix it by flashing first then cm12; it was late and just wanted my phone back so I stayed on cm11.
[RAZR HD Android Development] Zeljko1234:
I meant, could you access internet using 3G and receive voice call/sms?

Yes, that was workaround. RSD to stock, flash TWRP, flash CM11, basic wipe (not manually full wipe of all partitions), flash CM12.1.
[RAZR HD Android Development] CWGSM3VO:
9-30 unofficial -- walked 6 blocks listening to music (Play Music) via wired headset, no issues. No skipping, etc. I have the same 6 block walk back to my truck when it's home-time and I expect the same to happen. In fact, listening to music right now, updating apps via Store and no skipping.

But as Z pointed out, I'm old-fashioned and use wired earphones :)
[RAZR HD Android Development] Zeljko1234:
As I wrote yesterday, no problems with stock or noozy music player. Try DCT+FLAC. Maybe will work with wired earphones.

Lowered hispeed_freq to 918 MHz and still DCT+FLAC+BT works flawlessly. Just lowered to 702, so far so good.
[RAZR HD Android Development] CWGSM3VO:
FLAC music files or a FLAC addon? Not sure why people use FLAC audio on mobile devices (size, etc) when MP3 is just as good ;) I tried DCT long time ago when you first mentioned it, but haven't tried it since.
[RAZR HD Android Development] Zeljko1234:
FLAC music. Without starting "audiophile" conversation, with good headphones difference is more than noticeable. Of course, doesn't make sense in the car or using earphones and walking on the street.
[RAZR HD Android Development] zekemo:
Yes, everything works fine on 3G except LTE :) I did notice when trying to activate my rezound online to test my old sim card on it the myverizon said I didn't have LTE active on my account. I am suspecting something on Verizon's side if things. I am still on unlimited data and don't like speaking to them unless I have to.
[RAZR HD Android Development] Zeljko1234:
Well then you're pretty much stuck on what you have. If you speak with them, they may figured out and cut your unlimited data :)

Try your sim in another phone.
[RAZR HD Android Development] amedeh123:
Anyone knows how to revert the phone to stock firmware? Tried doing that via RSD but the damn thing wont flash and is stuck in fastboot mode now.

I remember that I had to do some edits to the xml file but I cant find those anywhere.

Btw I used 4.1.2 file and it failed on step 2 of the process. (saying "downgraded security version" on the phone and "phone returned FAIL" on rsd)

Trying via fastboot, it "loops" while trying to flash /system.

Also, I was using f2fs in some partitions instead of ext4 if that makes any difference.

EDIT: Flashing a JBBL recovery worked, and I sucessfully flashed cm11, but now Im stuck on JBBL. What now?
[RAZR HD Android Development] CWGSM3VO:
This sounds a lot like the tz partition, which can't be downgraded and needs to be skipped iirc. Search the XT925 firmware thread where I documented my transition from JBBL to [MENTION=813614]Orphee[/MENTION]'s euro 4.4 bootloader soak back to JBBL upgraded via OTA to canadian 4.4

EDIT: Start around here http://xdaforums.com/showpost.php?p=56963255&postcount=702
[RAZR HD Android Development] zekemo:
I had the same problem as you. I couldn't down grade from the most recent OTA, I gave up and still couldn't flash CM12.1 so I installed CM11 over the KKBL. I think installing CM11 is really the solution, not flashing the JBBL. Try to flash KKBL and them install a CM11 rom that is made for it; then try CM12.1.

I would be more partial to listening to him, I am a complete noob.
[RAZR HD Android Development] amedeh123:
Thanks! That worked!

I used this method last time I needed to revert but completely forgot about that.

BTW theres a TWRP version here that is compatible with JBBL. You can update the OP with it now :)

Theres also the newer TWRP version for KKBL that I have been using.
[RAZR HD Android Development] flying_dutchman:
Hi,

Just to say tt I've run the script & first experience is tt I've got my phone back! Responsiveness definitively increased, now let's wait how things develop in time.

thanks,

cheers
[RAZR HD Android Development] amedeh123:
Cant flash any zip from custom recovery. It does its thing with no errors but /system will still be empty. And ofc wont boot. Ideas?
[RAZR HD Android Development] CWGSM3VO:
Newer TWRP seem to give people issues. This is the main reason I stick with the version I'm using (see sig) -- If you're using a newer TWRP, try downgrading to an older version.
[RAZR HD Android Development] amedeh123:
Tried that. Tried philz, cm recovery and different versions of twrp, none seem to be able to flash anything, only wipe. And some recoveries still cant find the phones model number. Something looks super broken :(

Also do you happen to have any CM12 build from june/july on you? Does anyone?

The builds available on cm are all unstable - crashes when opening play store, youtube, calculator (yes i have tried that fix already) and are generally crash-happy and slow.
[RAZR HD Android Development] Zeljko1234:
I have one older build from June.
[RAZR HD Android Development] amedeh123:
Thanks a lot! Was looking for that, but among all this trouble with flashing and bootlooping I ended up losing mine :D

Now I just need to make this flashable.
[RAZR HD Android Development] CWGSM3VO:
Flash the ROM without Gapps and see if it's acting the same.
[RAZR HD Android Development] Zeljko1234:
Yeah, don't store roms on the internal memory. Mayne people reported that will not boot if is flashed from internal :confused: and if you change file system on data partition will wipe your internal too.
[RAZR HD Android Development] amedeh123:
Tried flashing with and without gapps, on ext4 and f2fs, with cm11 and cm12. All from SDCard. Wont flash at all. Seems like something else borked but I have no idea what it could be, as I said, the recovery cant determine the model number anymore, some zips will not flash because of that. No idea if it is related.

It flashed supersu on stock rom via twrp, but entire ROMs refuse to flash. And without any errors, It apparently works, but it doesnt.
[RAZR HD Android Development] CWGSM3VO:
Let's make this a little more troubleshoot-able, assuming TWRP is your recovery:

1) Format /system as ext4

2) Format /data and /data/media as f2fs (backup data)

3) Format /cache as f2fs

4) Flash CM12.1 ROM, Do not flash GApps of any kind.

5) Do the obligatory wipe cache+dalvik after flashing ROM

Before rebooting to UI:

1) return to TWRP main menu, select Mount, toggle system, return to Main menu (via back-arrow on the bottom right)

2) Select Advanced, File Manager, browse to "system" you should see it populated with a bunch of items and folders, for example, addon.d and priv-app. If you see these directories, and they have content under them, it's safe to say the ROM flashed fine.

3) Return to Main Menu, select Mount and toggle System off again.

4) Now reboot to UI.

First CM12.1 boot can take some time as things set up. Unfortunately, logcat is not available by default and has to be enabled from DevOpts which in this case, is the cart before the horse so it's not available to us. So you'll have to wait a bit, hopefully, it'll boot.

EDIT: If you're storing the ROM archive on internalSD, you'll lose the ROM, as Z pointed out. Fortunately, TWRP allows the externalSD to be mounted so this is where you want to copy the zip file. This ensures the zip file doesn't get nuked when you format /data/media but if it happens, simply copy the zip to the mounted externalSD while in TWRP (again, assumes working drivers/etc in Windows) and repeat the process.
[RAZR HD Android Development] amedeh123:
I have tried something very similar and, upon checking with the file manager, /system is still empty despite the reported "sucessfull" flash.

But I will still try the exact procedure you describe here and report back.
[RAZR HD Android Development] CWGSM3VO:
You won't see anything until system is mounted as per the instructions :)
[RAZR HD Android Development] amedeh123:
Dunno what I did differently but it flashes with your step-by-step

However, Its stuck on the boot animation for about 40 minutes now. Should I do something about it?
[RAZR HD Android Development] Zeljko1234:
Latest build or mine? I had that problem months back, solved with rsd to stock, then flashed cm11 (will stuck on boot because of musics on sd card), then flashed cm12.1 without any wipe or just regular wipe, don't remember.
[RAZR HD Android Development] CWGSM3VO:
This is where adb could solve the issue by exposing what the ROM is doing during the boot phase, depending on how far along it is whether by logcat or using dmesg to get an idea of what's going on. Unfortunately, this isn't going to help us at this stage as it's not enabled by default.

40 min is a long time, too long. It's clearly stuck on something :( Do you have an external SD card still in the phone? If so, perhaps, based on what Z said, remove the SD card before rebooting in some way (can't think of exactly how to time such an event).
[RAZR HD Android Development] Zeljko1234:
He can flash a new rom (cm11 for example), shutdown the phone in twrp, remove sd card and then just turn it on.
[RAZR HD Android Development] amedeh123:
Any specific cm11 zip? xt925-labeled builds will freeze at the bootscreen (M logo), and msm8960_common-labeled builds will error out saying the updater-script is broken.

Sould I use another recovery for this?

Booting cm12 without the SD card (flash -> power off from recovery -> remove SD -> turn on) doesnt make a difference, still looks stuck.

EDIT: Using latest 30/09 cm12 build directly from cyanogenmod
[RAZR HD Android Development] Zeljko1234:
Huh, I'm running out of ideas. When you rsd stock, could you boot it?
[RAZR HD Android Development] amedeh123:
Yes absolutely. Could even root it through twrp.
[RAZR HD Android Development] Zeljko1234:
At least something :)

Try to find my long post here how I solved similar or the same problem(s) you have now. If you find some old builds you need, just let me know. Maybe I still have it somewhere.

---------- Post added at 04:19 PM ---------- Previous post was at 04:08 PM ----------

Anyone found any news about CM13 or whatever will be the name of M?
[RAZR HD Android Development] palmbeach05:
Android M aka Android 6.0 is Android Marshmallow
[RAZR HD Android Development] Zeljko1234:
Really? :D

I asked about new CM based on Marshmallow;)
[RAZR HD Android Development] amedeh123:
IT LIVES!!1!one!!11!!

I hope this whole ordeal helps someone with the same troubles down the road. To sum it up:

- To reflash stock via RSD you HAVE to exclude "partition" and "tz" from the xml file, if you upgraded to KKBL at some point (those partitions cannot be downgraded), If in doubt use fastboot instead of RSD, as fastboot will automatically skip those files.

- Boot into the stock rom you just flashed and let it update OTA to KK

- Flash latest compatible recovery. I used TWRP 2.8.7.0

- For some reason some people cant flash cm12.1 without flashing cm11 first. And "xt925" builds are not compatible with latest recovery, you need to flash "msm8960 unified" cm11, to do that you have to edit its updater-script so it flashes in the "xt925" recovery

- Boot cm11

- Back in recovery, wipe /data /cache /data/media but DON'T wipe /system

- Flash cm12.1 and reboot

You can find RSD images (XT925) here

You can find the recovery I used here

If you want to use the fastboot method, you have to install Android SDK Tools, extract the RSD files, then run the .bat files provided inside the zips.
[RAZR HD Android Development] palmbeach05:
Oh haha, well we do need the source code for that. I was on the supersu thread earlier and from the way chainfire was talking, that hasn't been released yet, and that was i think 3-4 hrs ago.
[RAZR HD Android Development] CWGSM3VO:
http://review.cyanogenmod.org/#/c/110680/

http://review.cyanogenmod.org/#/c/110407/

Thank you [MENTION=2218140]kabaldan[/MENTION] :)
[RAZR HD Android Development] lcc014:
C, for BFQ enable, will it persist across phone power cycle ? Thanks.
[RAZR HD Android Development] CWGSM3VO:
With the commits mentioned above, yes, tomorrow's build onward will be persistently enabled.
[RAZR HD Android Development] Zeljko1234:
It's been a while since Google presented M. Now is officially released for Nexuses. Source should be out soon.
[RAZR HD Android Development] palmbeach05:
I know that this thread is for CM12/12.1 and that this is a CM11 question, but is there a way a kernel with these commits can be made up? MCP1 was making CM11 updates with a CM11 kernel and select CM12/12.1 commits merged, but since the end of Aug, he seems to have dropped off the radar

---------- Post added at 09:53 PM ---------- Previous post was at 09:52 PM ----------

I agree, rumor is the next few days
[RAZR HD Android Development] amedeh123:
In the week after releasing a new android version, they release the source code, then after 1-3 days we get an alpha AOSP build from an eager dev

We will get cm13 in a few weeks after that, and it may be stable(-ish?) right off the bat as 5.0/5.1 was for us, but we wont have most of the cm12 features/tweaks/enhacements ported to cm13 for at least a couple of months.

Thats usually how it goes when we have a well-supported device.
[RAZR HD Android Development] Zeljko1234:
Thx for troubleshooting guide, could you just add link for stock rom you flashed? And how did you flash with fastboot? Unziped stock rom and then fasboot one by one partitions?

And do you really think that Razr hd will get M? It should but I remember that dhacker did hard job to adjust kernel/libs. Not sure is he's going to do it again.
[RAZR HD Android Development] rahimali:
I've been wondering for the exact same thing because I'm still on [MENTION=4282647]MCP1[/MENTION] KKBL build... Thank you for putting my thoughts into words :D
[RAZR HD Android Development] lcc014:
So, with nightly 0930 and your 4 lines script to enable BFQ would not persist across phone power cycle unless we install nightly build 1001 and after ?

Thanks,
[RAZR HD Android Development] CWGSM3VO:
No, it won't persist across reboots.

My 9-28+ build and official nightly 10-2+, it will.
[RAZR HD Android Development] lcc014:
C, thank you for the confirmation. I will enter those 4 lines script whenever I power cycle my phone until I install new nightly in about 2 weeks. :)
[RAZR HD Android Development] CWGSM3VO:
JBBL CM12.1 kernel:

https://github.com/CyanogenMod/android_kernel_motorola_msm8960-common/commits/cm-12.1

KKBL CM12.1 kernel:

https://github.com/CyanogenMod/android_kernel_motorola_msm8960dt-common/commits/cm-12.1

This will give you an idea of where things are. Yes, a kernel can be cobbled together for CM11 builds as MCP1 has been doing, I don't have time to do this however and my focus is CM12.1+
[RAZR HD Android Development] CWGSM3VO:
Going out on a limb here but I suspect that the jump from L to M will be smaller kernel/ROM-wise than it was from KK to L. It may not require too many changes to make it happen.
[RAZR HD Android Development] CWGSM3VO:
Built 10-2 and BFQ+IOPS is enabled for mmcblk0 but not mmcblk1 out of the box. I also enabled KSM deferred_timer as well in my build. Will be posting build soon for those who want to try.

EDIT: I have been tracking a few things and found what appears to be a sweet spot for this device. One thing I found crawling CM commits was for the victara where the min scaling freq was upped from 384Mhz to 486Mhz to reduce power consumption on scaling (I've done this, seems to be true) and I've changed hispeed_freq to 810Mhz from 1.13GHz. In 8 hours, I lost exactly 8% battery according to battery graph. 1%/hr is acceptable to me but still needs further testing to flesh it out. Just something of interest I thought I'd mention. (this works out math-wise to 4 days 4 hrs under ideal/non-realistic conditions of battery time)
[RAZR HD Android Development] lcc014:
C, thank you. :)
[RAZR HD Android Development] MCP1:
I was thinking about it, gonna try to build a new version with the latest Kabaldan kernel commits, that should be easy. Just have to check if there is any change requirement in android side.
[RAZR HD Android Development] Zeljko1234:
I'm thinking the same and let's hope it's right. M shouldn't get 6 version, more like 5.2 but probably Google wonted to pair with fruit number.

---------- Post added at 08:56 AM ---------- Previous post was at 08:53 AM ----------

I found hispeed_freq=702MHz as optimal for DCT+FLAC+BT. Boost is still 1. I may try increase min to 486 and turn off boost.
[RAZR HD Android Development] CWGSM3VO:
Here's what I'm using:

echo 486000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 810000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq

Unfortunately, in order to properly configure cpu1 as well, you need to force it online which I try from cli but turns off too fast so I haven't bothered with cpu1 yet, so it's still basically stock freqs.
[RAZR HD Android Development] Zeljko1234:
I'm using 3C CPU Manager. It's easier to play with, later will add echoes to init.d.
[RAZR HD Android Development] CWGSM3VO:
Based on my understanding of CM's init process, this may be defeated and basically not take under certain circumstances. Just a warning :)
[RAZR HD Android Development] Zeljko1234:
I'm aware of that :D What are you doing to apply boot settings?
[RAZR HD Android Development] CWGSM3VO:
I manually apply them after boot from shell ;) Otherwise, I try to build the changes into init itself each build.
[RAZR HD Android Development] Zeljko1234:
Yeah init.d is shifty in CM. Sometimes works, sometimes not, sometimes only part of settings accepted.
[RAZR HD Android Development] CWGSM3VO:
Thanks again [MENTION=2218140]kabaldan[/MENTION] :)
[RAZR HD Android Development] Zeljko1234:
Yeah, for M build! Cannot believe that we've got it so early. Our devices will just blow up! :D

Btw, it's really awesome what he did recently :)
[RAZR HD Android Development] CWGSM3VO:
I totally missed this boat :( I was referring to the commits he pushed today.
[RAZR HD Android Development] Zeljko1234:
I know what you're referring. It was joke but didn't expect that you'll fall on that :D
[RAZR HD Android Development] CWGSM3VO:
Running new build process, will post when complete. I love testing new things.
[RAZR HD Android Development] Zeljko1234:
Don't bother if is not M or at least change build prop to show 6.0.1 :D
[RAZR HD Android Development] amedeh123:
I will edit that post with links for organizations sake.

Im sure we will get M. Eventually at least

It may or may not be difficult to port M, depending on whether there was a lot of breaking changes or not.

But it has been done countless times before, we just need a dev take his time to do it. Not sure if dhacker is still supporting us, but epinter/kabaldan are capable of doing this.
[RAZR HD Android Development] Zeljko1234:
After you edit your post, would be nice to C update first. Much easier then trying to find your post in the case of emergency.

About M. Damn, I'll never find excuse to buy a new phone that way :D
[RAZR HD Android Development] Zeljko1234:
https://source.android.com/source/jack.html
[RAZR HD Android Development] CWGSM3VO:
Done.