yashsingh1/xdaforums huggingface dataset:
[Nook HD, HD+ Android Development] razholio:
nope, I saw that as well. I went back to 10/7, though there maybe other nightlies that work as well.
[Nook HD, HD+ Android Development] huntz:
Have you a direct link to the 10/7 nightly?

Thank you! :)
[Nook HD, HD+ Android Development] razholio:
this is not entirely true. the kernel in 10.1.3 (which I believe is actually the stock nook/ICS kernel) does have trim support, but there wasn't anything in android at that time to call it on any schedule so the only way you could realize the benefit was to use an app like lagfix that implemented the user space portion of that functionality. I believe you could even setup schedules with lagfix so it would call fstrim (which calls the kernel system call trim() on /data and /cache) nightly for example.

The main reason not to do this in 10.1.3 is that the trim() function in that kernel used a 'less safe' method that might cause corruption or brickage with the eMMC. The kernel in 10.2, however, utilizes the fix that google applied to 4.3 for the nexus7 which also has a samsung eMMC that is believed to be vulnerable. None of this is certain, however. It's possible you won't brick with the 10.1.3 kernel using lagfix, and it's also possible that you *will* brick with 10.2 and the trim-enabled kernel. I've chosen what I believe to be the safer route of using 10.2 with the trim-enabled kernel. I bought my HD+ with AMEX, so i've got 2yrs of warranty on it. This does make it easier for me to play fast and loose with potentially bricking behavior, though...

---------- Post added at 11:40 AM ---------- Previous post was at 11:39 AM ----------

nope. but I'll try to remember to upload it to my box account and make the link public. someone let me know if this is verboten...
[Nook HD, HD+ Android Development] huntz:
Thank you [MENTION=3821825]razholio[/MENTION]!

After some days of testing with 10.2 M1 I have noticed some problems with WIFI (as many other users have reported).

In my case, putting the device in "Airplane mode" for 10 seconds, seems to resolve the problem, so I can live with the bug (waiting some good nightly build to come...)

I have also tried to downgrade to CM 10.1.3, wiping cache and dalvik and flashing cm-10.1.3-ovation.zip and gapps-jb-20130812-signed.zip, but the HD+ will not boot anymore (stuck on the boot animation). What I'm doing wrong? :confused:

For now I have flashad again 10.2 M1 + gapps + fix kernel with the WIFI bug...
[Nook HD, HD+ Android Development] rkeller62:
I also had that problem when trying to downgrade from 10.2 to 10.1.3. Finally ended up just performing a full Factory Data Reset to get to 10.1.3. I feel this version is somewhat more stable than 10.2 so I am happy with it.

I do manually run fstrim to keep the lag at bay, but have a non-affected emmc chip.
[Nook HD, HD+ Android Development] DanielNTX:
The file trimfix-kernel-hummingbird-2.zip doesn't work on the Nook HD. It won't boot and just stays at a stuck screen immediately. The trimfix-kernel-ovation-2.zip does work on the HD+.

This is not true. If you have a Samsung chip in your Nook HD you can have the problem. The fstrim command will not function when using verbose on the HD, it does on the HD+ with kernel fix.
[Nook HD, HD+ Android Development] SweetwaterBurns:
I'll second that. I lost the cyanboot screen and can't get back into recovery... Time to scrounge up an SD card and hope that I can boot from it.
[Nook HD, HD+ Android Development] razholio:
No problem. Here it is:

https://app.box.com/s/m5b2derptw4z5tg1bfed
[Nook HD, HD+ Android Development] huntz:
Thank you. I'm using it now.

Note: even downgrading from CM10.2 M1, I had to do a factory reset. Flashing and cleaning cache/dalvik only, ended into a boot-loop...
[Nook HD, HD+ Android Development] DanielNTX:
It's been fixed. VeryGreen will be posting the new link soon.
[Nook HD, HD+ Android Development] razholio:
not sure if fstrim is trimming...

verygreen: I've been running 10.2 nightlies with the old trim kernel for quite a while now and have not seen the dramatic increase in lag that I saw before I started using lagfix on 10.1.3. However, I do see something odd when I run 'fstrim -v /data'. It takes a few seconds, and reports that is has cleaned about 13GB, but then rerunning that command a few minutes later reports the exact same thing, even after a reboot. On my linux workstation, subsequent runs of fstrim don't report the same thing, in fact, so long as no I/O has occured on the disk, I get nothing back from subsequent runs of fstrim. Is this expected behavior? I've done this on both the old and new trim-enabled kernels.
[Nook HD, HD+ Android Development] verygreen:
It looks like I should have paid a bit more attention about the nook HD trim kernel, I packaged an ovation kernel in there by mistake.

Here's the updated Nook HD trim-enabled kernel: trimfix-kernel-hummingbird-3.zip

Sorry for the extra trouble.
[Nook HD, HD+ Android Development] verygreen:
I think the kernel we use always reports the number of free blocks on the device it processed. They might have updated that in the newer kernels for all I know (and that's what you probably use on your desktop).
[Nook HD, HD+ Android Development] Phenomeno:
Hi [MENTION=3654172]verygreen[/MENTION], could you please build a Trim enabled kernel with overclocked GPU as you did on this thread http://xdaforums.com/showpost.php?p=43269078&postcount=1238 ?

If so I will be happy to test it on my Nook HD+ 16GB with Samsun EMMC.

Maybe 512MHz will be to high for daily use but 416MHz should be fine to improve performance without overheating issues.

Referring to this thread OMAP 4470 maybe is not the best for overclocking but still has some headroom for that.

http://xdaforums.com/showthread.php?t=1971352
[Nook HD, HD+ Android Development] w1ll1m:
Just received a nook HD and flashed the 10.2 snapshot from a could of days ago and I have to admit, is running pretty well! I was wondering whether there was a kernel with a slight CPU overclock? I think running at 1.6 would make it feel a but more snappier.
[Nook HD, HD+ Android Development] rholm:
Was using 11/08 nightly with the trim kernel and was having quite a few random reboots. I did a factory reset and reinstalled. No problems so far.

I tried to go back to 10/07 and was stuck in a boot loop. If the reboots come back, I will do another factory reset and try to install 10/07 with trim. That was pretty stable for me.

Cheers,

Rich
[Nook HD, HD+ Android Development] SweetwaterBurns:
Try the trim kernel for the hd a few posts up. Let's you overclock to 1.5 and trim is a must unless you want the system slowing to crawl after a week. There is a possibility to brick with trim(and oc,) but I've been using it without issue for a while.
[Nook HD, HD+ Android Development] w1ll1m:
Thanks, grabbed and flashed the trim kernel and Firefox is more responsive, so that's good. Is trim working automatically or do I need to manually run it?
[Nook HD, HD+ Android Development] fma965:
As mentioned in the op
[Nook HD, HD+ Android Development] FoxForceFive:
Just received a brand new nook hd+ 16gb, put cm10.1 in a sd install to check the emmc out.

My chip is MAG2GA. 0X00015.

So that means I shouldn't run a trim kernel?

So do I just install the latest 10.2 from here on emmc? That will be safe?

How do I clear lag? Can I still run the manual 'vdc fstrim dotrim' in terminal safely?

Is there a safe kernel update headed to the Nook at all?

I still have the chance to upgrade to the 32gb version for just £20 more so if there's no chance of ever having a trim kernel on this I may change it.
[Nook HD, HD+ Android Development] laofan:
It is a dangerous chip.

I have the same chip as your.I try the trim kernel and run trim but did not notice noticeable improvement compared to non trim(cm10.2 M1).

But some people did see a big improvement.

Considering the chance of brick, I just go back to 10.7nightly, non trim kernel . It still runs very good for me.
[Nook HD, HD+ Android Development] FoxForceFive:
Is it worth paying the extra for the 32gb version?

Am I right in saying they have a safe chip?
[Nook HD, HD+ Android Development] jeromejones:
Hello I have the 8gb Nook Hd 7 inch. Is the trim kernel safe for my device, if not how can I check to ensure no brick? Thanks
[Nook HD, HD+ Android Development] razholio:
Try shutting down completely whenever you get a bootloop. I haven't had to factory reset once since I started doing that.

---------- Post added at 01:40 PM ---------- Previous post was at 01:35 PM ----------

You will not see the lag issue until you use up all the free blocks in the eMMC, and it has to rewrite partially filled blocks. Those with low storage use won't see lag for a long time. 32gb units will take longer to fill and lag. Everyone's experience is a little different, but don't expect any improvement from trim if yer nook is not yet lagging from the problem trim was developed to fix.
[Nook HD, HD+ Android Development] FoxForceFive:
So is there a safe way to fix the lag on a bad emmc chip?
[Nook HD, HD+ Android Development] razholio:
yes

no.

---------- Post added at 02:08 PM ---------- Previous post was at 02:01 PM ----------

safe is relative. there are but 2 ways.

1. use lagfix in 10.1.3 to call the kernel's trim() syscall that does not have the 'fix' taken from android 4.3 for the nexus7 that also has a samsung eMMC. this is decidedly risky.

2. use a trim-enabled kernel with 10.2 and let android 4.3's automagic trimification do the work for you and *probably* reduce your risk, but there is no way to know by how much. The risk of brickage in 10.2 is probably less than with 10.1.3, but we don't know by how much, if at all.

verygreen: it might be worth adding a little bit to your explanation of trim in the trim-kernel section of your first post to the effect of:

'trim can reduce the lag that results from using up the free blocks on the nook's internal storage. It will not make the nook faster than it was when you first got it, but should reduce the lag that may have built up over time. A good rule of thumb is that if your nook appears to have slowed down since you first started using it, you may be able to return it to its original speed by using a trim-enabled kernel. If it's just as slow as it's always been, then you are unlikely to perceive any benefit of the trim-enabled kernel while taking on all the risks.'
[Nook HD, HD+ Android Development] leapinlar:
The extra money for the 32GB is definitely worth it. Since the HD/HD+ uses internal memory by default for media storage, adding an SD does little good. You will want that extra space.
[Nook HD, HD+ Android Development] FoxForceFive:
So, both methods have a risk attached.

Would doing a full reinstall of a 'safe' rom & kernel remove the lag also?

That wouldn't bother me if it would keep the device running quickly & remove the risk.
[Nook HD, HD+ Android Development] daryl425:
That's what I've been doing on CM 10.1.3 on my nook hd+.

- Boot to CWM

- Clear cache

- backup

- restore

Speed things up nicely, but what a chore...
[Nook HD, HD+ Android Development] rpop:
So I've decided to go back to 10.1.3 because every game I play crashes on startup on 10.2. Predictably, I am starting to see lag again. My solution was going to be keeping an SD card lying around with the SD install of 10.2 from bokbokan's thread + trimfix-kernel-ovation-2, then booting from that so I can run TRIM with less risk of bricking whenever things start to get laggy.

My question is, when I've booted from the SD 10.2, how do I tell it to mount the internal emmc so I can run TRIM on it? It appears to mount part of it at /storage/secondary, but I don't believe that's everything as it's still somewhat laggy now even after running TRIM.

(my apologies if this belongs in the other thread linked above, I thought I'd post here as there's almost no TRIM discussion there)
[Nook HD, HD+ Android Development] starbright_:
I feel 1/3rd of the thread is about trimming.

Wouldn't you agree that opening an extra thread might be useful?

There is a lot of information hidden in this long thread, but even me, who reads quite a good part of it, is confused. Maybe just because I read all this.

So, I would encourage you to open a thread:

Trim the filesystem: Advantages/Risks ... starting with a summary of the current situation.

How to find the used flash type, is it a risky one or better what is a risky combination.

How can I know that trim will give a boost? Other ways of manually improve situation (clean filesystem and replay recovery)....
[Nook HD, HD+ Android Development] FoxForceFive:
Definitely. It's extremely hard as a new user to get all the information about trim/lag fix & bad emmc, & I'm still not 100% sure the best way to go about dealing with it!

I have done an sd 10.1.3 install & it's running fine for me, so may just stick with that as if I understand correctly that won't lag cos it's running from the sd, not the emmc, but I'm still not 100% sure on that fact.

A trim FAQ & basic guide would be extremely helpful & would have saved me an awful lot of reading (I've read most of this thread at least twice!).
[Nook HD, HD+ Android Development] dmullens:
You've only read it twice?
[Nook HD, HD+ Android Development] razholio:
I know, right? *someone's* not fully committed...
[Nook HD, HD+ Android Development] FoxForceFive:
Ha! I must have read the bits on trim 4 or 5 times, mostly before I even got the tablet! Then the rest of the thread twice to see if I'd missed any!

We really need a trim FAQ & specific queries thread imo.
[Nook HD, HD+ Android Development] jpisini:
Guys if you have one of the devices that are affected don't run trim. It isnt worth bricking your device. Do a cwm backup and then restore once a month does the same and won't brick you. No it is not as convienent but it works.
[Nook HD, HD+ Android Development] tebra:
If I brick my HD+ with trim kernel, will it be possible to boot it from sd card?

Envoyé de mon Xperia S en utilisant Tapatalk
[Nook HD, HD+ Android Development] DanielNTX:
From what I've been reading, no. If you brick it, you will not be able to boot even from SD.
[Nook HD, HD+ Android Development] leapinlar:
Yes, it will still boot from SD. Like you can boot a bootable CWM SD. But most roms on SD require some of emmc to be working, like the cache partition. Verygreen made a CM rom modified to work on a bricked emmc. It expects nothing to be on emmc. I think he posted it in his SD thread, titled something like 'no emmc'.
[Nook HD, HD+ Android Development] huntz:
Good point.

Anyway, after the patch for trim, I was not able to find any user reporting a brick.

Many users (including me) are testing 10.2 with the patched kernel with no problem at all (except the problem of WIFI stability... but it's not trim/brick related).
[Nook HD, HD+ Android Development] TeutonJon78:
Somewhere in there at least one person reported a brick. They had one of the Samsung versions (not sure of 2 or 4 type). They were running the trim kernel (or may just lagfix). Either way, it worked fine a number of times and then suddenly bricked it. Maybe back in the 90's pages?
[Nook HD, HD+ Android Development] jpisini:
To me it doesn't seem worth it. I like the idea but I don't want to lose my tablet. I would think those without extra money would be less likly to want to try it.

It does seem less likly to happen with the new kernel but I personally am not going to try it.
[Nook HD, HD+ Android Development] huntz:
I think you are referring to this post:

http://xdaforums.com/showpost.php?p=45451854&postcount=666

In this case the size was 32GB (and not the more common 16GB). Anyway, we can ask directly [MENTION=3652037]SCWells72[/MENTION] to give us more details about the brick because it's not really clear what happened... (Lagfix on 10.1 or the patched kernel on 10.2).

Hoping to get more informations about this topic... and evaluating the "statistically speaking" data.
[Nook HD, HD+ Android Development] vxkid:
status bar brightness controls

are status bar slide-to-adjust brightness controls in CM not supported by the nook hd? i can't find them where they should be (settings>interface>status bar). Oddly, I see mention of them in the nightly change logs. I'm on the 10.2 11/13 nightly now, but I couldn't find them in the 10.2 snapshot either.

Thanks.
[Nook HD, HD+ Android Development] TeutonJon78:
That's probably it (i'm not going back and re-reading all those pages). There was only one report that I remember reading, and yes, not very clear.

Thankfully, the Nook I get to administer for has the Sandisk part.
[Nook HD, HD+ Android Development] SCWells72:
Luckily I just happen to be lurking on this thread. The short version is that I had been running CM10.1 with LagFix and then, when verygreen compiled a CM10.2 kernel with TRIM enabled, that ROM. Both of those worked well for a while, and then out of the blue, immediately after running TRIM, the device powered off and would only power back on with a bootable uSD card inserted. The internal storage was dead. B&N replaced the device for me, but unfortunately the replacement device has the exact same emmc. I ran rooted stock for a while, but it was so sluggish and quirky even fresh that it eventually drove me back to CM10.1. I tried to avoid running TRIM as long as possible, but the inevitable lag became so bad again that I finally gave in and started tempting fate by running LagFix again every so often. So far, it seems to be okay, but honestly that was the case with the previous device until it keeled over!

Based upon recent activity on this thread, it seems that there's a new TRIM-enabled CM10.2 kernel that takes a (hopefully) safer approach and (again, hopefully!) minimizes the chance of the brick bug on faulty memory chips. That's actually why I'm lurking on this thread...I'm considering flashing 10.2 with that kernel since it does result in a smoother overall experience than 10.1.

Having said all that, I do feel pretty confident that I'm sitting on a ticking time bomb with this thing. Without TRIM, the lag gets so bad that the device is basically unusable, and with TRIM I'm just waiting to brick it. As a result I'm really just hoping to limp along until the Nexus 10 2 is released and I think I'm going to get one. The HD+ has convinced me that I prefer a full-sized Android tablet to my iPad 3, but I really want an Android device that provides the same sense of stability, performance, and reliability provided by that device now. If my HD+ does live long enough for me to make that switch, I'll revert to stock and either sell it (along with the iPad 3) or give it someone. Even stock it's a really nice device for someone who primarily wants a reader and media consumption device rather than a full-blown, high-performance, state-of-the-art tablet.
[Nook HD, HD+ Android Development] huntz:
Hi [MENTION=3652037]SCWells72[/MENTION] and thank you for the reply.

After searching between posts, I took some more time to investigate the bug itself.

The patch used into the kernel, actually, addresses all eMMC from Samsung with a specific firmware (turns out reading the patch's code and it's also written into the patch's comment):

manfid:

0x000015

<-- Samsung

firmware revision:

05

Here is the code: https://github.com/CyanogenMod/andr...mmit/3de09ec8e73b7352c37f50a40d696f20be454b8b

So, from the source code, the bugged firmware revision is 05.

This will explain why some users have the MAG2GA chip and can do trim with no problems.

You can check your firmware revision with this command from the terminal:

cut -b 19,20 /sys/class/block/mmcblk0/device/cid
[Nook HD, HD+ Android Development] SCWells72:
Interesting. Mine displays 06. Does that mean mine doesn't have an issue after all?
[Nook HD, HD+ Android Development] huntz:
Of course there are no guarantees (at least from me :) I'm not Mr. Samsung... ).

Anyway there is a good chance that ours eMMC (I'm on 06 too) has not this superbrick bug.

I think the eMMC with 05 firmware was on the early/first Nook HD+ production batch...

:fingers-crossed:
[Nook HD, HD+ Android Development] starbright_:
Sorry for this stupid question: What are you doing with it, so that it becomes slow? Testing new apps? Witch partition is under stress - apps or data or system?

From what I understand it is some kind of fragmentation that happens.

Are only Android 4.3 devices suffered from this slow down or all 4.x or even all Android devices?

Did you try to make backup, clean flash and recover it? I wouldn't expect that this is required only every once a while.

Unfortunately no one opened a separate thread for this TRIM stuff. And I currently haven't the knowledge nor experience with it.
[Nook HD, HD+ Android Development] huntz:
The Trim command allows the operating system to inform the flash memory which blocks of data are no longer considered in use and can be wiped internally.

Low-level operation of SSDs (and flash memory in general, like eMMC) differs significantly from hard drives, the typical way in which operating systems handle operations like deletes and formats resulted in unanticipated progressive performance degradation of write operations. This behavior, on operative systems like Android, is known as LAG.

This performance degradation is the reason why any device using flash memory (not only Android devices) is more responsive when you are starting using it (because is brand new).

On SSD disks, nowadays, the disk firmware is taking care of the trim tasks. On more simple storage memories like eMMC (eMMC is a MultiMediaCard, aka MMC, plus a controller) using a software approach is the way, like the one introduced with Android 4.3. The alternative would be to use memory modules more advanced, like recent SSD (but which have a higher production cost).

You can read more about TRIM here: http://en.wikipedia.org/wiki/Trim_(computing)
[Nook HD, HD+ Android Development] starbright_:
I take this post as opening post for a new THREAD.

With your help we can discuss all Trim related issues there.
[Nook HD, HD+ Android Development] jpisini:
I got 0b did I do it wrong?

----------edit-------------

I read it wrong should have put on my glasses it is 06 not 0b. Thanks guys
[Nook HD, HD+ Android Development] huntz:
You have to follow this tutorial:

$ su
# cd /sys/class/block/mmcblk0/device
# cat name
MAG2GA
# cat manfid
0x000015
# cut -b 19,20 cid
05 // this is the firmware revision in hex
# cat date
05/2012

This is the same info from the official CM WIKI: http://wiki.cyanogenmod.org/w/EMMC_Bugs#How_do_I_check_my_device.27s_eMMC_details.3F

Post what info are you getting... Maybe you don't have the MAG2GA chip...
[Nook HD, HD+ Android Development] starbright_:
Please continue TRIM discussion here:

http://xdaforums.com/showpost.php?p=47481362&postcount=1
[Nook HD, HD+ Android Development] TheDannemand:
Good info you've been posting about this, huntz. Others too. I have the infamous MAG2GA 16GB, but didn't realize till your recent posts that only rev 05 was affected (hopefully). I have been using M1 with verygreen's trim kernel (contained in the opening post) for several weeks with no problems (other than occasional Wi-Fi issues which is a CM bug). Maybe because I'm on rev 06.

My info:

u0_a43@ovation:/ $ su
root@ovation:/ # cd /sys/class/block/mmcblk0/device
cd /sys/class/block/mmcblk0/device
root@ovation:/sys/class/block/mmcblk0/device # cat name
cat name
MAG2GA
root@ovation:/sys/class/block/mmcblk0/device # cat manfid
cat manfid
0x000015
root@ovation:/sys/class/block/mmcblk0/device # cut -b 19,20 cid
cut -b 19,20 cid
06
root@ovation:/sys/class/block/mmcblk0/device # cat date
cat date
11/2012
root@ovation:/sys/class/block/mmcblk0/device #

I honestly don't see why we can't discuss trim in this thread, which is where the trim kernel is located. The new thread is nice in that it saves newcomers from reading here; but soon it too will contain repeats of the same questions and answers that have been posted here numerous times (including "what is the trim kernel and where do I find it"). It's the nature of threads.

If verygreen can include some of the excellent language from the last few pages in the trim section of the opening post, I think that should cover it, and avoid repeat posts about it here.