Ubuntu 22.04 on Lenovo Legion 5 Laptop occasional boot freeze and and unexpected reboots

Bug #2008951 reported by pd71sat
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-hwe-5.19 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Problem occurs with "ubuntu-drivers install" beforehand, and in trying to resolve resorted to manual nvidia drivers install approach. Problem recurs anyway.

Now not sure is nvidia issue as sometimes bluetooth does not get recognized as now (in this session).

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gnome-shell 42.5-0ubuntu1
ProcVersionSignature: Ubuntu 5.19.0-32.33~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-32-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Wed Mar 1 18:33:58 2023
DisplayManager: gdm3
InstallationDate: Installed on 2022-11-18 (103 days ago)
InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions: mutter-common 42.5-0ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
pd71sat (pd71sat) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report.

Next time the problem happens, please reboot and then run:

  journalctl -b-1 > prevboot.txt

and attach the resulting text file here.

tags: added: amdgpu
affects: gnome-shell (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Incomplete
Revision history for this message
pd71sat (pd71sat) wrote :

System went into reboot after reboot after each sign in. Only way I found to get out of it was to select Ubuntu advanced options at boot screen, and select to rebuild grub boot. As a result I have attached more files than requested after running -

journalctl -b-1 > prevboot1.txt
journalctl -b-2 > prevboot2.txt
journalctl -b-3 > prevboot3.txt
journalctl -b-4 > prevboot4.txt
journalctl -b-5 > prevboot5.txt

Revision history for this message
pd71sat (pd71sat) wrote :
Revision history for this message
pd71sat (pd71sat) wrote :
Revision history for this message
pd71sat (pd71sat) wrote :
Revision history for this message
pd71sat (pd71sat) wrote :
Revision history for this message
pd71sat (pd71sat) wrote :

After much searching I decided to install "lightdm" display manager. I was able to accomplish this using the advanced options on the grub boot menu, and choose ubuntu recovery mode.

When the menu appears, choose to activate the "network", then choose to enter "root" shell. Then type:

apt update
apt install lightdm

Part way through the configuration it will ask to select the default display manager as it detects that gdm3 is also installed.

Choose "lightdm" as the default to startup. After the setup completes, enter "reboot" and continue as normal.

I am now able to get into my system, and it is now stable so far - 10 minutes into the session and no sudden shutdowns!

Revision history for this message
pd71sat (pd71sat) wrote :

Just a passing update - Next day normal boot hangs - blank screen. However powering off, choosing advanced options on grub boot menu and then activating ubuntu recovery mode, followed by resume normal startup works around the hang, and I am back to lightdm desktop login OK.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Comment #3 looks like a freeze in the NVIDIA open kernel driver.

affects: ubuntu → nvidia-graphics-drivers-525 (Ubuntu)
Changed in nvidia-graphics-drivers-525 (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I suggest switching to the non-open NVIDIA driver because I haven't seen this problem reported there.

pd71sat (pd71sat)
description: updated
Revision history for this message
pd71sat (pd71sat) wrote :

I can categorically say that this issue is now behind me. The issue turned out to be kernel driver support for the "Realtek RTL8111/8168/8411 ethernet controller" on the Lenovo Legion 5 gaming laptop.

After much web searching I came across this post from reddit:
https://www.reddit.com/r/Fedora/comments/gejn0v/r8169_ethernet_flapping_connection_loss/

This started a search for "install r8168 driver and blacklist r8169" which led me to:
https://packages.debian.org/sid/r8168-dkms

Following the advice to use the installed distribution manager to add the r8168 driver I then ran:

===> sudo apt install r8168-dkms

Rebooting the machine after this and have not had a sudden shutdown since.

This issue made me think that "gimp" tool was first at fault as I started having the issue when using it.
Then "firefox", then "gnome" started acting up! All this time many packages got corrupted from incomplete updates, etc. I finally re-installed Ubuntu from iso at the 22.04.02 level and then came onto the stated solution above. Hope that this can help someone else who may be starting to regret purchase of this fine machine.

I dual boot Windows 11 and Ubuntu Linux, each on it's own NVMe drive.

Changed in nvidia-graphics-drivers-525 (Ubuntu):
status: New → Fix Committed
assignee: nobody → pd71sat (pd71sat)
affects: nvidia-graphics-drivers-525 (Ubuntu) → linux-hwe-5.19 (Ubuntu)
Changed in linux-hwe-5.19 (Ubuntu):
assignee: pd71sat (pd71sat) → nobody
status: Fix Committed → New
status: New → Confirmed
Revision history for this message
Wojciech Borkowski (borkowski22ai) wrote :

My Legion do not freze but quite offten resets unexpectedly.
After such reset WiFi is not available.

Also number of errors in succesive boots differs:

wborkowski@w-borkowski-PC:~$ grep "Error" prevboot0.txt | wc -l
38
wborkowski@w-borkowski-PC:~$ grep "Error" prevboot1.txt | wc -l
42
wborkowski@w-borkowski-PC:~$ grep "Error" prevboot2.txt | wc -l
42
wborkowski@w-borkowski-PC:~$ grep "Error" prevboot3.txt | wc -l
40
wborkowski@w-borkowski-PC:~$ grep "Error" prevboot4.txt | wc -l
43
wborkowski@w-borkowski-PC:~$ grep "Error" prevboot5.txt | wc -l
41

Revision history for this message
Wojciech Borkowski (borkowski22ai) wrote :

The prevboot0.txt is current, with WiFi working.
Some of previous boot is after spontanic reboot.

Revision history for this message
Wojciech Borkowski (borkowski22ai) wrote :

This one has max number of errors.

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.