SD card problem

Hi
I have encounter problems with latest version OSMC on Rpi3. On fresh installation which goes normally, osmc starts to freze from time to time. I found that sd card write rate is very low (sometime aprox. 10kB/s) and after few seconds or minutes sdcard becomes read-only. I tried with another card and the result is the same. I tested both cards on PC and the write transfer was aprox. 10MB/s.

I found following errors in dmesg:

[13222.329700] mmc0: =========== REGISTER DUMP ===========
[13222.329705] mmc0: SDCMD  0x00000099
[13222.329710] mmc0: SDARG  0x0037c0f8
[13222.329715] mmc0: SDTOUT 0x017d7840
[13222.329720] mmc0: SDCDIV 0x00000003
[13222.329725] mmc0: SDRSP0 0x00000900
[13222.329730] mmc0: SDRSP1 0x00001918
[13222.329734] mmc0: SDRSP2 0xffffffff
[13222.329740] mmc0: SDRSP3 0x0002400f
[13222.329744] mmc0: SDHSTS 0x00000001
[13222.329749] mmc0: SDVDD  0x00000001
[13222.329754] mmc0: SDEDM  0x0001080a
[13222.329759] mmc0: SDHCFG 0x0000040e
[13222.329764] mmc0: SDHBCT 0x00000200
[13222.329768] mmc0: SDHBLC 0x00000010
[13222.329773] mmc0: ===========================================
[13222.329992] mmcblk0: error -110 transferring data, sector 3653880, nr 16, cmd response 0x900, card status 0xc00
[13232.567802] mmc0: timeout waiting for hardware interrupt.
[13232.567821] [53bea6cc] TSK< aa41bdbc 0
[13232.567831] [53bea6d9] TSK> aa41bdbc 0
[13232.567840] [d3c118d4] PRD< ad2e2a40 0
[13232.567847] [d3c118d5] PRD1 ada36d10 0

....
[13232.569690] [d45fc07a] FCM> ad2e2968 0
[13232.569697] [d45fc07a] CMD  19 200
[13232.569704] [d45fc07a] REQ> ad2e2968 0
[13232.569712] [d4f9981c] TIM< 0 0
[13232.569725] mmc0: sbc op 23 arg 0x10 flags 0x15 - resp 00000000 00000000 00000000 00000000, err 0
[13232.569737] mmc0: cmd op 25 arg 0x37c0f8 flags 0xb5 - resp 00000900 00000000 00000000 00000000, err 0
[13232.569744] mmc0: data blocks 10 blksz 200 - err 0
[13232.569754] mmc0: stop op 12 arg 0x0 flags 0x49d - resp 00000000 00000000 00000000 00000000, err 0
[13232.569759] mmc0: =========== REGISTER DUMP ===========
[13232.569763] mmc0: SDCMD  0x00000099
[13232.569769] mmc0: SDARG  0x0037c0f8
[13232.569774] mmc0: SDTOUT 0x017d7840
[13232.569779] mmc0: SDCDIV 0x00000003
[13232.569784] mmc0: SDRSP0 0x00000900
[13232.569789] mmc0: SDRSP1 0x00001918
[13232.569794] mmc0: SDRSP2 0x7fffffff
[13232.569799] mmc0: SDRSP3 0x0002482e
[13232.569803] mmc0: SDHSTS 0x00000001
[13232.569808] mmc0: SDVDD  0x00000001
[13232.569814] mmc0: SDEDM  0x0001080a
[13232.569818] mmc0: SDHCFG 0x0000040e
[13232.569823] mmc0: SDHBCT 0x00000200
[13232.569828] mmc0: SDHBLC 0x00000010
[13232.569832] mmc0: ===========================================
[13232.570065] mmcblk0: error -110 transferring data, sector 3653880, nr 16, cmd response 0x900, card status 0xc00
[13232.570582] blk_update_request: I/O error, dev mmcblk0, sector 3653880
[13232.570599] blk_update_request: I/O error, dev mmcblk0, sector 3653888
[13232.570916] Aborting journal on device mmcblk0p2-8.
[13806.022517] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:56: Detected aborted journal
[13806.022547] EXT4-fs (mmcblk0p2): Remounting filesystem read-only

Could it be software (sd card driver) problem or hardware? What should I check next?

Have you done a “real” test e.g. with this tool H2testw - Gratis-Download von heise.de

No, I only do format card to FAT32 and write files to full capacity. I also run HDTune benchmark (reads) and full scan for errors. Everything gone fine for both cards.

I will do test under H2testw as you suggest.

Sounds quite comprehensive, but still maybe H2testw finds something.
Which Brand/Type are the two cards?

First is SanDisk. Second I will check later (I’m not at home now). San Disk was working for few month without problems with older versions of OSMC and XBMC. I consider reaching this card end of life, but second card gives the same result. I will try to find another card.

Well than it might be hardware issue as SD Card driver hasn’t changed for sometime.
But it might also be cards just failing (which the other test might show).

Thanks, I will update topic after new tests.
I would like to be sure if it is a hardware problem before buying new RPi3.

I have discovered that problem occur after installation of hyperion (with WS2812 LEDS connected to GPIO18) . I have repeated this behavior on latest raspbian as well.
This has been already reported: OSMC 2017.07-1 incompatible with Hyperion? - #15 by penfold42

The origin of problem is ws281x library.

Solution:
add “dmanum” parameter in hyperion configuration:

    // DEVICE CONFIGURATION
    "device" :
    {
            "name"       : "MyHyperionConfig",
            "type"       : "ws281x",
            "leds"     : 132,
            "dmanum" : 10,
            "colorOrder" : "grb"
    },
1 Like