(Lenovo S130-11IGM) emmc not working in 19.04

Bug #1848883 reported by Jim on 2019-10-19
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned

Bug Description

Hi,

I don't think this is the same issue as ;
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1818407
although I have read a lot of issues with emmc disks.

Booting from lubuntu CD1 19.04 takes about an hour before I get to the desktop. The installer runs through to the partitioning sections and is able to see the disk, but it fails to create the partitions. The laptop has a 32gb emmc disk. There is some kind of timeout during boot on the dhpci probe. The only OS/kernel match I have got to work on this device is Lubuntu/18.04 4.15.0-20 (every single function works). After installing 18.04 there is an auto update to 4.15.0-65 but the touchpad stops working so I defaulted grub back to -20 (this failure is not caused by libinput or synaptics drivers). Neither kernels have a working wifi module but rtl8821ce install fixes this so not an issue for me.

Attaching as many logs as I can grab.......... please let me know and I'll happily get any other requested logging.
---
ProblemType: Bug
ApportVersion: 2.20.10-0ubuntu27
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: lubuntu 1434 F.... pulseaudio
CasperVersion: 1.405
DistroRelease: Ubuntu 19.04
IwConfig:
 enp0s21f0u1 no wireless extensions.

 lo no wireless extensions.
LiveMediaBuild: Lubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
MachineType: LENOVO 81J1
Package: linux (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/hostname.seed boot=casper quiet splash ---
ProcVersionSignature: Ubuntu 5.0.0-13.14-generic 5.0.6
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-5.0.0-13-generic N/A
 linux-backports-modules-5.0.0-13-generic N/A
 linux-firmware 1.178
Tags: disco
Uname: Linux 5.0.0-13-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

_MarkForUpload: True
dmi.bios.date: 09/05/2019
dmi.bios.vendor: LENOVO
dmi.bios.version: 9HCN27WW
dmi.board.asset.tag: No Asset Tag
dmi.board.name: LNVNB161216
dmi.board.vendor: LENOVO
dmi.board.version: SDK0R32802WIN
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo ideapad S130-11IGM
dmi.modalias: dmi:bvnLENOVO:bvr9HCN27WW:bd09/05/2019:svnLENOVO:pn81J1:pvrLenovoideapadS130-11IGM:rvnLENOVO:rnLNVNB161216:rvrSDK0R32802WIN:cvnLENOVO:ct10:cvrLenovoideapadS130-11IGM:
dmi.product.family: ideapad S130-11IGM
dmi.product.name: 81J1
dmi.product.sku: LENOVO_MT_81J1_BU_idea_FM_ideapad S130-11IGM
dmi.product.version: Lenovo ideapad S130-11IGM
dmi.sys.vendor: LENOVO

Jim (poulsej) wrote :

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 1848883

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.

dmesg

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: disco
Jim (poulsej) wrote :
Jim (poulsej) wrote :
Jim (poulsej) wrote :
Jim (poulsej) wrote :

mokutil output to confirm secure boot disabled

Jim (poulsej) wrote :

xorg log attached to confirm touchpad working under libinput with this kernel

Jim (poulsej) wrote :

I should point out my reason for trying 19.04 is due to 4.15.0-65 stopping the touchpad working and having to revert back to 4.15.0-20. Was hoping 19.04 with the 5.0 kernel might resolve the touchpad issue (which it does). Also tried kernel 5.0.0.31 on 18.04 with exact same emmc issue.

Jim (poulsej) wrote :

Adding successful boot from 4.15.0-20 lunbuntu 18.04

Jim (poulsej) wrote :

attaching 4.15.0-20 lspci output for comparison

summary: - Lenovo S130-11IGM Unable to read emmc
+ (Lenovo S130-11IGM) emmc not working in 19.04
Jim (poulsej) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected
description: updated
Jim (poulsej) wrote : CRDA.txt

apport information

apport information

Jim (poulsej) wrote : Lspci.txt

apport information

Jim (poulsej) wrote : Lsusb.txt

apport information

apport information

apport information

apport information

apport information

Jim (poulsej) wrote : RfKill.txt

apport information

Jim (poulsej) wrote : UdevDb.txt

apport information

Jim (poulsej) wrote : WifiSyslog.txt

apport information

Jim (poulsej) wrote :

run apport-collect after booting from lubuntu 19.04 CD1

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Jim (poulsej) wrote :

Is this not the same issue as this affecting several Lenovo models ??
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930815
Something seems to be broken since 4.18

Kai-Heng Feng (kaihengfeng) wrote :
Jim (poulsej) wrote :

Thanks Kai-Heng. Tested 5.4-rc4 but still the same issue. Cannot boot up using this kernel. Also tried on a 14inch version of the same laptop with the same error. There is some kind of timeout (shown in the dmesg attached) but I don't understand what is causing it.

Kai-Heng Feng (kaihengfeng) wrote :

Would it be possible for you to do a kernel bisection?

First, find the last good -rc kernel and the first bad -rc kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/

Then,
$ sudo apt build-dep linux
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ git bisect start
$ git bisect good $(the good version you found)
$ git bisect bad $(the bad version found)
$ make localmodconfig
$ make -j`nproc` deb-pkg
Install the newly built kernel, then reboot with it.
If the issue still happens,
$ git bisect bad
Otherwise,
$ git bisect good
Repeat to "make -j`nproc` deb-pkg" until you find the commit that causes the regression.

Jim (poulsej) wrote :

Hi, thanks for this update. So I know all the 4.15.0 kernels work with this emmc hardware but the only others I have tried are part of 19.04 (so 4.18) onwards which fail. Does this mean I should start from 4.15-rc9 and then 4.18-rc1 until I find a broken kernel ? Then do the bisect ?

Jim (poulsej) wrote :

Thanks Kai-Heng. I have identified the last working mainline is 4.15-rc9 and from 4.16-rc1 it fails. I will try and follow the bisect steps. After running "git bisect start", what should be the complete "git bisect good" command based on the kernel versions I determined were good/bad ??

Jim (poulsej) wrote :

Thanks Kai-Heng. I have identified the last working mainline is 4.15-rc9 and from 4.16-rc1 it fails. I will try and follow the bisect steps. I assume the "git bisect good" command should be "git bisect good 4.15-rc9. Looking at the bisect visualise I can see 2/3 commits made for emmc devices.

Jim (poulsej) wrote :

Hi Kai-Heng.. Please ignore #29/#30/#31. For some reason launchpad took text from firefox on each reboot! I am working through each bisect testing the kernels. Each one takes about 1 hour to build. Also quite surprised to see how many changes were made to sdhci-acpi in this -rc.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?h=v4.16-rc1&qt=grep&q=sdhci-acpi

Jim (poulsej) wrote :

Hi Kai-Heng... here is the bisect output.

root@ubuntu:~/mainline/tmp/linux# git bisect bad
8ee82bda230fc972c7ee3bb15ce1260eefb4721c is the first bad commit
commit 8ee82bda230fc972c7ee3bb15ce1260eefb4721c
Author: Adrian Hunter <email address hidden>
Date: Wed Nov 29 15:41:06 2017 +0200

    mmc: sdhci-pci: Add CQHCI support for Intel GLK

    Add CQHCI initialization and implement CQHCI operations for Intel GLK.

    Signed-off-by: Adrian Hunter <email address hidden>
    Acked-by: Linus Walleij <email address hidden>
    Signed-off-by: Ulf Hansson <email address hidden>
    Tested-by: Linus Walleij <email address hidden>

:040000 040000 85619538d613d32b028b020fc35ff932fa1404e0 917c047cf1c9050362730e5aae7cee8d8179aaa3 M drivers

Kai-Heng Feng (kaihengfeng) wrote :

Subscribed Adrian Hunter to this bug.

Adrian Hunter (ahunter123) wrote :

Can someone please provide an acpidump?

Jim (poulsej) wrote :
Jim (poulsej) wrote :

Attached dump from 4.15.0-20. Would acpidump show any difference running from a newer kernel ?

Adrian Hunter (ahunter123) wrote :

No, acpidump should not show any difference running from a newer kernel?

Jim (poulsej) wrote :
Jim (poulsej) wrote :

Hi Adrian, is there anything else that would be useful to provide for this bug ? Thanks

Adrian Hunter (ahunter123) wrote :

I have some ideas that I am testing

Adrian Hunter (ahunter123) wrote :

Is it possible to try this patch?

Jim (poulsej) wrote :

Thanks Adrian, I'll test this as soon as I can.
Could you confirm the steps.. I assume I need to apply this to 4.16-rc1. I think it is ..

$ apt build-dep linux
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ wget https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1848883/+attachment/5311741/+files/0001-mmc-sdhci-pci-Fix-premature-clock-gating-of-CQHCI-on.patch

---NOT SURE WHAT TO DO HERE

$ make localmodconfig
$ make -j`nproc` deb-pkg

Kai-Heng Feng (kaihengfeng) wrote :

$ git am 0001-mmc-sdhci-pci-Fix-premature-clock-gating-of-CQHCI-on.patch
Then compile the kernel as usual.

Adrian Hunter (ahunter123) wrote :

Actually it should apply cleanly to any kernel from 4.17 onward (4.16 would require a little backporting)

To apply the patch, in the linux git directory:

git am 0001-mmc-sdhci-pci-Fix-premature-clock-gating-of-CQHCI-on.patch

tags: added: patch
Jim (poulsej) wrote :

First test with 5.5-rc1 failed with the same issue using these steps....

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux/
git tag
git checkout v5.5-rc1
wget https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1848883/+attachment/5311741/+files/0001-mmc-sdhci-pci-Fix-premature-clock-gating-of-CQHCI-on.patch
git am 0001-mmc-sdhci-pci-Fix-premature-clock-gating-of-CQHCI-on.patch
make localmodconfig
make -j`nproc` deb-pkg
dpkg -i *.deb
reboot

Jim (poulsej) wrote :

Tried 4.18-rc1. Couldn't compile...

drivers/mmc/host/sdhci-pci-core.c: In function ‘glk_cqe_enable’:
drivers/mmc/host/sdhci-pci-core.c:758:7: error: implicit declaration of function ‘FIELD_GET’; did you mean ‘FOLL_GET’? [-Werror=implicit-function-declaration]
   if (FIELD_GET(mask, val) != 4) {
       ^~~~~~~~~
       FOLL_GET
  AR drivers/net/ethernet/cavium/liquidio/built-in.a
drivers/mmc/host/sdhci-pci-core.c:760:11: error: implicit declaration of function ‘FIELD_PREP’; did you mean ‘NEED_PAE’? [-Werror=implicit-function-declaration]
    val |= FIELD_PREP(mask, 4);
           ^~~~~~~~~~
           NEED_PAE

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.