System Hangs on Shutdown/Reboot

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
shankar58989
Level 1
Level 1
Posts: 8
Joined: Sun Jul 04, 2021 2:29 am

System Hangs on Shutdown/Reboot

Post by shankar58989 »

Hello, I have Linux mint 20.1 installed on a old laptop Dell Latitude XT3. Below is my system info

Code: Select all

System:
  Kernel: 5.4.0-77-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Cinnamon 4.8.6 wm: muffin 4.8.1 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: Dell product: Latitude XT3 v: 01 serial: <filter> 
  Chassis: type: 9 serial: <filter> 
  Mobo: Dell model: 09HM99 v: A00 serial: <filter> BIOS: Dell v: A14 
  date: 05/12/2017 
Battery:
  ID-1: BAT0 charge: 6.8 Wh condition: 6.8/44.0 Wh (15%) volts: 12.2/11.1 
  model: Samsung SDI DELL 5K4WW18 type: Li-ion serial: <filter> status: Full 
CPU:
  Topology: Dual Core model: Intel Core i5-2520M bits: 64 type: MT MCP 
  arch: Sandy Bridge rev: 7 L2 cache: 3072 KiB 
  flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19955 
  Speed: 798 MHz min/max: 800/3200 MHz Core speeds (MHz): 1: 798 2: 798 
  3: 798 4: 799 
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics 
  vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0126 
  Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 3000 (SNB GT2) 
  v: 3.3 Mesa 20.2.6 compat-v: 3.0 direct render: Yes 
Audio:
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio 
  vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  chip ID: 8086:1c20 
  Sound Server: ALSA v: k5.4.0-77-generic 
Network:
  Device-1: Intel 82579LM Gigabit Network vendor: Dell driver: e1000e 
  v: 3.2.6-k port: 3080 bus ID: 00:19.0 chip ID: 8086:1502 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi 
  v: kernel port: 3040 bus ID: 02:00.0 chip ID: 8086:0082 
  IF: wlp2s0 state: up mac: <filter> 
  IF-ID-1: br-b765b0f3e1f4 state: up speed: N/A duplex: N/A mac: <filter> 
  IF-ID-2: br-ef19a8697928 state: up speed: N/A duplex: N/A mac: <filter> 
  IF-ID-3: docker0 state: down mac: <filter> 
  IF-ID-4: veth0af1df8 state: up speed: 10000 Mbps duplex: full 
  mac: <filter> 
  IF-ID-5: veth45de15f state: up speed: 10000 Mbps duplex: full 
  mac: <filter> 
  IF-ID-6: veth5661b1a state: up speed: 10000 Mbps duplex: full 
  mac: <filter> 
  IF-ID-7: veth6b7c5ed state: up speed: 10000 Mbps duplex: full 
  mac: <filter> 
  IF-ID-8: veth8b316a0 state: up speed: 10000 Mbps duplex: full 
  mac: <filter> 
  IF-ID-9: vethc9704ad state: up speed: 10000 Mbps duplex: full 
  mac: <filter> 
Drives:
  Local Storage: total: 232.89 GiB used: 122.50 GiB (52.6%) 
  ID-1: /dev/sda vendor: Seagate model: ST250LT007-9ZV14C size: 232.89 GiB 
  speed: 3.0 Gb/s rotation: 7200 rpm serial: <filter> rev: DEM1 scheme: MBR 
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci 
  v: 3.0 port: 3060 bus ID: 00:1f.2 chip ID: 8086.282a rev: 04 
Partition:
  ID-1: / size: 85.29 GiB used: 61.15 GiB (71.7%) fs: ext4 dev: /dev/sda7 
  ID-2: swap-1 size: 5.73 GiB used: 214.2 MiB (3.7%) fs: swap dev: /dev/sda6 
Sensors:
  System Temperatures: cpu: 52.0 C mobo: 44.0 C sodimm: 45.0 C 
  Fan Speeds (RPM): cpu: 3495 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/docker.list 
  1: deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  Active apt repos in: /etc/apt/sources.list.d/vivaldi.list 
  1: deb http://repo.vivaldi.com/stable/deb/ stable main
Info:
  Processes: 263 Uptime: 1h 18m Memory: 3.72 GiB used: 1.64 GiB (44.1%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38
I pressed ctrl+alt+F2 when it hanged and took a pic of the things on the screen.Image
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Pjotr
Level 24
Level 24
Posts: 20088
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: System Hangs on Shutdown/Reboot

Post by Pjotr »

Try this:
Update Manager - panel: View - Linux kernels
Install the latest kernel of the 5.11 series. Then reboot.

Also worth a try: a BIOS update (when available in the support section of the Dell website).
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
shankar58989
Level 1
Level 1
Posts: 8
Joined: Sun Jul 04, 2021 2:29 am

Re: System Hangs on Shutdown/Reboot

Post by shankar58989 »

Hello, Thank you for your reply. I did the kernel change that you suggested. I think my BIOS is already the latest. So far so good. I have not had any system hanging during shutdown during the past 2 days of usage. However I would like to wait till the end of the week to mark this issue as solved.

I also did the change to the swapiness that i came across in your "Things to do after installing Linux Mint 20.1". It is working wonderfully.
shankar58989
Level 1
Level 1
Posts: 8
Joined: Sun Jul 04, 2021 2:29 am

Re: System Hangs on Shutdown/Reboot

Post by shankar58989 »

Hello, Today i encountered the same kernel panic hanging problem again. Is there any information that i need to provide to help solve this issue?
User avatar
Pjotr
Level 24
Level 24
Posts: 20088
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: System Hangs on Shutdown/Reboot

Post by Pjotr »

Try this:

1. Make a Timeshift snapshot for easy reversing in case things go south.

2. a. Launch a terminal window (this is how to launch a terminal window)

b. Copy/paste this command into the terminal:

Code: Select all

xed admin:///etc/default/grub
(the three consecutive slashes are intended and no typo!

Press Enter.

c. Find the following line:

Code: Select all

GRUB_CMDLINE_LINUX=""
Replace it by (use copy/paste!):

Code: Select all

GRUB_CMDLINE_LINUX="initcall_blacklist=dw_i2c_init_driver"
Save the modified file and close it.

d. Copy/paste the following command line into the terminal, in order to execute the modification:

Code: Select all

sudo update-grub
(if you type the command: note the dash between update and grub)

Press Enter.

e. Reboot and test.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
shankar58989
Level 1
Level 1
Posts: 8
Joined: Sun Jul 04, 2021 2:29 am

Re: System Hangs on Shutdown/Reboot

Post by shankar58989 »

Pjotr wrote: Wed Jul 07, 2021 4:55 am Try this:

1. Make a Timeshift snapshot for easy reversing in case things go south.

2. a. Launch a terminal window (this is how to launch a terminal window)

b. Copy/paste this command into the terminal:

Code: Select all

xed admin:///etc/default/grub
(the three consecutive slashes are intended and no typo!

Press Enter.

c. Find the following line:

Code: Select all

GRUB_CMDLINE_LINUX=""
Replace it by (use copy/paste!):

Code: Select all

GRUB_CMDLINE_LINUX="initcall_blacklist=dw_i2c_init_driver"
Save the modified file and close it.

d. Copy/paste the following command line into the terminal, in order to execute the modification:

Code: Select all

sudo update-grub
(if you type the command: note the dash between update and grub)

Press Enter.

e. Reboot and test.
Hi, Thank you for the suggestion. I have done as you have suggested. I will check it for a week and get back if the issue persists or gone.
shankar58989
Level 1
Level 1
Posts: 8
Joined: Sun Jul 04, 2021 2:29 am

Re: System Hangs on Shutdown/Reboot

Post by shankar58989 »

Hi, I am still getting the Kernel Panic hanging on shutdown. I have attached the link of the the screenshot for your reference. Please help me solve this. I really want to avoid reinstalling the system.

Image
User avatar
Larry78723
Level 14
Level 14
Posts: 5476
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: System Hangs on Shutdown/Reboot

Post by Larry78723 »

Is Secure Boot disabled in your bios?
Image
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
JohnMurrell
Level 1
Level 1
Posts: 3
Joined: Wed Aug 04, 2021 10:35 am

Re: System Hangs on Shutdown/Reboot

Post by JohnMurrell »

I have had this intermittently for several months

One thing I noticed that before it hung on shutdown there was system activity showing on the System Monitor Panel Graph but there was nothing (or very little ) showing on the 'Processes ' screen in System Monitor. If I waited until the activity stopped which could be 10's of minutes the system appeared to shut down correctly.

I eventually discovered the 'top' command line utility and that showed that either rsync or rm were running both called from Timeshift. It appeared that Timeshift was creating a new backup on the hour and taking perhaps 1/2 hour to complete. If I shut down the system using the 'Quit' icon or from the command line while rsync / rm were running this appeared to cause the system to hang. At least the display and keyboard hung - it sounded that there was still disc activity which seemed to continue for several hours.

The only way out of the hung state that worked was either pressing the hardware reset button or turning the power off - neither are a very good idea if there is still disc activity.

The cure - I changed the options in Timeshift so it no longer does an hourly backup only a daily one. The backup now seems to run once soon after I have started the computer so is not running when I shut the computer down several hours later. I normally check the System Monitor Graph shows no activity and if it does I run top to see if rsync / rm are being run by Timeshift.

I suspect there is a bug in Timeshift / rsync / rm that causes the system to hang but difficult to diagnose.
shankar58989
Level 1
Level 1
Posts: 8
Joined: Sun Jul 04, 2021 2:29 am

Re: System Hangs on Shutdown/Reboot

Post by shankar58989 »

Larry78723 wrote: Mon Aug 02, 2021 1:07 pm Is Secure Boot disabled in your bios?
Hi, Yes secure boot is disabled in my BIOS. Now I have faced this issue in a moderately old Dell Inspiron 5558 machine also once. Even in that machine the secure boot is disabled.
shankar58989
Level 1
Level 1
Posts: 8
Joined: Sun Jul 04, 2021 2:29 am

Re: System Hangs on Shutdown/Reboot

Post by shankar58989 »

JohnMurrell wrote: Wed Aug 04, 2021 10:52 am I have had this intermittently for several months

One thing I noticed that before it hung on shutdown there was system activity showing on the System Monitor Panel Graph but there was nothing (or very little ) showing on the 'Processes ' screen in System Monitor. If I waited until the activity stopped which could be 10's of minutes the system appeared to shut down correctly.

I eventually discovered the 'top' command line utility and that showed that either rsync or rm were running both called from Timeshift. It appeared that Timeshift was creating a new backup on the hour and taking perhaps 1/2 hour to complete. If I shut down the system using the 'Quit' icon or from the command line while rsync / rm were running this appeared to cause the system to hang. At least the display and keyboard hung - it sounded that there was still disc activity which seemed to continue for several hours.

The only way out of the hung state that worked was either pressing the hardware reset button or turning the power off - neither are a very good idea if there is still disc activity.

The cure - I changed the options in Timeshift so it no longer does an hourly backup only a daily one. The backup now seems to run once soon after I have started the computer so is not running when I shut the computer down several hours later. I normally check the System Monitor Graph shows no activity and if it does I run top to see if rsync / rm are being run by Timeshift.

I suspect there is a bug in Timeshift / rsync / rm that causes the system to hang but difficult to diagnose.
Hi, Thanks for the reply. I will check system monitor before shutting down and report. But my Timeshift backup setting is set to Daily already.
JohnMurrell
Level 1
Level 1
Posts: 3
Joined: Wed Aug 04, 2021 10:35 am

Re: System Hangs on Shutdown/Reboot

Post by JohnMurrell »

Checking 'top' from a terminal window is probably better than using the system monitor which I think only shows user processes not system ones.

When running use i to hide processes using no CPU & c toggles the display from the name of the programme running to the line calling it which gives a better idea of what is calling the running programme.

If you have Daily turned on in Timeshift ensure you have hourly turned off as hourly overrides daily. Edit: Timeshift could still be running even on the daily schedule - I am not sure when it starts and how long it takes to run so is worth checking using top.

There is a suggestion elsewhere in the forum that the shut down problem may be related in the reduction of the shut-down wait time from 90s to 10s. People have suggested restoring it to 90s but then your system will take longer to shut down but allows processes more time to finish.
JohnMurrell
Level 1
Level 1
Posts: 3
Joined: Wed Aug 04, 2021 10:35 am

Re: System Hangs on Shutdown/Reboot

Post by JohnMurrell »

As I wanted to shutdown my system this morning while timeshift was running I thought I would try shutting down my computer from the terminal command line using 'sudo shutdown -h 1' This gives running processes 1 minute to shut down. This worked ok & the system shut down cleanly. My only caveat is that rsync had finished running and only rm & timeshift were running.


'
shankar58989
Level 1
Level 1
Posts: 8
Joined: Sun Jul 04, 2021 2:29 am

Re: System Hangs on Shutdown/Reboot

Post by shankar58989 »

JohnMurrell wrote: Sun Aug 08, 2021 5:42 pm As I wanted to shutdown my system this morning while timeshift was running I thought I would try shutting down my computer from the terminal command line using 'sudo shutdown -h 1' This gives running processes 1 minute to shut down. This worked ok & the system shut down cleanly. My only caveat is that rsync had finished running and only rm & timeshift were running.


'
Hi, Thanks for your inputs on this matter. I tried the command and shutdown the computer using 'sudo shutdown -h 1'. This was working fine for a few days and then again i faced a kernel panic twice in the past 3 days. I really wanted to avoid reinstalling linux, but i feel like i have been through too many hard shutdowns using the long press of the power button, and i feel like i am pushing my luck.
Locked

Return to “Beginner Questions”