Tutorial  Updated

PSA: Check your data!!!

Hi at all,

it is a well known fact (at least since Samsung's infamous 840 EVO scandal) that data on NAND is volatile. That means it gets harder for a controller to read "old" data.
That is the case for our SD cards in nintendo switch consoles. Last year in October 2022 I bought a large 512GB SanDisk Ultra card (NO FAKE) for 40 bucks. It worked well. Until I updated Mario Kart 8 to its last update a few days ago and was astonished by the long track loading times (40 secs). On my other switch (512GB Samsung drive) there was 9 second loading.
So I switched cards to make sure it was not the SD reader or something else. Same result. Then I refreshed the data on the faulty card (DiskFresh freeware tool by Pugan Software). Of course you can copy your data, then quick format and paste your data back which has the exact same effect: Every sector is written again.
It took me a whole day to refresh the sectors. After that the card was as fast as usual. It maxes out the switch's SD reader for sure. Since I have come by several threads complaining about slow SD cards and those being fake... this is NOT always the case as shown here. simply refresh your data once in a while and it restores your SD card speeds to maximum.

tl;dr:

Not only things in your refrigerator get old as time goes by. DATA GETS OLD AND SLOW. Please refresh your data once in a while. Since we all install our games once and never write data to that spot ever again, it gets slow over time. This is not a huge deal for SSDs (SATA or Nvme, since those have firmware which handle refreshing data accordingly). But SD cards are dumb and the switch obviously does not manage data to keep it fresh.


Best wishes!
 
Last edited by naddel81,

naddel81

Well-Known Member
OP
Member
Joined
Dec 14, 2009
Messages
2,549
Trophies
1
XP
3,798
Country
United States
This is a very dramatic reaction to an uncommon issue.
quite the opposite. I agree that it is unknown to most users, but the fact that data is volatile even on NAND flash is proven fact and slows down most devices that do not have wear leveling or refreshing algorithms in their firmware. which obviously holds true for SD cards.
Post automatically merged:

"

NAND Leakage


Taking a look at memory cards, in particular, one thing regular consumer SD/microSD cards are not good for is long-term storage (more than a year and never more than 5 years). This is because the charge in the cells will leak away over time. There are special write-once SD cards, usually found on industrial-grade memory cards which are designed for archival purposes where each cell is permanently fused to either On or Off. If a consumer-grade card is ‘at rest’ and has not been used for a number of years, the card will eventually become corrupt and unreadable."

Source: https://www.simms.co.uk/tech-talk/n...his is because the charge,to either On or Off.
 
Last edited by naddel81,

H1B1Esquire

RxTools, the ultimate CFW machine.
Member
Joined
Nov 2, 2016
Messages
3,732
Trophies
1
Age
36
Location
Earth, bro-dude.
XP
2,868
Country
United States
of course I have plenty of backups.

I meant it as a suggestion; I also didn’t go too deep in:
•using DBI to dump
•using atmotitelxl to install
•etc,.

Also tried to give the community some advice, as well as anyone lurking who was curious/scared about degradation and ways to think critically.


Long thread; page two:
Any SD card can corrupt||have a class 10/v3||keep backups in a separate drive with a multi-year warranty||
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,360
Trophies
1
XP
3,284
Country
I have doubts that you need to rewrite the data. I never had to do that for any of my SD cards. Reading the data multiple times sequentially should be enough to make the controller inside the SD refresh the data as needed.

The issue with the 840 Evo was that it used a bit too cutting edge, single layer flash. As it turns out the flash cell size is a very big factor in how long it will store the charge. The flash in the 840 Evo was somewhere around 20nm if i recall correctly and that was way too small causing the cells to lose charge quickly and the controller had issues reading the data. That's why it slowed down. Since then we got 3D NAND/V-NAND which solves the issue by stacking layers instead of shrinking them.

As someone else said i would test the card with h2testw because the price definitely sounds too good to be true if you ask me.
 
  • Like
Reactions: naddel81

naddel81

Well-Known Member
OP
Member
Joined
Dec 14, 2009
Messages
2,549
Trophies
1
XP
3,798
Country
United States
I have doubts that you need to rewrite the data. I never had to do that for any of my SD cards. Reading the data multiple times sequentially should be enough to make the controller inside the SD refresh the data as needed.

The issue with the 840 Evo was that it used a bit too cutting edge, single layer flash. As it turns out the flash cell size is a very big factor in how long it will store the charge. The flash in the 840 Evo was somewhere around 20nm if i recall correctly and that was way too small causing the cells to lose charge quickly and the controller had issues reading the data. That's why it slowed down. Since then we got 3D NAND/V-NAND which solves the issue by stacking layers instead of shrinking them.

As someone else said i would test the card with h2testw because the price definitely sounds too good to be true if you ask me.
it is a genuine card according to h2testw.
also data was read multiple times. game still was slow as hell. loading times up to 4x slower than usual. after re-writing it was OK again.
 

Nynrah

Well-Known Member
Member
Joined
Jun 27, 2020
Messages
207
Trophies
0
Age
32
XP
1,046
Country
Netherlands
I have doubts that you need to rewrite the data. I never had to do that for any of my SD cards. Reading the data multiple times sequentially should be enough to make the controller inside the SD refresh the data as needed.

The issue with the 840 Evo was that it used a bit too cutting edge, single layer flash. As it turns out the flash cell size is a very big factor in how long it will store the charge. The flash in the 840 Evo was somewhere around 20nm if i recall correctly and that was way too small causing the cells to lose charge quickly and the controller had issues reading the data. That's why it slowed down. Since then we got 3D NAND/V-NAND which solves the issue by stacking layers instead of shrinking them.

As someone else said i would test the card with h2testw because the price definitely sounds too good to be true if you ask me.
Now this is something I've never been able to find a clear answer to. I get that if I do absolutely nothing for a long period of time, the charges in the cells slowly leak. But is reading of just powering up an sd card not enough to refresh the charges? Or must it per se be a rewrite of the cell?
Post automatically merged:

yes, card is totally fine. you obviously have not heard about Samsung Evo 840 which started the whole "what? SSD data is not forever" discussion to begin with. at least for end consumers.
Post automatically merged:


Nah, it is not as easy as you say. I wish it was. I have only brand cards, no fakes. I test them all with h2testw. And it is a scientifically proven fact that data on NAND is NOT forever. if you try to read your oldest (written!) data, you will be astonished.
it is NOT about the age of your cards, you are getting things wrong here. it is about how old data on these NAND cells is.
Wii U just showed the same problem a few months ago by "forgetting" data on its NAND. it is the same for every NAND out there.
My SD cards I'm not too worried about because I can refresh those manually if I have to. What I'm worried about is the internal flash memory in my handshelds and consoles. The flash memory on my Wii U, 3DS and PSTV is not something I can plug into my computer and refresh just like that.

I hoped powering up these devices regularly would suffice. Is that enough? What can be done if it that isn't good enough?
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,360
Trophies
1
XP
3,284
Country
Now this is something I've never been able to find a clear answer to. I get that if I do absolutely nothing for a long period of time, the charges in the cells slowly leak. But is reading of just powering up an sd card not enough to refresh the charges? Or must it per se be a rewrite of the cell?
Depends on the type of flash media. eMMC as found in the consoles you listed is meant to be soldered to the mainboard. I assume they have various mechanisms in place to prevent data loss. eMMC is quite reliable unless you got chips with bad firmware or defect ones like on certain models of the Wii U (see the whole drama about defect system memory).

I would not worry too much about it. Make backups and maybe check hashes of files sometimes. The controller on modern flash media will notice if data is corrupting or too slow to access and it will usually correct these errors if you try to access the data.
 

naddel81

Well-Known Member
OP
Member
Joined
Dec 14, 2009
Messages
2,549
Trophies
1
XP
3,798
Country
United States
I haven't used my Switch in a while, but recently when I booted it up, it took a very long time to load everything. Went ahead and tried the Diskfresh app and now my Switch is running very smoothly now.
That is a common issue for all NAND flash based storage devices, unfortunately. I am wondering why there are not more switch users noticing this. it exists and is reproducible.
 

Nynrah

Well-Known Member
Member
Joined
Jun 27, 2020
Messages
207
Trophies
0
Age
32
XP
1,046
Country
Netherlands
That is a common issue for all NAND flash based storage devices, unfortunately. I am wondering why there are not more switch users noticing this. it exists and is reproducible.
Can you also confirm whether the firmware of consoles and handhelds which is stored in embedded (eMMC?) memory is subject to this same detoriation? This kind of memory can't be refreshed by hand, hence the question. Can you concur ghjfdtg's statement (a few posts back)?
 

Nazosan

Well-Known Member
Member
Joined
May 12, 2009
Messages
576
Trophies
1
XP
1,089
Country
United States
I got curious when this popped up and tried to look into it. Firstly, I can't find any confirmation of this "scientific proof" that doesn't cite sources of NAND storage supposedly being volatile and loses charge quickly (one to five years is quick in regards to this type of tech. I could accept it if you meant 100 years, but not one.) BTW if this problem were real you should be more concerned about your eMMC since you almost certainly haven't swapped it out the entire time you owned your Switch, yet it's literally the same exact tech (so literally that it can be wired to a SD card reader -- it's not just a generic NAND chip.) Remember, a key part of the reason write performance on NAND storage is that it must actually do an erase to a cell before data can be written in because it does essentially do a semi-permanent write that then has to be cleared to write to the same cell again. I think if you look around at older hardware, you'll find a lot of people using quite a lot of devices from way back with NAND and none of it has "leaked data." Some even go back to the 1990s or so. That's rather a lot longer than any Switch console...

What I can tell you is I personally had a card slow to such a craw that saving a game with 100KB saves would freeze up the entire system momentarily when running emuMMC. (Write speeds on any sustained transfer literally would drop below 100KB/s.) This was an issue of cells being worn out. It's worth noting that I use my Switch virtually every day, so you can't try to claim its charge "leaked out." Rather the opposite -- lots of little writes over time added up to probably every single cell having finally been used enough times to push the limits of what they could handle without a proper clearing. The chip is supposed to manage this automatically, but I think after it has been going long enough combined with how little space I really had free it no longer can do a great job of it. Unfortunately, I have yet to find a single MicroSD card that would work with a SSD-style trim command in Linux or otherwise. Even the most expensive ones report trim not supported. (Well, it may depend more on the card reader than the card, but even a really good one I have won't do it.) The key here is the cells must not be written to but must still do the erase as if they were about to be so that the next write to each cell finds it already ready for writes. A trim command properly does this on hardware that supports it, but, again, I've yet to see a MicroSD card that would accept the command. For now I gave up on that card. It was overdue for an upgrade anyway and these days even a 512GB card is pretty affordable.

So slowdowns are possible, but it's almost definitely just a worn out card from long term use in need of a trim. The issue, ironically, is the opposite. Rather than volatility, it's actually the lack of volatility... As for how to actually properly force the trim, I'm not sure. Generally just writing to it isn't enough. But perhaps the management chip itself tries to trigger trims under certain conditions, and perhaps the OP managed to accidentally trigger one such condition. What I do know is the obvious stuff such as the SD Association format tool doesn't do it even when set to do a full erase (that just means it writes zeros, not a true erase.) I would be interested to know if someone does know a way to do a proper trim on a card. I'd still love to save that card to be used in other things, but at < 100KB/s for sustained transfers it's kind of useless for most things.
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,360
Trophies
1
XP
3,284
Country
Unfortunately, I have yet to find a single MicroSD card that would work with a SSD-style trim command in Linux or otherwise. Even the most expensive ones report trim not supported. (Well, it may depend more on the card reader than the card, but even a really good one I have won't do it.)
Then you have not been looking hard enough. Every single card i got in recent years does support erase (which is what the blkdiscard/fstrim tools use). And yes, this requires a native or PCIe card reader. USB will not work because USB card readers pretend to be regular flash drives and don't pass through commands.
 
  • Like
Reactions: naddel81

Nazosan

Well-Known Member
Member
Joined
May 12, 2009
Messages
576
Trophies
1
XP
1,089
Country
United States
Ok, that was rather an important detail you just kind of glossed over there. You speak as if PCI-E card readers are not only the norm, but practically the only thing existing. I've never even seen one personally. Memory cards have used primarily USB-based readers since pretty much the times of MMC even being a thing. I've seen a PCMCIA CompactFlash adapter, but definitely never a SD card reader in ISA or PCI format, much less PCI-E which pretty much came about after USB 3.0 already was a standard and already able to exceed anything even the best current gen memory cards can truly sustain.

I'm sure they exist, but they are definitely not the norm and most people will not even think to ever look for one. In fact, outside of low level commands like trim operations I simply can't think of any reason anyone would want to deal with one.


BTW as a side note, one reason a lot of people see really long startups sometimes is simply Atmosphere doing its maintenance stuff. It especially does a bunch of stuff after an update, but there are times it clears logs and etc. I forgot the specific triggers. That doesn't mean it's time to "refresh" your memory card, it just means be patient once and then next time it should boot quicker. People likely forget because generally one doesn't really shut down the Switch that often. Also, if you are shutting down your Switch, give it a few moments -- it's not actually fully off when the screen powers down and could still be doing some background writes to the card. Removing the card too quickly is bad for the card and the reader both.
 

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,360
Trophies
1
XP
3,284
Country
Ok, that was rather an important detail you just kind of glossed over there. You speak as if PCI-E card readers are not only the norm, but practically the only thing existing. I've never even seen one personally. Memory cards have used primarily USB-based readers since pretty much the times of MMC even being a thing. I've seen a PCMCIA CompactFlash adapter, but definitely never a SD card reader in ISA or PCI format, much less PCI-E which pretty much came about after USB 3.0 already was a standard and already able to exceed anything even the best current gen memory cards can truly sustain.

I'm sure they exist, but they are definitely not the norm and most people will not even think to ever look for one. In fact, outside of low level commands like trim operations I simply can't think of any reason anyone would want to deal with one.
Not sure which part of my message you interpreted as "only thing existing". I didn't say they are common. They can often be found in laptops which is the case for mine. And their advantage is faster speeds/access time and low level access to the SD card. With the new SDExpress standard PCIe readers will become important once the cards are on the market.

You have a reader that allows low level access if your SD card appears as "/dev/mmcblkX" for example when using the lsblk command.

edit:
And you know what is the best part? The Switch does have such a native card reader. If you boot into Linux you will be able to use blkdiscard/fstrim. The Raspberry Pi is also a device with native card reader.
 
Last edited by ghjfdtg,

Nazosan

Well-Known Member
Member
Joined
May 12, 2009
Messages
576
Trophies
1
XP
1,089
Country
United States
edit:
And you know what is the best part? The Switch does have such a native card reader. If you boot into Linux you will be able to use blkdiscard/fstrim. The Raspberry Pi is also a device with native card reader.
Actually, this is a useful thought. The Switch in Linux mode or a Raspberry Pi would probably suffice as a good way to gain such low level access. They should be excellent options for a trim. Come to think of it, it sure would be nice if Hekate had such an option since I guess the main OS doesn't do it, yet it's so very necessary.

This is actually worth adding to the whole original idea of all this. The maintenance people should actually be doing from time to time to their cards is really a trim to help with wear leveling and performance in general, not full card writes (which doesn't really trim except perhaps incidentally if you're really lucky) and maybe there is a realistic way to do it after all. Unfortunately the Switch OS and games both take it for granted that it can do writes all the time and it can definitely be an issue long term possibly since eventually every cell will be in a non-erased state.
 

PositiveOcelot

Member
Newcomer
Joined
Dec 2, 2023
Messages
10
Trophies
0
Age
34
XP
29
Country
Greece
How exactly can someone refresh the data on a SD Card? You just right click and then refresh?

You copy the data to your desktop and then you copy it back to the SD card?
 
  • Like
Reactions: naddel81

ghjfdtg

Well-Known Member
Member
Joined
Jul 13, 2014
Messages
1,360
Trophies
1
XP
3,284
Country
And to add another little detail most if not all ARM devices do have native readers (it's baked into the main SoC). PCIe readers you usually only find in PCs or laptops.

And i almost forgot but if fstrim fails anyway you may have to mount the SD card partitions with the "discard" option. I think for non-boot media it will already do that.
 

DCG

Well-Known Member
Member
Joined
Jan 1, 2010
Messages
697
Trophies
1
Age
32
Location
Schiedam
XP
935
Country
Netherlands
I have plenty of old SD cards with data that is years old.
Shit still works fine and as speedy as the day I put it on there.

Just get a good reliable branded SD card and backup your data.
Nothing much to worry about if you keep backups.

Got multiple old, good brand micro sd's from the DS flashcard era, about 3/5th are dead or partially corrupted, jpg's with messed up names, not getting recognised as images anymore, just plain not working anymore.

I like ssd's for their speed, but my server mostly runs on HDD's, as they are still a bit more reliable in the way I use them.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    S @ salazarcosplay: @BakerMan can one play cod from hen ps3?