Extremely slow (rather forever) shutdown on Linux Mint

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
morpheus327

Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Hello all,

Hope you all are having great summers.

Here's something that's bothering me ever since I installed Linux Mint.
My configuration is LM-18-Cinnamon 64 Bit. My cinnamon version is 3.0.7. Installed on an IBM (Lenovo) thinkpad.

If I shutdown mint soon after start up, it would elegantly (fairly quickly) shut down.
However, if you work on it for long hours, put it to sleep, wake it up, continue with opening apps, closing them, write documents, LaTeX, close them all... and then try shutting down: it refuses to shut down and can take 2 hours, whole day or may even go forever until I power it off.

At first I thought it was perhaps due to some partitions which were not unmounted before shutdown. So I would gracefully unmount everything. Yet, no luck.

I don't have apache2 or mysql etc., the presence of which, like some other friends on this forum discovered, interferes with smooth shutdowns.

How can I find what's the bottleneck?
Other than this problem, the OS rocks!

Will appreciate any help.

Thank you!
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: 20129
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by Pjotr »

Please generate an overview of your system like this:
- Launch a terminal window (this is how to launch a terminal window);
- make the terminal window full screen, to avoid chopped lines;
- Copy/paste this command into the terminal:

Code: Select all

inxi -Fxz
(if you type: the letter F is a capital letter)

Press Enter.

Copy/paste the output in your next message.
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.
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Thanks Pjotr,
Here's the output.

Code: Select all

System:    Host: Narad Kernel: 4.4.0-57-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.0.7 (Gtk 3.18.9-1ubuntu3.3)
           Distro: Linux Mint 18 Sarah
Machine:   System: LENOVO product: 4403CTO v: ThinkPad L412
           Mobo: LENOVO model: 4403CTO
           Bios: LENOVO v: 81ET63WW (1.39 ) date: 04/11/2013
CPU:       Dual core Intel Core i3 M 330 (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 8511
           clock speeds: max: 2133 MHz 1: 933 MHz 2: 1066 MHz 3: 1066 MHz
           4: 2133 MHz
Graphics:  Card: Intel Core Processor Integrated Graphics Controller
           bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1366x768@60.00hz
           GLX Renderer: Mesa DRI Intel Ironlake Mobile
           GLX Version: 2.1 Mesa 12.0.6 Direct Rendering: Yes
Audio:     Card Intel 5 Series/3400 Series High Definition Audio
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.4.0-57-generic
Network:   Card-1: Realtek RTL8191SEvB Wireless LAN Controller
           driver: rtl8192se port: 2000 bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: 3000 bus-ID: 04:00.0
           IF: enp4s0 state: down mac: <filter>
Drives:    HDD Total Size: 288.1GB (48.0% used)
           ID-1: /dev/sda model: TS128GSSD370S size: 128.0GB
           ID-2: /dev/sdb model: HITACHI_HTS72501 size: 160.0GB
Partition: ID-1: / size: 28G used: 13G (50%) fs: ext4 dev: /dev/sda5
           ID-2: /home size: 13G used: 5.9G (52%) fs: ext4 dev: /dev/sda7
           ID-3: swap-1 size: 5.00GB used: 0.64GB (13%) fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 53.0C mobo: 0.0C
           Fan Speeds (in rpm): cpu: 703
Info:      Processes: 247 Uptime: 1:07 Memory: 2529.5/5764.4MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35 

User avatar
Pjotr
Level 24
Level 24
Posts: 20129
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by Pjotr »

OK, try this:
Update Manager - panel: View - Linux kernels
Install the latest kernel from the 4.4 series.

Then reboot.

Then try a shutdown.
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.
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Hi again.
I removed the previous kernel and installed the new one as you suggested. This one is '4.4.0-79-generic'.

I will wait a little while, do some work (e.g. open applications, finish some office-work, write the pending papers, finish some debugging) and will let you know whether this kernel update made any impact on shutdown.

Thanks for your help so far.

Code: Select all

System:    Host: Narad Kernel: 4.4.0-79-generic x86_64 (64 bit)
           Desktop: Cinnamon 3.0.7  Distro: Linux Mint 18 Sarah
Machine:   System: LENOVO product: 4403CTO v: ThinkPad L412
           Mobo: LENOVO model: 4403CTO
           Bios: LENOVO v: 81ET63WW (1.39 ) date: 04/11/2013
CPU:       Dual core Intel Core i3 M 330 (-HT-MCP-) cache: 3072 KB 
           clock speeds: max: 2133 MHz 1: 2133 MHz 2: 1866 MHz 3: 2133 MHz
           4: 1866 MHz
Graphics:  Card: Intel Core Processor Integrated Graphics Controller
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1366x768@60.00hz
           GLX Renderer: Mesa DRI Intel Ironlake Mobile
           GLX Version: 2.1 Mesa 12.0.6
Audio:     Card Intel 5 Series/3400 Series High Definition Audio
           driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.4.0-79-generic
Network:   Card-1: Realtek RTL8191SEvB Wireless LAN Controller
           driver: rtl8192se
           IF: wlp3s0 state: up mac: f0:7b:cb:a5:13:8a
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           IF: enp4s0 state: down mac: c8:0a:a9:da:dd:14
           WAN IP: 128.227.66.96 IF: wlp3s0 ip-v4: 10.138.88.212
           IF: enp4s0 ip-v4: N/A
Drives:    HDD Total Size: 288.1GB (8.5% used)
           ID-1: /dev/sda model: TS128GSSD370S size: 128.0GB
           ID-2: /dev/sdb model: HITACHI_HTS72501 size: 160.0GB
Partition: ID-1: / size: 28G used: 13G (49%) fs: ext4 dev: /dev/sda5
           ID-2: /home size: 13G used: 5.9G (52%) fs: ext4 dev: /dev/sda7
           ID-3: swap-1 size: 5.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda6
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 76.0C mobo: 0.0C
           Fan Speeds (in rpm): cpu: 581
Info:      Processes: 220 Uptime: 1 min Memory: 1055.9/5764.3MB
           Client: Shell (bash) inxi: 2.2.35 

phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by phd21 »

Hi "morpheus327",

I just read your post and the good replies to it. Here are my thoughts on this as well.

FYI: There are some really nice shutdown applications you can use when you need or want to, like "QShutdown","gshutdown", "wmshutdown", etc... I like "QShutdown", you can run this and right click its system tray icon, and click shutdown, and it will shutdown quickly.

If your system is locked up, there is also this procedure:
Shutdown
hold down "ALT+Printscreen" and type in reisuo
restart
hold down "ALT+Printscreen" and type in reisub


Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
rambo919
Level 5
Level 5
Posts: 673
Joined: Wed May 22, 2013 3:11 pm

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by rambo919 »

Have this problem periodically as well (up to 10min maybe... reminds me of win98 haha), started with mint 18, never had it in mint 17 so must be either the newer kernels or switch to systemd. I also have the nvidia driver running so unsure whether it has much of a role in this.
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Hi "Pjotr",

Bad luck - the change of kernel to the most recent 4.4.__ version did not work. :(
After giving the shutdown command, the black screen lead to the LM icon and hitting the escape key produced some output (screenshot attached).
That's exactly how it has been before.

Will appreciate any more ideas.

--------------------------------------
@ "phd21"
Thanks my friend, for the suggestions. I will surely try them. I mostly shutdown using the command-line "shutdown now" or "shutdown -r now".
User avatar
Pjotr
Level 24
Level 24
Posts: 20129
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by Pjotr »

Try this: install the latest kernel from the 4.8 series. Reboot.

If that fails, try the latest kernel from the 4.10 series.
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.
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Pjotr wrote:Try this: install the latest kernel from the 4.8 series. Reboot.

If that fails, try the latest kernel from the 4.10 series.
Deal!
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Hi "Pjotr",

Bad luck. Both the linux kernels didn't help. Ver 4.10 at least showed the same behavior as the 4.4's. However, 4.8 was a bit different: after showing the 'LM" log, if I pressed the escape key, only a blinking cursor showed up on top left. Of course pressing esc again would toggle "LM".

Nevertheless, the plight remains. Shutdown takes forever.

I would emphasize one more detail, if that might help. I did have quick shutdowns with all these kernels, but only in situations when I didn't use my laptop much. Which means, if I leave it running overnight, or do some 'sleep-wakeup' cycles, watch a movie etc., then it won't shutdown.

I'm still willing to go more miles on this issue.

Thanks again.
User avatar
Pjotr
Level 24
Level 24
Posts: 20129
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by Pjotr »

Try this: check the support section of the Lenovo website for a newer BIOS. When available, install it.

If that fails to help as well, try booting with the parameter acpi=noirq.
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.
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Thanks "Pjotr",

Lenovo doesn't seem to have a latest BIOS than the one I am using.
I'm trying your second recommendation now.
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Hi "Pjotr",

Sorry buddy acpi=noirq didn't quite work either. :-(
Goats

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by Goats »

I have a laptop that has been plagued with shutdown/restart freezes with both LM 18.1 and now 18.2. I found what I am offering below to be a reasonable fix for myself. I installed this specific kernel and gave it a day or 2 and did several shutdowns and reboots each day. It's pretty much smoothed out to normal shutdowns/reboots. Maybe I will catch a freeze up infrequently. If so, I can live with that. I tried several older and newer kernels but did not fair so well with them.

In a terminal:

Code: Select all

cd /tmp/

 wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-image-4.9.0-040900-generic_4.9.0-040900.201612111631_amd64.deb

sudo dpkg -i *.deb

reboot
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Thanks "Goats" - will try this!
jimbolaya
Level 1
Level 1
Posts: 4
Joined: Mon Apr 24, 2017 9:38 pm

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by jimbolaya »

I have this exact same issue, but I have a desktop and I'm running Mint 17:

Code: Select all

System:    Host: bigred Kernel: 4.4.0-75-generic x86_64 (64 bit, gcc: 4.8.4) Desktop: N/A Distro: Linux Mint 17 Qiana
Machine:   Mobo: ASUSTeK model: M5A78L-M/USB3 version: Rev X.0x Bios: American Megatrends version: 2101 date: 12/02/2014
CPU:       Hexa core AMD FX-6300 Six-Core (-MCP-) cache: 12288 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 42188.1 
           Clock Speeds: 1: 1400.00 MHz 2: 1400.00 MHz 3: 3500.00 MHz 4: 1400.00 MHz 5: 2000.00 MHz 6: 1400.00 MHz
Graphics:  Card: NVIDIA Device 128b bus-ID: 01:00.0 
           X.org: 1.15.1 drivers: nvidia (unloaded: fbdev,vesa,nouveau) tty size: 101x47 Advanced Data: N/A for root 
Audio:     Card-1: NVIDIA GK208 HDMI/DP Audio Controller driver: snd_hda_intel bus-ID: 01:00.1
           Card-2: Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA) driver: snd_hda_intel bus-ID: 00:14.2
           Sound: Advanced Linux Sound Architecture ver: k4.4.0-75-generic
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller 
           driver: r8169 ver: 2.3LK-NAPI port: e800 bus-ID: 04:00.0
           IF: eth1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 1000.2GB (34.5% used) 1: id: /dev/sda model: Hitachi_HDS5C105 size: 500.1GB temp: 38C 
           2: id: /dev/sdb model: Hitachi_HDS5C105 size: 500.1GB temp: 37C 
Partition: ID: / size: 455G used: 321G (74%) fs: ext4 ID: swap-1 size: 4.29GB used: 0.00GB (0%) fs: swap 
RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors:   System Temperatures: cpu: 44.0C mobo: 42.0C gpu: 0.0:47C 
           Fan Speeds (in rpm): cpu: 2922 sys-1: 1430 
Info:      Processes: 271 Uptime: 27 min Memory: 1274.3/7966.1MB Runlevel: 2 Gcc sys: 4.8.4 Client: Shell inxi: 1.8.4
I have a few other things to add.

Shutdown works perfectly with 3.13.0-100.
I've looked elsewhere for this and tried a large number of the various boot options (like acpi=noirq) with no difference.
I tried installing the 4.9.0-040900 kernel, but ended up not getting any of my dkms modules installed. They all failed with

Code: Select all

gcc: error: unrecognized command line option ‘-fstack-protector-strong’
I'm guessing I need a newer gcc?
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Hi "jimbolaya",

I'm currently testing "Goats'" kernel suggestion (4.9). Haven't had much chance to sit on laptop this weekend.
I usually go with 'synaptic' for latest releases. Just saw that I have gcc ver 4.5.3.1 and synaptic says that's the latest too. In addition I seem to have gcc-5 (full) and gcc-6 (base only) loaded too and their versions are latest (pertaining to my mint). But I am open to test something else too.

I do not remember if I got any error/warning while installing kernel 4.9.

Nevertheless, I will update y'all with kernel 4.9's performance once I get a chance.
morpheus327

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by morpheus327 »

Goats wrote:I have a laptop that has been plagued with shutdown/restart freezes with both LM 18.1 and now 18.2. I found what I am offering below to be a reasonable fix for myself. I installed this specific kernel and gave it a day or 2 and did several shutdowns and reboots each day. It's pretty much smoothed out to normal shutdowns/reboots. Maybe I will catch a freeze up infrequently. If so, I can live with that. I tried several older and newer kernels but did not fair so well with them.

In a terminal:

Code: Select all

cd /tmp/

 wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-image-4.9.0-040900-generic_4.9.0-040900.201612111631_amd64.deb

sudo dpkg -i *.deb

reboot
Hi "Goats",

This didn't quite work either. The very first shutdown failed. I'm somehow forced to think that the problem may not be in kernel choice. But I may certainly be wrong. :-D
sbroccolo

Re: Extremely slow (rather forever) shutdown on Linux Mint

Post by sbroccolo »

Not sure if this will help, but it may give you more info:

you could save a list of all processes before shutting down as per:

ps -A > processes.txt

before you shutdown.

You could take a look at any errors that might have occurred after shutdown as:

dmesg |tail
Locked

Return to “Installation & Boot”