Boot freeze with Ubuntu 17.10 Live ISO on Surface Book

Bug #1724657 reported by Chatty
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
intel-microcode (Ubuntu)
Undecided
Unassigned
linux (Ubuntu)
High
Unassigned

Bug Description

When trying to boot 17.10-beta2 from USB key on a Surface Book the system freezes immediately after "boot" in grub. Not even a uncompressing message. Something similar happens even with Fedora 27: https://bugzilla.redhat.com/show_bug.cgi?id=1500057

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: evince 3.24.0-0ubuntu1
ProcVersionSignature: Ubuntu 4.10.0-19.21-generic 4.10.8
Uname: Linux 4.10.0-19-generic x86_64
ApportVersion: 2.20.4-0ubuntu4
Architecture: amd64
CasperVersion: 1.380
CurrentDesktop: Unity:Unity7
Date: Wed Oct 18 20:42:20 2017
LiveMediaBuild: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: evince
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Chatty (mail-chatty) wrote :
Revision history for this message
Chatty (mail-chatty) wrote :

Ubuntu 17.04 works just fine as you can see by this bug report.

Revision history for this message
Chatty (mail-chatty) wrote :

I pinpointed the problem a little further. I can boot any kernel up to vmlinuz-4.12.14-041214-generic. Boot freeze happens starting from vmlinuz-4.13.0-041300rc1-generic.

Chatty (mail-chatty)
affects: evince (Ubuntu) → kernel-package (Ubuntu)
affects: kernel-package (Ubuntu) → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

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 1724657

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
Revision history for this message
Chatty (mail-chatty) wrote : Re: Boot freeze with Ubuntu 17.10-beta2 on Surface Book

No apport with affected kernel possible due to system freeze but see two posts above.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

SurfaceBook has a nvidia chip, right?
Can you try "blacklist=nouveau modprobe.blacklist=nouveau" kernel parameter?

Also, give this kernel a try: http://people.canonical.com/~khfeng/lp1723619-revert/

Revision history for this message
Chatty (mail-chatty) wrote :

My Surface Book sports a NVidia 940M (10DE:134B).

With any kernel starting from 4.13 (including yours) I don't even get to the point of loading modules. When I omit loading of initrd and just do "linux vmlinuz" & "boot" the system freezes immediately (and my Intelli Explorer mouse red laser turns off).

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.14 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] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14-rc5

Changed in linux (Ubuntu):
importance: Undecided → High
tags: added: kernel-da-key
Revision history for this message
Chatty (mail-chatty) wrote :

I already tested linux-image-4.14.0-041400rc5-generic_4.14.0-041400rc5.201710152230_amd64.deb to no avail. I guess since 4.13 something in the kernel compression has been changed.

tags: added: kernel-bug-exists-upstream
no longer affects: linux (Arch Linux)
Revision history for this message
Benjamin Braun (bjmnbraun) wrote :

To clarify: It still affects Arch Linux but the use of Launchpad to report arch-linux-linux bugs is not supported.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Is it a regression in v4.13? Does v4.12 have this issue?

Revision history for this message
Chatty (mail-chatty) wrote :

I already said four days ago that I can but any kernel up to the latest 4.12.14. Any kernel starting from 4.13 freezes at boot. So yes, it's a regression lying probably in the decompression code.

Revision history for this message
Benjamin Braun (bjmnbraun) wrote :

Does adding

debug earlyprintk=efi

to the kernel boot parameters give any output?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Sorry I didn't notice you already mentioned that.

Please find the first version of v4.13-rc* that has this regression.

Revision history for this message
Chatty (mail-chatty) wrote :

@Ben: Does not change a thing. I grub cli I type "linux /casper/vmlinuz.efi debug earlyprintk=efi" and then "boot" and system freezes immediately.

@Kai: In #3 I already mentioned the latest working 4.12 kernel and the earliest non-working 4.13 kernel I could find. If you hapüen to find something in between just point me at it and I'll give it a try.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

v4.13-rc[1..7] from [1] is release between v4.12 and v4.13.

[1] http://kernel.ubuntu.com/~kernel-ppa/mainline/

Revision history for this message
Chatty (mail-chatty) wrote :

That's where I took my kernels from. And the earliest 4.13 in there is 4.13.0-041300rc1-generic as I already said in #3!!!
In #15 I was asking for something in between 4.12.14-041214-generic and 4.13.0-041300rc1-generic.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Right. My apology.

Please try kernel here: http://people.canonical.com/~khfeng/lp1724657-1/

$ git bisect log
git bisect start
# good: [6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c] Linux 4.12
git bisect good 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c
# bad: [5771a8c08880cdca3bfb4a3fc6d309d6bba20877] Linux v4.13-rc1
git bisect bad 5771a8c08880cdca3bfb4a3fc6d309d6bba20877

Revision history for this message
Chatty (mail-chatty) wrote :

Your 4.12 also freezes the system. No additional output with Ben's parameters either. Hope this helps?

Revision history for this message
Benjamin Braun (bjmnbraun) wrote :

Your intel microcode is
microcode : 0x9e
and 0xb2 or newer was needed to boot linux 4.13 without a hang at boot least for me. Try installing / upgrading the intel-ucode package.

Revision history for this message
Chatty (mail-chatty) wrote :

How do I go about it? Consider me being a Windows GUI having the live ISO at hand.

Revision history for this message
Benjamin Braun (bjmnbraun) wrote :

Well, I'm not clear on the limitations of live ISOs but since you were able to install linux-image-4.14.0-041400rc5-generic_4.14.0-041400rc5.201710152230_amd64.deb, it shouldn't be any harder to install the .deb for intel-microcode-3.20170707.1~ubuntu17.04.0 or newer. I suppose try rebooting first with just the updated microcode installed and validate that /proc/cpuinfo shows a newer version, and then reboot with the new kernel additionally.

Revision history for this message
Chatty (mail-chatty) wrote :

I just extracted the kernel image (vmlinuz.*) and made it boot using grub club (as described in #7 and #15).

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Chatty, to be more clear, do you mean that the issue is gone with intel-ucode installed?

Revision history for this message
Chatty (mail-chatty) wrote :

I beliebe the new ucode is saved in the initrd which I didn't use. It mighty bei possible to for users having an existing working installation to upgrade kernel and ucode (initrd). But Surface Book users starting from scratch with the live ISO are still faced with an instant freeze which they can't solve with the tools at hand (like additional boot parameter).
So this needs to be resolved by some package maintainer responsible for that part of the live ISO. I'll be a willing prey to help testing.

Chatty (mail-chatty)
summary: - Boot freeze with Ubuntu 17.10-beta2 on Surface Book
+ Boot freeze with Ubuntu 17.10 Live ISO on Surface Book
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

http://people.canonical.com/~khfeng/lp1724657-2/

We just need to test 12 more kernels to find the regression.

Revision history for this message
Chatty (mail-chatty) wrote :

Last one still is an instant freeze.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

http://people.canonical.com/~khfeng/lp1724657-3/

$ git bisect log
git bisect start
# good: [6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c] Linux 4.12
git bisect good 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c
# bad: [5771a8c08880cdca3bfb4a3fc6d309d6bba20877] Linux v4.13-rc1
git bisect bad 5771a8c08880cdca3bfb4a3fc6d309d6bba20877
# bad: [e5f76a2e0e84ca2a215ecbf6feae88780d055c56] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
git bisect bad e5f76a2e0e84ca2a215ecbf6feae88780d055c56
# bad: [1849f800fba32cd5a0b647f824f11426b85310d8] Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
git bisect bad 1849f800fba32cd5a0b647f824f11426b85310d8

Revision history for this message
Chatty (mail-chatty) wrote :

Another freeze. Could you please supply a bunch of kernels I can test? Could speed up the process.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

No I can't. You can't build a kernel before knowing next commit to try.

It can be much faster if you build your own kernel locally,

$ 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 v4.12
$ git bisect bad v4.13-rc1
$ make localmodconfig
$ make -j`nproc` deb-pkg

Install the newly built kernel.
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.

Revision history for this message
Chatty (mail-chatty) wrote :

See comment #21. I don't have a productive Linux system. And again, I'm just extracting the plain kernel image "vmlinuz" from your deb and try to boot it via grub cli.

Revision history for this message
Chatty (mail-chatty) wrote :

I finally solved it by inserting intel-ucode.img (taken from archlinux-2017.10.01-x86_64.iso) as the first initrd in grub.cfg. This updates the microcode very early in the boot process. I tried this with the kernel delivered with Ubuntu 17.10 (4.13.0-generic). So updating linux-firmware is the resolution. This also solves this bug: https://bugs.launchpad.net/ubuntu/+source/intel-microcode/+bug/1724650

But I found that WiFi is unstable after like 10 mins it gets disconnected and does not see any network anymore. Time for another bug. And when I used a new kernel image (4.14-rc6) and insterted belonging modules into initrd then "(initramfs) unable to find a medium containing a live file system." Oh well.

Revision history for this message
Chatty (mail-chatty) wrote :

Ok, the wifi problem is evident since more than two years (see https://bugzilla.kernel.org/show_bug.cgi?id=109681#c66).

Revision history for this message
Chatty (mail-chatty) wrote :

Now that I found a fix does noone care anymore?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in intel-microcode (Ubuntu):
status: New → Confirmed
Revision history for this message
Stephane (stephane21) wrote :

It would be interesting to try the linux kernel v4.15, it had solved a boot freeze on my side.
See : https://bugs.launchpad.net/ubuntu/+source/intel-microcode/+bug/1746200

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.