Friday, October 11, 2013

Fixing Lag On The Barnes And Noble Nook HD+ Running Cyanogenmod 10.2

UPDATE: CyanogenMod 10.2.1 has trim enabled. Don't follow these directions. Just install 10.2.1.

I have a Nook HD+, and the only way to love this tablet is to put CyanogenMod on it, because that turns it into a very-near stock android tablet - no special Barnes & Noble stuff, and it gets really really fast.

This tablet has one huge flaw.  The memory controller has a tendency to fail when the system runs a trim operation, something that all modern Android devices have that helps keep them from slowly starting to lag more and more over time.  Here is a decent description of what trim is and why you want to have it on this device. The solution until now, even on the stock HD+ from what I can tell, is to just disable trim completely.  So, what happens is that, regardless of if you are running the stock firmware from Barnes & Noble, or if you have upgraded this tablet to CyanogenMod 10.2, this tablet will progressively get slower and slower until it is nearly unusable.

But, there is a solution, if you are willing to to take a risk.  Apparently, the Nexus 7 has the same memory controller as the Nook HD+, and Google has patched Android to fix the bug.  There hasn't yet been enough confirmation that this is fixed, so it isn't in any mainstream kernels that I can find.  But, if you are running CyanogenMod 10.2, you can flash this kernel right over your CyanogenMod 10.2 nightly and trim will be enabled.  Once it's enabled, you can run this app to fix the lag.  After running the app once, it'll probably be a while before it needs to be run again, so in case there IS a bug, just re-flash CyanogenMod Nightly to put the original kernel back.

So, to recap the steps to make the Nook HD+ not lag when running CyanogenMod 10.2:
  1. Download the patched kernel zip.
  2. Install the lagfix app.
  3. Use CyanogenMod updater to get the latest nightly ready to go.
  4. Reboot into ClockworkMod.
  5. Flash the new kernel and reboot.
  6. Run the lagfix app for all partitions.
  7. Reboot into ClockworkMod again.
  8. Flash the latest nightly zip (which will swap in a kernel without the fix for protection).
  9. Enjoy Fast Tablet.


  1. Thank you for the instructions. Worked a treat on Nook HD+ 16Gb.

  2. How is your stability with CM 10.2 (before & after patched kernel)?

  3. Additionally, I'm not sure I understand why LagFix would need to be installed, as Android 4.3 is supposed to have trim enabled automatically, so it seems that the kernel patch would have fixed the memory controller issue, allowing CM 10.2 to operate lag-free without the LagFix app being necessary.

  4. Jonathan, stability has been excellent on my Nook HD+. I used lagfix because it takes a while for the automatic fstrim to kick in on Android 4.3 and I didn't want that experimental and older kernel on my machine any longer than necessary.

    The Android framework will send out a “start idle maintenance window” event that the MountService listens for, and then invokes vold to fstrim filesystems when a few conditions have been met – the device hasn’t been touched for over an hour, no idle maintenance window event has been sent in 24 hours, and the device is either off-charger with 80% battery or on-charger with 30% battery. The goal is to have fstrim run roughly once every 24 hours if you’re in the habit of plugging the device in to charge every night.

  5. I had missed your note on step 8, makes more sense now.

    CM 10.2 is overdue for stable release, so I'm trying to prod along the devs on the Github repo. Hoping to be able to upgrade to 10.2 official stable soon without needing to jump through other hoops (such as what you had to do above for the trim fix).

  6. I haven't seen any indication that CM is planning on turning fstrim on for this device in the stable release. Have you? If CM doesn't, then this is probably still going to be necessary for some people.

  7. how do i boot into clockwork mod

  8. Kenny, if you have already rooted your device and installed clockworkmod, then simply use the app to reboot into recovery. If you have not Rooted yet, then these directions should help you :

  9. When you say "flash the latest nightly zip", that means only install cyanogenmod 10.2? Also, does that also mean don't clear partition, clear cache and dalvik cache? Just install cyanogenmod?

  10. HowYouDoiin, yes, yes, yes. :-)

  11. forgive me I am very new at this.I used the cyogen mod 10.2 worked great till it slowed down.I got into clockwork ty. Step 5-8 confuse me can you please clarify.Sorry about asking for baby steps and thanks so much for answering my question.

  12. You flash a kernel by putting the zip file for the kernel in the internal storage of your tablet and inside of ClockworkMod, choosing to flash the zip. It's very similar to how you installed cyanogenmod except this zip file only contains the kernel whereas the cyanogenmod zip contains the kernel plus a whole lot of other stuff. Step 4&5 and step 7&8 are identical except for the zip file you choose to install.

    Here's a video that shows how to flash a zip in ClockworkMod:

  13. David, have you tried out the latest Cyanogenmod 11 on your Nook HD+ yet?

  14. after i do #4 it reboots and says has stopped over and over all i can do is click ok over and over. I tried for giggles to update to the latest nightly from the tablet inside clockwork and it fails. Im at a loss.

  15. Kenny, that sounds like a bootloop. Go to step 7 to get back to Cyanogenmod.

  16. thank you for all your help. In my search about trim I came across cm11 and it has trim enabled so I installed the ROM then installed lagfix as well. Works great! CPU was a constant 40-50% and ram constant 150mb ow way less free! Now its running in single digits to 30% unless under a load an free ram is between 400 idle and 128 with a load. Thanks for your help and God bless!

  17. how do you enable trim on CM 11? I just installed 11 over 10.1 and it's very laggy

  18. Wendy, you don't have to do anything. When the screen hasn't been used in a certain period and battery life >70% or so, trim will automatically run. Just leave it plugged in at night and trim will run in a day or two.

  19. Hi, thanks so much for posting this information - but would you mind please explaining a bit more steps 5 and 8, i.e. how one 'flashes' a kernel and a zip? Many thanks :-)

  20. Hi Jonathan, this little blog post assumes that you already have Cyanogenmod installed on your Nook HD+. So, I glossed over them because they are outside the scope of this article. If you don't already have Cyanogenmod installed, you can jump straight to installing Cyanogenmod 11 (which is now what I use) and ignore the rest of this article.

    It sounds like you have a stock Nook, so you need to install ClockworkMod and Cyanogen from scratch. This is known as Rooting and Romming. Trust me, it's worth it. When done, you'll have a REAL android tablet (not just a reader) with the latest version of Android KitKat and it'll be REALLY fast. Here are the directions you should follow:

    As the directions say, since you have a Nook HD+ (the big one), you'll need the following files:
    And, the most recent snapshot from here:



Bookmark and Share