Mounting sd card causes following error

HI ALL,

So I switched operating system to Linux (manjaro) when added the Serial + Mass Storage and try to load the ad card directly it seems to bring up the following error.

reads:
Failed to open directory “Label”
Error when getting information for file “/run/media/maxb/PEACE/Space Stone”: input/output error

the sd card is also having a similar issue.

Could you copy and paste instead, the image isn’t working.

Sounds like the SD card has some corruption.
I would recommend formatting it and copying the files back.
Make sure to always unmount the SD card before disconnecting or programming the board.

That’s the second sd card. And every time I try to eject it says that the card is busy.

I’ll try formatting it on a Windows laptop and see if that helps.

Thanks @profezzorn

Do you have a shell with the current directory in the sd card?
If not, some other process is doing something to the sd card.
You can use “fuser -m $MP” to find out what program is using the sd card.
(Where $MP is the sd card mount point.)

the exact error I get when ejecting is

Failed to eject “label”
error ejecting /dev/mmcblk0: command line `eject '/dev/mmcblk0"
exited with non-zero exit status 1: eject: unable to eject.

I ran the fuser command and there was no output.

I think “ejecting” is the wrong thing here. You need to unmount it.
The “eject” command is for ejecting CDs and/or tapes.

2 Likes

aaah OK. thanks

I “fixed” the sd card. looking good.
EDIT: I am now seeing that when I try to change the font it has a delay of about 4 to 6 seconds before it changes the font.

2 Likes

I noticed that after I flashed the board
With serial + Mass Storage the font changes where delayed however changing it back to only serial didn’t resolve it.

Are you talking about switching presets on the saber?
Having Mass Storage enabled or not should have nothing to do with on board performance once the handshaking with the computer part is done.

1 Like

I know of three reasons why changing fonts may take extra time:

  1. the computer is using the SD card, so proffieos has to wait before it can use it. However, this should not be the case if the mass storage is not on.

  2. The SD card itself has problems reading some of it’s blocks, causing it to invoke it’s crc resolution algorithms, which may be pretty slow in some cases. Try a different SD card, does that make the slowness go away?

  3. At some point, the font directory had a LOT of files in it. This would make the directory table very long, and deleting the files generally doesn’t make it shorter again. Creating a new directory and moving the files there would fix it. The old directory can be deleted and the new directory can be renamed to the same name as the old directory. Obviously, formatting the SD card also works.

Obviously, there may be other reasons.

1 Like

Ok I’ll try a different sd card. I was having some issues with this sdcard earlier and I had reformatted it

I tried an sdcard on my build and the issue is still happening. This sd card has a lot font folders. I copied the folders from the backup to this new one.

Hmm, weird.
If you turn on “show timestamps” in the serial monitor, maybe we can get a slightly better view of what is taking the time?

I reformatted the good working one and it’s now responding better. I also optimized the font folders that didn’t have any subfolders. so yeah.

That’s not going to make it faster though.
Try reading the sd card section on this page:

You can measure what is actually better with the “sdtest” command.
I think the current best practices is to create a directory for any group of wav files which have more than one file in it.

that’s what i meant, seeing as the font folder is the main one and the other folders are subfolders.

Ah, I see. For some reason I read that backwards and thought you put all the files in one directory…

1 Like

I checked the old sdcard on gnome-disk and badblocks and there is no errors. I may check that sd card again and see if the issue is fixed on that.