Ubuntu server kernel issue


#1

I am using RockPI 4B with a 128GB TF card.

The latest ubuntu-server image.

Ubuntu 18.04.1 LTS \n \l

Linux linux 4.4.154-ge0ce80a-dirty #6 SMP Fri Nov 23 16:58:02 CST 2018 aarch64 aarch64 aarch64 GNU/Linux

dmesg

[ 275.197971] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.199962] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.201939] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.202920] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.204893] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.206912] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.207929] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.209940] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.211925] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.212921] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.214898] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.216883] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.217913] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.219894] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.221908] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.222872] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.224867] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.226846] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.227867] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.229844] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.231829] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.232784] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.234868] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.236860] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.237877] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.239864] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.241843] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.242820] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.244810] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.246799] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.247830] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.249819] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.251803] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.252760] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.254750] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.256764] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.257781] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.259789] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.261779] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.262730] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.264722] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.266704] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.267719] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.269701] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.271714] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=00, Err: -5
[ 275.272664] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.274648] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5
[ 275.276639] bcmsdh_sdmmc: Failed to Read byte F1:@0x1001f=ff, Err: -5


Solved! Rock pi 4 a - ubuntu - unable to install apache2
#2

[ 674.311301] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 674.311326] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 674.482508] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 674.482534] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 674.495339] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 674.495370] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 674.536509] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 674.536523] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 674.564690] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 674.564719] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 676.176077] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 676.176099] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 676.367041] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 676.367063] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 676.446380] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 676.446402] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 676.535152] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 676.535173] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 676.594281] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 676.594303] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 676.634773] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 676.634793] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 676.767059] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 676.767080] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 676.835349] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 676.835370] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 677.015645] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 677.015695] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 767.311807] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 767.311832] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 767.431294] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 767.431363] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 767.551296] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 767.551364] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.027609] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.027634] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.041775] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.041800] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.162759] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.162784] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.194477] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.194503] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.282681] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.282706] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.399258] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.399283] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.514742] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.514767] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.758743] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.758768] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 768.874401] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 768.874426] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 769.135436] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 769.135462] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 769.246927] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 769.246952] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 769.563619] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 769.563643] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 769.671292] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 769.671317] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 769.866605] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 769.866631] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 770.047888] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 770.047913] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 770.162448] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 770.162473] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
[ 770.330818] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
[ 770.330842] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!


#3
&sdio0 {
        clock-frequency = <100000000>;
        clock-freq-min-max = <200000 100000000>;
        supports-sdio;
        bus-width = <4>;
        disable-wp;
        cap-sd-highspeed;
        cap-sdio-irq;
        keep-power-in-suspend;
        mmc-pwrseq = <&sdio_pwrseq>;
        non-removable;
        num-slots = <1>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
        sd-uhs-sdr104;
        status = "okay";
};

If remove sd-uhs-sdr104 from kernel dts file,
‘bcmsdh_sdmmc: Failed to Write byte F1’ will disappear.
But the tf-card speed will degrade significantly.
In SD card specification, to support SD-UHS-SDR104,
clock-frequency should be 208Mhz.
How is clock-frequency defined ? By hardware?


#5
commit 4cb41f61a8c8c7260e2c2285074912832606ec16
Author: trulyliu <2002385+trulyliu@users.noreply.github.com>
Date:   Wed Jan 9 17:43:56 2019 +0800

    Adjust sdio drive-strength to avoid sdio write error

diff --git a/arch/arm64/boot/dts/rockchip/rockpi-4b-linux.dts b/arch/arm64/boot/dts/rockchip/rockpi-4b-linux.dts
index a9d438dd437f..979c5e1e694c 100644
--- a/arch/arm64/boot/dts/rockchip/rockpi-4b-linux.dts
+++ b/arch/arm64/boot/dts/rockchip/rockpi-4b-linux.dts
@@ -281,15 +281,13 @@
 };
 
 &sdmmc {
-       clock-frequency = <100000000>;
-       clock-freq-min-max = <100000 100000000>;
        supports-sd;
        bus-width = <4>;
        cap-mmc-highspeed;
        cap-sd-highspeed;
        disable-wp;
        num-slots = <1>;
-       //sd-uhs-sdr104;
+       sd-uhs-sdr104;
        vqmmc-supply = <&vcc_sd>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
@@ -298,8 +296,7 @@
 };
 
 &sdio0 {
-       clock-frequency = <100000000>;
-       clock-freq-min-max = <200000 100000000>;
+        max-frequency = <200000000>;
        supports-sdio;
        bus-width = <4>;
        disable-wp;
@@ -311,7 +308,7 @@
        num-slots = <1>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
-       sd-uhs-sdr104;
+        sd-uhs-sdr104;
        status = "okay";
 };
 
@@ -1036,6 +1033,31 @@
                        rockchip,pins =
                                <2 25 RK_FUNC_1 &pcfg_pull_none_20ma>;
                };
+               sdio0_cd: sdio0-cd {
+                       rockchip,pins =
+                               <2 26 RK_FUNC_1 &pcfg_pull_up_20ma>;
+               };
+
+               sdio0_pwr: sdio0-pwr {
+                       rockchip,pins =
+                               <2 27 RK_FUNC_1 &pcfg_pull_up_20ma>;
+               };
+
+               sdio0_bkpwr: sdio0-bkpwr {
+                       rockchip,pins =
+                               <2 28 RK_FUNC_1 &pcfg_pull_up_20ma>;
+               };
+
+               sdio0_wp: sdio0-wp {
+                       rockchip,pins =
+                               <0 3 RK_FUNC_1 &pcfg_pull_up_20ma>;
+                       };
+
+               sdio0_int: sdio0-int {
+                       rockchip,pins =
+                               <0 4 RK_FUNC_1 &pcfg_pull_up_20ma>;
+               };
+       
        };
 
        sdmmc {

With this patch, my tf card runs at 100Mbps without kernel errors.
And sdio for wifi works at 200Mhz
[    3.297461] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA
[    3.302788] mmc_host mmc0: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
[   11.684077] mmc_host mmc2: Bus speed (slot 0) = 200000000Hz (slot req 200000000Hz, actual 200000000HZ div = 0)
[   11.973958] dwmmc_rockchip fe310000.dwmmc: Successfully tuned phase to 114

I have created a pull request on github.


#6

Same problem with Rock Pi4B and 16GB HCI SD card. Ubuntu server latest release, Wlan on.

kernel: [  848.706813] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
kernel: [  848.889732] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
kernel: [  848.889759] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
kernel: [  849.939106] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
kernel: [  849.939132] dhd_tcpdata_info_get 1092: No more free tdata_psh_info!!
kernel: [  850.348145] _tdata_psh_info_pool_deq 200: Out of tdata_disc_grp
etc.
kernel: [ 1484.298381] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=01, Err: -5

Is there a plan for a kernel fix already?


#7

I’m having this problem too… :frowning:


#8

I would say that problem exist in memory cards… Because i tried 3 different Samsung Evo Plus 32gb and did not met such problem…

Anyway. China New Year is still going on. Do not expect anything until 19 February


#9

Same cards do work in other hardware without errors


#10

That was more about
“That’s why that kind of error is hard to catch”
rather than
“It’s hardware problem with your memory catd”


#11

I did another test with a brandnew model Rock Pi4B with 2 GB and a brandnew 16 GB SD Card with a fresh Ubuntu server image. From the first boot of the system I got these read / write error messages from the kernel and some hang ups.
With this situation, Rock Pi 4 can not be used in a professional context (as we planned). I urgenty ask Radxa to fix that issue.


#12

Hi, I do have the same problem with an eMMC card. Some times the rock pi crashes completely because of this error.


#13

I would love to see how does other devices work with this card. Maybe some bad blocks looking utilities and something like CrystalMark bench


#14

I do not Know any eMMC check utilities for linux. I also can not use my eMMC card in any other device, because I bought it especially for my rock pi (this is offered by Allnet


#15

I did some tests on the SD card (SanDisk Ultra HC I 16 GB) using the f3 tool suite (f3 docs).

  1. non-destructive write/read test on the left free space of the card

3.41 GB written @3.23 MB/s (through a not-so-performant microSD - USB adapter)
subsequent read @ 5.57 MB/s with 0 corrupted/changed/overwritten sectors
Result: 100% OK

  1. destructive capacity test with f3probe. Result:

usable size: 14.84 GB (31116288 blocks)
announced size: 14.84 GB (31116288 blocks)
module: 16.00 GB

So the card has exactly the usable size that it should have. In summary, there is no hint that anything is wrong with the card.


#16

So it seems… with one exception i can think of. Write and read speed really low like 10 times from what you should have


#17

Not really a surprise given the test setup: Debian Linux running in a virtual machine on a Windows host, accessing the card through a virtual USB interface through a USB 2.0 microSD adapter …


#18

You could just use Crystal disk mark… =_=’’’’’
But it’s still shouldn’t be that low. 3 MB/s for write speed? That’s surely looks like some really cheap China sdcard
And that would explain one of the fix in kernel (that was made in armbian repo) when they upped sdcard voltage

SD-Card has random hangs (probably speed issues)```
https://forum.armbian.com/topic/9226-rockpi-4b-board-bring-up/ 
``` I changed sdmmc pins to get higher strength, and committed that yesterday, it seems to fix the issue.```
https://forum.armbian.com/topic/9226-rockpi-4b-board-bring-up/?do=findComment&comment=69066

#19

The issue here at hand are read and write kernel errors on the Rock Pi / Ubuntu platform, not any speed tests in a test environment. I have enough evidence that the problem is not the sd card (which is certainly not a cheap or fake one).


#20

Well, i quoted posts about this from Armbian forum and for me and seems like write\read speed problem. RasPi have this problem, Renegade have this problem, so to my understanding that shouldn’t be surprising for all SBC to have this problem.

But as for emmc that indeed strange. If you bought one from china allnet, then i can advise to contact allnet about it


#21

I have used the same type of card for about 5 years in many RasPi projects (also regularly in the university class room with 20 installations) and never experienced any read/write problems like those on the Rock Pi 4.