Cant access emmc, error -84

Bug #1818407 reported by jagdtigger on 2019-03-03
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

Greetings!

I just got my new convertible(Asus TP202NAS, brand new) and wanted to install kubuntu 18.10 onto the internal storage, only to find that it cant see it. In dmesg i only got these two error:
mc0: mmc_select_hs400 failed, error -84
mc0: error -84 whilst initializing mmc card

Tried to google around for a solution but i didnt found any solution to this, also tried the kubuntu IRC channel but didnt got any luck there too....

/EDIT
Submitted from a live session.

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: ubuntu-release-upgrader-core 1:18.10.11
ProcVersionSignature: Ubuntu 4.18.0-10.11-generic 4.18.12
Uname: Linux 4.18.0-10-generic x86_64
ApportVersion: 2.20.10-0ubuntu13
Architecture: amd64
CasperVersion: 1.399
CrashDB: ubuntu
Date: Sun Mar 3 13:59:13 2019
LiveMediaBuild: Kubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.2)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-release-upgrader
Symptom: ubuntu-release-upgrader
UpgradeStatus: No upgrade log present (probably fresh install)
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: kubuntu 3661 F.... pulseaudio
CasperVersion: 1.394
CurrentDesktop: KDE
DistroRelease: Ubuntu 18.04
LiveMediaBuild: Kubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
Lsusb:
 Bus 002 Device 003: ID 0781:5581 SanDisk Corp. Ultra
 Bus 002 Device 002: ID 05e3:0747 Genesys Logic, Inc.
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 002: ID 13d3:3501 IMC Networks
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: ASUSTeK COMPUTER INC. TP202NAS
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/username.seed boot=casper maybe-ubiquity quiet splash ---
ProcVersionSignature: Ubuntu 4.18.0-15.16~18.04.1-generic 4.18.20
RelatedPackageVersions:
 linux-restricted-modules-4.18.0-15-generic N/A
 linux-backports-modules-4.18.0-15-generic N/A
 linux-firmware 1.173.3
Tags: bionic
Uname: Linux 4.18.0-15-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 07/19/2018
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: TP202NAS.209
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: TP202NAS
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 31
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrTP202NAS.209:bd07/19/2018:svnASUSTeKCOMPUTERINC.:pnTP202NAS:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnTP202NAS:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct31:cvr1.0:
dmi.product.family: VivoBook Flip
dmi.product.name: TP202NAS
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.

jagdtigger (gearsofwarhu) wrote :
description: updated
affects: ubuntu-release-upgrader (Ubuntu) → linux (Ubuntu)

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1818407

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Tom Reynolds (tomreyn) wrote :

We discussed this on IRC.
Linux reports (DMI) this is an: ASUSTeK COMPUTER INC. TP202NAS/TP202NAS, BIOS TP202NAS.209 07/19/2018
This systesm' only internal storage which is not detected here (other than the error messages quoted above) is a SanDisk DF4064 eMMC.

I recommend testing also with an Ubuntu 18.04.2 live system, running "apport-collect 1818407" from it, and posting a full dmesg (if apport does not do that already).

apport information

tags: added: apport-collected bionic
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

Tom Reynolds (tomreyn) on 2019-03-04
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Kai-Heng Feng (kaihengfeng) wrote :

Would it be possible for you to test the latest upstream kernel? Refer
to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest
v5.0 kernel [0].

If this bug is fixed in the mainline kernel, please add the following
tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag:
'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as
"Confirmed".

Thanks in advance.

[0] https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.0/

jagdtigger (gearsofwarhu) wrote :

Yes, i installed kubuntu on a sd card as a temporary solution to test things. (Just as a note i used ukuu to install the new kernel.)

root@patakija-TP202NAS:/home/patakija# uname -r
5.0.0-050000-generic
root@patakija-TP202NAS:/home/patakija# dmesg | grep mmc
[ 3.427298] mmc0: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit
[ 3.545957] mmc0: mmc_select_hs400 failed, error -84
[ 3.545971] mmc0: error -84 whilst initialising MMC card
[ 3.673352] mmc0: mmc_select_hs400 failed, error -84
[ 3.673358] mmc0: error -84 whilst initialising MMC card
[ 3.808029] mmc0: mmc_select_hs400 failed, error -84
[ 3.808036] mmc0: error -84 whilst initialising MMC card
[ 3.974870] mmc0: mmc_select_hs400 failed, error -84
[ 3.974877] mmc0: error -84 whilst initialising MMC card

tags: added: kernel-bug-exists-upstream
Kai-Heng Feng (kaihengfeng) wrote :

Seems like this commit fixes the issue:
commit 2b0efe8204ecebbfd766220f1c7ed63f8016b6f7
Author: BOUGH CHEN <email address hidden>
Date: Mon Jan 7 10:11:29 2019 +0000

    mmc: sdhci-esdhc-imx: remove the 100MHz limitation for Strobe DLL

    For some eMMC, after switch to HS400ES mode, it need to config the strobe
    dll target dealy even if the clock is 50MHZ or 25MHz, otherwise will meet
    CMD index/crc error when send CMD13 to check the switch status.

    [ 2.473915] IRQ status 0x000a8001
    [ 2.473934] mmc2: mmc_select_hs400es failed, error -84
    [ 2.473938] mmc2: error -84 whilst initialising MMC card

jagdtigger (gearsofwarhu) wrote :

Okay, downloaded all debs then dpkg -i ./*.deb and update-grub then reboot:
patakija@patakija-TP202NAS:~$ uname -r
4.18.0-16-generic
patakija@patakija-TP202NAS:~$ dmesg | grep mmc
[ 3.165138] mmc0: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit
[ 3.284207] mmc0: mmc_select_hs400 failed, error -84
[ 3.284218] mmc0: error -84 whilst initialising MMC card
[ 3.399568] mmc0: mmc_select_hs400 failed, error -84
[ 3.399579] mmc0: error -84 whilst initialising MMC card
[ 3.533777] mmc0: mmc_select_hs400 failed, error -84
[ 3.533788] mmc0: error -84 whilst initialising MMC card
[ 3.696410] mmc0: mmc_select_hs400 failed, error -84
[ 3.696419] mmc0: error -84 whilst initialising MMC card
patakija@patakija-TP202NAS:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 119,1G 0 disk
├─sda1 8:1 1 1G 0 part /boot/efi
├─sda2 8:2 1 114,1G 0 part /
└─sda3 8:3 1 4G 0 part [SWAP]
patakija@patakija-TP202NAS:~$

(sda is the microsd card)

jagdtigger (gearsofwarhu) wrote :
Kai-Heng Feng (kaihengfeng) wrote :

This patch [1] may solve the issue.

It fixes a regression introduced in v4.10, so please test Linux kernel v4.9.

[1] https://lore<email address hidden>/

jagdtigger (gearsofwarhu) wrote :

Same result...

patakija@patakija-TP202NAS:~$ uname -r
4.9.162-0409162-generic
patakija@patakija-TP202NAS:~$ dmesg | grep mmc
[ 2.625220] mmc0: SDHCI controller on PCI [0000:00:1c.0] using ADMA 64-bit
[ 2.845380] mmc0: switch to hs400 failed, err:-84
[ 2.845395] mmc0: error -84 whilst initialising MMC card
[ 3.075182] mmc0: mmc_select_hs400 failed, error -84
[ 3.075188] mmc0: error -84 whilst initialising MMC card
[ 3.292230] mmc0: mmc_select_hs400 failed, error -84
[ 3.292236] mmc0: error -84 whilst initialising MMC card
[ 3.535283] mmc0: mmc_select_hs400 failed, error -84
[ 3.535289] mmc0: error -84 whilst initialising MMC card
patakija@patakija-TP202NAS:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 119,1G 0 disk
├─sda1 8:1 1 1G 0 part /boot/efi
├─sda2 8:2 1 114,1G 0 part /
└─sda3 8:3 1 4G 0 part [SWAP]
patakija@patakija-TP202NAS:~$

Kai-Heng Feng (kaihengfeng) wrote :

Ok, please raise the issue to sdhci-pci maintainers:
$ scripts/get_maintainer.pl -f drivers/mmc/host/sdhci-pci-core.c
Adrian Hunter <email address hidden> (maintainer:SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI...)
Ulf Hansson <email address hidden> (maintainer:MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND...)
<email address hidden> (open list:SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI...)
<email address hidden> (open list)

jagdtigger (gearsofwarhu) wrote :

How exactly i do that, just send them an e-mail?
Just as a side note after a long trial and error i got into a different advenced section and i found some settings under Chipset\South Cluster Configuration\SCC Configuration:
SCC Card Support (D27:F0) Disable
SCC eMMC support (D28:F0) Enable
eMMC Max Speed HS400
SCC UFS Support (D29:F0) Disable
SCC SDIO Support (D30:F0) Disable

This is pretty much all there is that i can relate to the storage. Dont want to disclose how to get in. Even i had to take this baby apart to reset the BIOS....

Kai-Heng Feng (kaihengfeng) wrote :

Yes, through e-mail.

Bruno (devonian-survivor) wrote :

I have exactly the same bug on a newly purchased Asus VivoBook Flip 12 TP202NA.
The emmc is an SanDisk DF4032 749B806.

Lubuntu 18.04.2 installer finds for time to time the emmc but I've never been able to boot the system successfully.

jagdtigger (gearsofwarhu) wrote :

Okay as a temporary solution lower the speed to hs200. Boot up the machine while hitting the F8 button, press cancel when the boot options box pops up. Then proceed to advanced mode(f7), here go to Chipset/South Cluster Configuration/SCC Configuration. Here select eMMC max speed and select hs200. Then click on Save & Exit in the middle, there click Save and reset. Do not touch anything else in there because it can brick the device and the only way to reset the BIOS is to blow it apart...

_doom (duso315-gmail) wrote :

hello acer swift 1 with emmc onboard all was fine but lately got this error -84:

https://imgur.com/a/BzWdm39

ubuntu sometimes work but often freeze sometimes it dont boot think it might be kernel bug???

Óvári (ovari) wrote :

Affects Asus VivoBook Flip TP202NA-EH012T
BIOS Vendor: American Megatrends
Version: 208
GOP Version: 10.0.1036
EC Version: 02.10
Processor Information: Intel Pentium CPU N4200 @ 1.10GHz
Total Memory: 4096 MB RAM
Intel HD Graphics
LCD: 1366*768
Storage:
- Controller 0
- Device Type EMMC
- Model Name: SanDisk DF4064 6BDD5503
- 64 GB

Óvári (ovari) wrote :

Could this be due to the TPM (Trust Platform Module) error? There doesn't seem to be a way to disable the TPM in the ASUS BIOS Utility.

jagdtigger (gearsofwarhu) wrote :

Yes there is, but up the machine while preesing f8, press esc when the boot popup shows up. Head to advanced mode then advanced and under that trusted computing. But AFAIK TPM dont have anything to do with storage.

Tom Reynolds (tomreyn) wrote :

See comment 26 if you're still interested in seeing this fixed. After sending mail there, be sure to mention it here, ideally with some kind of reference (mailing list name and (message id) or (date and time of message send, sender's e-mail address, subject line)) so others will not send duplicate reports.

Tom Reynolds (tomreyn) wrote :

Image referenced in comment 31 by _doom (duso315-gmail) - cropped + scaled down:
"mmc0: mmc_hs400_to_hs200 failed, error -84"

Óvári (ovari) wrote :

@tomreyn: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1818407/comments/35

Below is a copy of the email we sent.

Haven't received any reply. Perhaps our email never got through as it is from a zoho account. This has happened on other occasions whereby people don't receive our emails as zoho seems to be blocked.

How can we check that they got our email?

Thank you

Subject: Asus VivoBook Flip TP202NA-EH012T EMMC problem
Date: Sat, 31 Aug 2019 19:43:04 +1000
From: Óvári <...@zoho.com>
To: Adrian Hunter <email address hidden>, Ulf Hansson <email address hidden>, <email address hidden>, <email address hidden>

Hello,

As per https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1818407/comments/26 here is an email.

Information is provided at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1818407/comments/32

Please advise what else you require.

Thank you

Óvári

Óvári (ovari) wrote :

Temporary solution listed at https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1818407/comments/30 works. Thank you

What does this mean? Does it mean the computer is running at half the speed?

jagdtigger (gearsofwarhu) wrote :

Only the dtorage will be slower:
https://forum.odroid.com/viewtopic.php?t=20739
(Not ubuntu but they tested the two modes.)

Tom Reynolds (tomreyn) wrote :

@ovari: It's good that you contacted these mailing lists. Note, however, that the developers subscribed to these lists are extremely overwhelmed with e-mail. They will likely not respond to e-mails which do not (concisely) state the actual issue by means of error messages, version number and further context. I am afraid the message you sent (which did arrive on both lists according to the list archives, see below) is likely not to raise the kernel developers' attention. We can discuss this in more detail on IRC ("tomreyn" on Freenode) or by e-mail (tomreyn at megaglest d0t org) if you like.

ML archives:
https://www.spinics.net/lists/linux-mmc/msg55705.html
https://www.spinics.net/lists/kernel/msg3242658.html

Gabriel (gahia) wrote :

Hi!

Confirmed also in a ODYS Winbook 14 w/ SanDisk DF4064 eMMC.

Actually running Kubuntu 19.10: Linux 5.0.0-27-generic #28-Ubuntu SMP Tue Aug 20 19:53:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux.

The info that apport-collect could collect from this installation may not be relvant as I've switched to HS200 to install the OS... maybe I can try from the live usb if it's useful, let me know please.

Thansk!

Óvári (ovari) wrote :

Tried with the latest "generic" kernel, i.e. 5.2.11.

Once you reproduced it, reboot setting eMMC Max Speed to HS200, and run:
   journalctl -kb -1 | nc termbin.com 9999
to post your kernel log from the last but one (-1) boot (the one where
the eMMC failed) to termbin.com. Then send along the termbin.com URL
that was returned on the terminal and update your bug report with your
new findings (affected mainline kernel version).

It doesn't seem to show the failed boot. Perhaps this is due to not being able to access the eMMC?

Attaching photos of the display.

Attached is 1 of 2.

Óvári (ovari) wrote :

Tried with the latest "generic" kernel, i.e. 5.2.11.

Once you reproduced it, reboot setting eMMC Max Speed to HS200, and run:
   journalctl -kb -1 | nc termbin.com 9999
to post your kernel log from the last but one (-1) boot (the one where
the eMMC failed) to termbin.com. Then send along the termbin.com URL
that was returned on the terminal and update your bug report with your
new findings (affected mainline kernel version).

It doesn't seem to show the failed boot. Perhaps this is due to not being able to access the eMMC?

Attaching photos of the display.

Attached is 2 of 2.

Tom Reynolds (tomreyn) wrote :

As a potential workaround, please try to boot a current kernel (one that was also tested to not work otherwise) with kernel parameter sdhci.debug_quirks=32832 as per https://forums.xilinx.com/t5/Embedded-Linux/Linux-Kernel-4-6-mmc-issue/td-p/727465

Kai-Heng Feng (kaihengfeng) wrote :

Please test latest mainline kernel:
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4-rc2/

Particularly this commit:

commit 8ad8e02c2fa70cfddc1ded53ba9001c9d444075d
Author: Jan Kaisrlik <email address hidden>
Date: Tue Aug 20 13:42:29 2019 +0200
Revert "mmc: core: do not retry CMD6 in __mmc_switch()"

JuniorJPDJ (juniorjpdj) wrote :

I had similar issues on Chuwi Hi13 tablet with the same eMMC module.
It looks like latest 5.4-rc3 fixed that issue for me. I haven't tried other 5.4 kernel, but tried some of older kernels and older distros and 5.3 family.
I tried 5.4-rc3 on Arch Linux and it worked all good.

JuniorJPDJ (juniorjpdj) wrote :

Oh never mind, it also works with 5.3. I don't remember then which kernel I actually tried, but issue seems to be fixed.

Adrian Hunter (ahunter123) wrote :

I tried to reproduce this problem with an ASUS L403NA with an Intel N4200 processor and SanDisk DF4064 eMMC, but it worked fine.

For people still experiencing this issue, here is a debug patch that will print debug information to the kernel messages to help analyze the issue. It can be applied to linux stable v5.3.y . If you try this patch, please attach the kernel messages to this bug.

tags: added: patch
Óvári (ovari) wrote :

Verified fixed with Linux Kernel:
5.3.0-23-generic

Thank you

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers