Log warnings with 64GB SanDisk Extreme

Hi,

When I use a 64GB SanDisk Extreme SD card in my V5.1 kit I get a number of warnings in the syslog:

zynthian kernel: mmc0: running CQE recovery
zynthian kernel: mmc0: running CQE recovery
...
zynthian kernel: mmc0: running CQE recovery
zynthian kernel: mmc0: running CQE recovery

Also I once had an I/O error amidst these warnings. It only disappeared after new installation of the image file.

It seems that some SD cards have problems with “command queuing” (no idea what that is).

The solution to this is adding the following to ‘/boot/firmware/config.txt’:

# Disable command queuing on main SD card
dtparam=sd_cqe=0

The documentation about this parameter:

        sd_cqe            Modify Command Queuing behaviour on the main SD
                                interface. Legal values are:
                                0: disable CQ
                                1: allow CQ for known-good SD A2 cards, and all
                                   eMMC cards
                                2: allow CQ for all SD A2 cards that aren't
                                   known-bad, and all eMMC cards.
                                (2712 only, default "1")

After adding this the warnings stopped. So far the I/O errors stay away too.

kind regards,

Hans.

ps. The 32GB SanDisk Extreme does not give these warnings.

1 Like

Is this when the microSD is inserted directly in RPi5, or when it is in the extended card reader? Normally, sd_cqe should not make any difference, because bus signal speed is the same with sd_cpe enabled or disabled, it is just a different way data is negotiated and transferred, which has to be supported by the card to make it work, in first place.

I have some SanDisk Extreme 64GB and all run totally fine on A2 mode with sd_cqe automatically enabled.

Maybe you have older versions of the cards without the A2 logo? Are you sure they are genuine, anyway? Do not try to force enable sd_cpe if the card does not have the A1 or A2 logo, becasue it just won’t work.

Or did you flash them with Etcher?

Is this when the microSD is inserted directly in RPi5, or when it is in the extended card reader?

Extended card reader

Maybe you have older versions of the cards without the A2 logo?

Are you sure they are genuine

Yep

Or did you flash them with Etcher?

No, never used Etcher. Always Win32imager or Raspberry Pi Imager, for me the first is a little more reliable.

As I said, I don’t know the technical details, but it definitely works. Without the parameter I get at least a dozen mmc0: running CQE recovery messages, with the parameter not one. Also I first had some I/O errors on the card, that are gone too.

So, I don’t know if it works theoretically, but in practice it does. Perhaps if people suffer from unreliable 64GB cards, this can help them.

Kind regards,

Hans.

New info.

I just tested the 64GB card directly in the SD slot on the RPi (so not via the extended card reader) and then everything works fine.

In syslog:

zynthian kernel: mmc0: Command Queue Engine enabled, 31 tags

and not one CQE recovery warning.

So the problem is the unreliable SD card adapter flatcable.

@jofemodo: About 10 days ago I asked if I could get a new one because it was unreliable. I haven’t received anything yet, so could I please have one? It’s going from bad to worse.

Problem with SD card connector

Could this be the issue:

1 Like

Hi @HansR !

Sorry, i totally forgot to send you the SD-card harnesses,

Please, try the solution proposed by @simmeah and linked above by @tunagenes. If it doesn’t’ work, i will send you a pair of SD-card harnesses.

Regards,

1 Like

Hi @jofemodo ,

I will try it, I hope the cable isn’t too much damaged by the bumps.

As I have completely disassembled the Zynthian for the removal of the bumps, I can now install an HDMI extension cable (on the front, there is no room elsewhere).

Regards,

Hans

1 Like

Hi @jofemodo

Bad luck.

After removing all the bumps, the connectors for the control board and USB-C worked fine, but the SD card connector is now dead:

Card directly in the Pi works fine.

Fortunately my new HDMI connector works fine so diagnosing is a lot easier :wink: If anyone is interested I can post some photos.

Kind regards,

Hans.

Yes, please.

is It the connectors or is t the cable? i mean, did you break the connector? could you send some puctures?

Regards

1 Like

It is the cable. The connector is ok I think (looks ok).


Regards,
Hans

I made a new topic:

Hi @jofemodo,

As an experiment I tested the SD card with a different kind of extender:

This works flawless, so these extenders can work in principle with a card in A2 mode.

Of course I’m not letting such an adapter dangle outboard, there are limits :wink:

For my cable I strongly suspect the SD card end to be bad, not the FFC connector end. I would be happy to receive a replacement.

kind regards,

Hans.

Please, @HansR ,

Send me your shipping address by private message and i will send you the SD-card extender.

Regards,

1 Like