slow shutdown on Ubuntu 16.04, don't how to diagnose

Asked by jiacheng yuan

Hi
I'm using Ubuntu 16.04 with kernel 4.15 on my recently purchased laptop. The system has been suffering from slow shutdown (more than 2 minutes) but I don't know how to diagnose the problem.

I found some post on this issue and disabled cups by
sudo systemctl disable cups-browsed.service
I worked for only a while but now it's back to previous status.

jc@jc-XPS-15:~$ uname -a
Linux jc-XPS-15 4.15.0-43-generic #46~16.04.1-Ubuntu SMP Fri Dec 7 13:31:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
jc@jc-XPS-15:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

Really appreciate it if someone can tell me how to diagnose this issue and how to solve it. I'm new to ubuntu. Thanks in advance!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu software-center Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Do you use a printer?

Revision history for this message
jiacheng yuan (kracon7) said :
#2

Yes I am. It's a printer on the network.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3
Revision history for this message
jiacheng yuan (kracon7) said :
#4

Actually I already tried the methods metioned in the website you shared. Changing the timeout only make it worse. So I have to restore my system back to the point before I changed the timeout.

Is there any way to see which process is hanging during shutdown?

I think cups service is already disabled

jc@jc-XPS-15:~$ sudo systemctl status cups-browsed
● cups-browsed.service - Make remote CUPS printers available locally
   Loaded: loaded (/lib/systemd/system/cups-browsed.service; disabled; vendor pr
   Active: inactive (dead)

Revision history for this message
jiacheng yuan (kracon7) said :
#5

Okay I found some clue in my /var/log/syslog

This is the log when system hang during reboot. From 23:40:58 to 23:42:36

Jan 30 23:40:58 jc-XPS-15 systemd[1]: Stopping User Manager for UID 108...
Jan 30 23:40:58 jc-XPS-15 systemd[1]: Stopping Authenticate and Authorize Users to Run Privileged Tasks...
Jan 30 23:40:58 jc-XPS-15 systemd[1]: Stopping ACPI event daemon...
Jan 30 23:40:58 jc-XPS-15 systemd[1]: Stopping Save/Restore Sound Card State...
Jan 30 23:40:58 jc-XPS-15 systemd[1178]: Stopped target Default.
Jan 30 23:40:58 jc-XPS-15 systemd[1178]: Reached target Shutdown.
Jan 30 23:40:58 jc-XPS-15 systemd[1]: Stopping Manage, Install and Generate Color Profiles...
Jan 30 23:40:58 jc-XPS-15 systemd[1]: Stopped target Timers.
Jan 30 23:40:58 jc-XPS-15 systemd[1]: Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
Jan 30 23:40:58 jc-XPS-15 systemd[1178]: Starting Exit the Session...
Jan 30 23:40:58 jc-XPS-15 systemd[1178]: Stopped target Basic System.
Jan 30 23:40:58 jc-XPS-15 systemd[1178]: Stopped target Paths.
Jan 30 23:40:58 jc-XPS-15 systemd[1178]: Stopped target Timers.
Jan 30 23:40:58 jc-XPS-15 rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="831" x-info="http://www.rsyslog.com"] exiting on signal 15.
Jan 30 23:42:36 jc-XPS-15 rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="845" x-info="http://www.rsyslog.com"] start
Jan 30 23:42:36 jc-XPS-15 systemd-modules-load[363]: Inserted module 'lp'
Jan 30 23:42:36 jc-XPS-15 systemd-modules-load[363]: Inserted module 'ppdev'
Jan 30 23:42:36 jc-XPS-15 systemd-modules-load[363]: Inserted module 'parport_pc'
Jan 30 23:42:36 jc-XPS-15 systemd[1]: Starting Flush Journal to Persistent Storage...
Jan 30 23:42:36 jc-XPS-15 rsyslogd-2222: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
Jan 30 23:42:36 jc-XPS-15 systemd[1]: Starting udev Kernel Device Manager...
Jan 30 23:42:36 jc-XPS-15 rsyslogd: rsyslogd's groupid changed to 108
Jan 30 23:42:36 jc-XPS-15 rsyslogd: rsyslogd's userid changed to 104
Jan 30 23:42:36 jc-XPS-15 loadkeys[358]: Loading /etc/console-setup/cached.kmap.gz
Jan 30 23:42:36 jc-XPS-15 systemd[1]: Started Set console keymap.
Jan 30 23:42:36 jc-XPS-15 systemd[1]: Reached target Local File Systems (Pre).
Jan 30 23:42:36 jc-XPS-15 systemd[1]: Started Flush Journal to Persistent Storage.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Seems to be syslog slowing things down.

Can you help with this problem?

Provide an answer of your own, or ask jiacheng yuan for more information if necessary.

To post a message you must log in.