Intermittent hangs on boot Ubuntu 20.04 on Lenovo E595

Bug #1877889 reported by pauldoo
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello,
I see occasional hangs on boot. The hangs occur after entering the LUKS decryption password for the root filesystem, and before the login screen is displayed. The "/boot" filesystem is not encrypted, so the initramfs is loading fine etc. The hangs are intermittent. Sometimes I don't see a hang for 10+ boots in a row, and sometimes I'll get a hang 5 times in a row.

When the hang occurs the boot splash screen is visible (not the login screen). The system is still responsive to SysRq keys, so I can somewhat safely issue S+U+S+B sequence to try booting again without corrupting much.

I have tried removing the "quiet splash" kernel parameters that are enabled by default on Ubuntu desktop to see if any interesting messages occur that way. So far however I have not experienced a hang with "quiet splash" removed.

This system is a Lenovo E595 (Ryzen 3500U) with the latest BIOS from Lenovo installed (v1.16), running Ubuntu 20.04 desktop. I am submitting this bug using `ubuntu-bug linux-image-generic`, but I don't know for sure if this is a kernel issue or something else.

I suspect my bug might be the same as this one already reported ( https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1873594 ), but I'm filing my own anyway as a means to capture more details of my system.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-generic 5.4.0.29.34
ProcVersionSignature: Ubuntu 5.4.0-29.33-generic 5.4.30
Uname: Linux 5.4.0-29-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: paul 2507 F.... pulseaudio
 /dev/snd/controlC0: paul 2507 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Sun May 10 20:09:53 2020
MachineType: LENOVO 20NFCTO1WW
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-29-generic root=UUID=f466d4ea-c251-4721-b071-bd70c82f00e1 ro rootflags=subvol=@ splash quiet vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-29-generic N/A
 linux-backports-modules-5.4.0-29-generic N/A
 linux-firmware 1.187
SourcePackage: linux
UpgradeStatus: Upgraded to focal on 2020-04-24 (15 days ago)
dmi.bios.date: 03/30/2020
dmi.bios.vendor: LENOVO
dmi.bios.version: R11ET36W (1.16 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20NFCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: Not Defined
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.modalias: dmi:bvnLENOVO:bvrR11ET36W(1.16):bd03/30/2020:svnLENOVO:pn20NFCTO1WW:pvrThinkPadE595:rvnLENOVO:rn20NFCTO1WW:rvrNotDefined:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad E595
dmi.product.name: 20NFCTO1WW
dmi.product.sku: LENOVO_MT_20NF_BU_Think_FM_ThinkPad E595
dmi.product.version: ThinkPad E595
dmi.sys.vendor: LENOVO

Revision history for this message
pauldoo (paul-richards) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
pauldoo (paul-richards) wrote :

Since logging this bug entry, I suffered a corrupted root filesystem. I don't know for sure that the hanging on boot followed by me forcing reboots was the cause, but I guess it won't have helped. :/ I guess my SysRq S+U+S+B didn't work quite as well as I'd thought.

I was unable to recover the filesystem so I've had to reinstall Ubuntu 20.04. Luckily it was just the root filesystem that was lost so a reinstall was quite straight forward.

I don't expect that a reinstall will have fixed the hangs (my kernel version is precisely the same as before), so I'll update when I see them again.

Revision history for this message
pauldoo (paul-richards) wrote :

I confirm that the hang on boot issue still occurs after the reinstall of Ubuntu 20.04.

Same kernel as before:

$ cat /proc/version
Linux version 5.4.0-29-generic (buildd@lgw01-amd64-035) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020
$ cat /proc/version_signature
Ubuntu 5.4.0-29.33-generic 5.4.30

Revision history for this message
Thorsten Bonhagen (viperomega) wrote :
Revision history for this message
pauldoo (paul-richards) wrote :

Thanks for the reply,

I followed the link provided in that bug ( https://kernel.ubuntu.com/~kernel-ppa/mainline/drm-tip/current/ ) and couldn't find "5.7.0-994.20200511220" there.

The version there currently is "5.7.0-994.202005132209". I assumed this is just a few days newer than the one you suggest, so tried it anyway (hashes below).

Unfortunately that kernel does not boot for me. I get an error message stating "error: /vmlinuz-5.7.0-994-generic has invalid signature". I don't see any mention of this error on the wiki pages linked from the drm-tip downloads page:
* https://wiki.ubuntu.com/Kernel/MainlineBuilds
* https://wiki.ubuntu.com/Kernel/FAQ

$ sha256sum linux-*.deb
555703f956f138e6d0a729ea9d031d09ee45ae772069430887a8495259bc2790 linux-headers-5.7.0-994_5.7.0-994.202005132209_all.deb
f41ed6f5c7cb0b7fa618a9fc079f0f8407045bacd9981973ed2c1ee593e64f6c linux-headers-5.7.0-994-generic_5.7.0-994.202005132209_amd64.deb
3c4c454454678f7d1077489b7126de6f8f337510db8d061795cc1ae56c6bb650 linux-image-unsigned-5.7.0-994-generic_5.7.0-994.202005132209_amd64.deb
13120fd4eb5ec37707c2883b3e6b57b3f2d82a10ab85d0af4812f83370cbe041 linux-modules-5.7.0-994-generic_5.7.0-994.202005132209_amd64.deb

Revision history for this message
pauldoo (paul-richards) wrote :

The regular kernel has since updated to 5.4.0-31.35, but I can confirm that the hang on boot still occurs.

I haven't heard back in a few days on whether there is something else you would like me to try. Like I said previously the drm-tip kernel didn't boot at all for me (invalid signature error).

Anecdotally, I feel like the hang on boot is more common when the laptop is running off battery only (no AC). I hope that's helpful.

New kernel version:

$ uname -a
Linux len 5.4.0-31-generic #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/version
Linux version 5.4.0-31-generic (buildd@lgw01-amd64-059) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020
$ cat /proc/version_signature
Ubuntu 5.4.0-31.35-generic 5.4.34

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

Secure Boot need to be disabled to load unsigned kernel.

Revision history for this message
pauldoo (paul-richards) wrote :

Oh, I see! I had no idea that error was related to secure boot. Thanks! I'll try that later and get back to you.

The drm-tip download page ( https://kernel.ubuntu.com/~kernel-ppa/mainline/drm-tip/current/ ) links to the following wiki pages, neither of which mention secure boot in any way.
* https://wiki.ubuntu.com/Kernel/MainlineBuilds
* https://wiki.ubuntu.com/Kernel/FAQ

Maybe most folks who decide to install one of these kernels have enough background knowledge to figure this out; but if users are being invited to install these kernels as part of diagnosing bugs maybe it's worth adding a note to one of those pages about secure boot?

Revision history for this message
pauldoo (paul-richards) wrote :

The drm-tip directories for the most recent days have missing or failed amd64 builds, so I had to go back a few days and install the drm-tip kernel from: https://kernel.ubuntu.com/~kernel-ppa/mainline/drm-tip/2020-05-20/

With secure boot disabled I have rebooted approximately 15 times and have not been able to reproduce the hang on boot issue I was seeing with the regular 5.4 kernel. This is an intermittent issue, so I'll keep using this kernel for the time being and let you know if it hangs again.

I have some questions now:

1. Should I expect the fixes from this drm-tip kernel to be made available to the regular Ubuntu 20.04 GA kernel (v5.4) ? Or, will the fixes only be made available in the next 20.04 HWE kernel?

2. How safe is it to keep using the drm-tip kernel in the meantime? I imagine the drm-tip kernel is not as thoroughly tested as the regular kernel, and does not receive automatic security updates.

---

For reference, these are the packages I downloaded and installed.

$ sha256sum linux-*.deb
83ae364e68ef7cfdc171a5037674da2f1cf8c67b63e84d2e2d08fab501499a37 linux-headers-5.7.0-994_5.7.0-994.202005192206_all.deb
a4b5650ccd06137b1edf5e6c10283b598f32322149d46633f358a3b1d6ed9788 linux-headers-5.7.0-994-generic_5.7.0-994.202005192206_amd64.deb
fb1dd00c1820b6e790302698b54818cfad2611b3de4b6135ce0316a86274eb16 linux-image-unsigned-5.7.0-994-generic_5.7.0-994.202005192206_amd64.deb
711c3fe02fcd38c6607c4c3f8e3a417ccc0b3252f4c576cf1fcf0e4743714197 linux-modules-5.7.0-994-generic_5.7.0-994.202005192206_amd64.deb

Revision history for this message
Thorsten Bonhagen (viperomega) wrote :

please keep an eye on freezes, i had such with 5.7.0-994.202005112208

Revision history for this message
pauldoo (paul-richards) wrote :

I'm afraid to report that I experienced a hang on boot today, using the drm-tip kernel ("5.7.0-994.202005192206"). This time the hang occurred before the LUKS password prompt to unlock the root filesystem. There was a message printed to the screen, which I will attach shortly.

I was able to reboot with SysRq SUSB sequence and the laptop booted fine next time.

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

Can you please try kernel parameter "nomodeset"?

Revision history for this message
pauldoo (paul-richards) wrote :

Which kernel would you like me to test with that parameter? The drm-tip one, or the regular Ubuntu 20.04 one (v5.4)?

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

Both are fine.

Revision history for this message
Thorsten Bonhagen (viperomega) wrote :

please keep an eye on freezes after random time, for me "nomodeset" do not fix freezes during operation especially in battery mode.

Revision history for this message
pauldoo (paul-richards) wrote :

I've switched back to the 5.4 kernel and have enabled the 'nomodeset' parameter. The laptop has booted fine. I'll keep using it like this and let you know if I see another hang on boot.

I've noticed that Wayland is no longer an option on the login screen. I presume this is an expected consequence of disabling modesetting.

$ cat /proc/version
Linux version 5.4.0-31-generic (buildd@lgw01-amd64-059) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #35-Ubuntu SMP Thu May 7 20:20:34 UTC 2020

$ cat /proc/version_signature
Ubuntu 5.4.0-31.35-generic 5.4.34

$ cat /etc/default/grub | grep GRUB_CMDLINE
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""

Revision history for this message
pauldoo (paul-richards) wrote :

@viperomega It's interesting that you mention freezes at times other than bootup. I've never experienced that problem on this laptop. Only the hang on boot issue.

Revision history for this message
Thorsten Bonhagen (viperomega) wrote :

My e595 is my main develop machine, qt dev, lots of ssh connections, virtualbox + many firefox tabs with sometime youtube vids and many thunderbird imap accounts.
And with the freeze is not even sysreq+"reisub" possible.
The e595 not have a rs232 so i cannot console to second machine, what i would do to see what happen :-(
And i think non of the kernel can use ttyusb for kernel console because ttyusb is always "m" not "y" compiled. But i didn't try yet. Maybe next days i will try ...

Revision history for this message
pauldoo (paul-richards) wrote :

So far so good with me using the standard 5.4 kernel and the nomodeset parameter.

I wonder if the freezes during usage that viperomega experiences might be unrelated to the hang on boot issue (that we both saw without nomodeset).

Revision history for this message
Thorsten Bonhagen (viperomega) wrote :

Hi,
have a look on:
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7/
5.7.0-050700_5.7.0-050700.202005312130
without "nomodeset"

Revision history for this message
pauldoo (paul-richards) wrote :

I've installed the kernel from that link, and removed the "nomodeset" kernel parameter. The system has booted fine and Wayland is working again.

I'll let you know if I see a hang on boot.

---

v5.7 (3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162)

9a1ce750a7d96cc5b6203fb82bc7cc9d5d429552824caaaa4d975f9747fe6916 linux-headers-5.7.0-050700_5.7.0-050700.202005312130_all.deb
f1f39b9b7efd9b4ea25f991ef585115d2c853b332e515596efc85556c88f4478 linux-headers-5.7.0-050700-generic_5.7.0-050700.202005312130_amd64.deb
31c09679caf2038911f4615d63b7b7e76803f269857cd5e5f56e7aaaf6b5b951 linux-image-unsigned-5.7.0-050700-generic_5.7.0-050700.202005312130_amd64.deb
8e14747de53e2cfb8ba221426b362874f36b005fd216c06a2fbc47dcae40d1b6 linux-modules-5.7.0-050700-generic_5.7.0-050700.202005312130_amd64.deb

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.7.0-050700-generic root=UUID=f7c34228-ee6f-4043-931c-f4752ad503c8 ro quiet splash vt.handoff=7

$ cat /proc/version
Linux version 5.7.0-050700-generic (kernel@tangerine) (gcc version 9.3.0 (Ubuntu 9.3.0-13ubuntu1), GNU ld (GNU Binutils for Ubuntu) 2.34) #202005312130 SMP Mon Jun 1 01:33:12 UTC 2020

Revision history for this message
pauldoo (paul-richards) wrote :

I today experienced a hang using the v5.7 kernel above without the "nomodeset" kernel parameter.

The hang occurred before the LUKS password prompt. I will attach a screenshot of the message displayed at the time of the hang.

I will revert to the v5.4 GA kernel and reapply the "nomodeset" parameter.

Revision history for this message
pauldoo (paul-richards) wrote :
Revision history for this message
pauldoo (paul-richards) wrote :

So, what are the next steps here (if any)?

To summarize, the regular Ubuntu 20.04 GA kernel (v5.4) works reliably for me so long as "nomodeset" is provided as a kernel boot parameter. Without this parameter that kernel and others I was invited to test all hang occasionally on boot.

Is there anything more that needs to happen on this ticket? Do you need me to test other kernel builds for example?

Or, is the issue "resolved", and I should keep using "nomodeset" indefinitely?

Revision history for this message
Matthew Wright (im2wright) wrote :

I am having this same issue on my Lenovo X220. Using Ubuntu 20.04.1 LTS. I am able to boot by disabling the splash screen using:

BOOT_IMAGE=/boot/vmlinuz-5.4.0-51-generic root=UUID=70d5c302-0fe3-4a83-9076-ca834b973ac3 ro nosplash

I am using the stock kernel:

Linux version 5.4.0-51-generic (buildd@lcy01-amd64-020) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #56-Ubuntu SMP Mon Oct 5 14:28:49 UTC 2020

I have not tried "nomodeset".

Revision history for this message
Kryzmak (kryzmak) wrote :

Same problem here with Lenovo V15-ADA Devices. We do have about 60 laptops and nearly all show the same behaviour more or less often.
The workaround that helped for me with kernel 5.4.0-54 or lesser was building the amdgpu kernel modules version 20.30. But with upgrade to kernel 5.4.0-56 this no longer works for us.
By the way, this error also occurs without LUKS encryption but way less often.

Revision history for this message
pauldoo (paul-richards) wrote :

Since my last comment my Lenovo E595 laptop has changed configuration slightly.

1. The BIOS has updated to v1.19.

2. I installed the "linux-image-generic-hwe-20.04-edge" package, which as I write is an early release of the upcoming HWE kernel from 20.04.2 (kernel v5.8).

With these updates in place I removed the "nomodeset" kernel boot parameter, and so far haven't seen a hang on boot in the past 2+ weeks. Like with the other kernels I tested I will keep an eye out for issues and update if I see anything.

Unlike @viperomega - I still have not experienced a hang outside of the boot process, with any of the kernels and boot parameters I've tried.

Revision history for this message
Kryzmak (kryzmak) wrote :

I am now able to reproduce this behaviour. Booting to blackscreen (after LUKS encryption) only occurs with an unplugged power adapter and NOT with a plugged one.
With Ubuntu 18.04.5 (Kernel is the same 5.4.0-56, but complaining about missing amdgpu renoir drivers) the problem in my tests did NEVER occur. But the boot process with an unplugged power adapter is way more slower than with a plugged one.
I have absolutely no clue about this behaviour. boot logs are not really helpful (at least with my understanding)

Revision history for this message
Kryzmak (kryzmak) wrote :

Setting the kernel parameter iommu=soft seems to solve this problem.

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

pauldoo,
Sounds like issue is solved on v5.8?

Kryzmak,
Is it also a Ryzen laptop?

Revision history for this message
pauldoo (paul-richards) wrote :

kaihengfeng, either it was fixed in Linux kernel v5.8 (like you say), or it was fixed by the Lenovo BIOS update.

Either way, I haven't seen the hang on boot issue in a long while now.

Revision history for this message
Kryzmak (kryzmak) wrote :

Yes, it is an AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (Picasso)

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

Other bug subscribers

Remote bug watches

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