Ubuntu 18.04 Thinkpad X1 Carbon 5th Gen
When I click the shutdown button in the menu bar, Ubuntu occasionally hangs for ~30 seconds before opening the Shutdown/Reboot/Cancel window. I haven't been able to find a culprit and I haven't found another post with this exact problem. I replicated the problem and captured the system log for the period of time that the computer was frozen below. 16:12:09 was before I clicked the shutdown button and it hung until about 12:42. The final line from 12:47 was after I regained control of the computer.
When this happens, I can ctrl+alt+F1, which returns me to the login screen and I can ctrl+alt+F7, but it doesn't open a terminal that I can interact with. I can still move the mouse, but I can't click on anything or type anything.
Any suggestions of how to fix this problem?
Thank you
May 16 16:12:09 kernel: [ 519.281393] [UFW BLOCK] IN=enp0s31f6 OUT= MAC=54:e1:ad:a7:48:05:70:54:d2:7f:14:78:08:00 SRC=128.223.43.197 DST=128.223.43.178 LEN=406 TOS=0x00 PREC=0x00 TTL=128 ID=30847 PROTO=UDP SPT=1900 DPT=52108 LEN=386
May 16 16:12:18 at-spi2-registr[2706]: Failed to send session response Timeout was reached
May 16 16:12:28 kernel: [ 538.725747] [UFW BLOCK] IN=enp0s31f6 OUT= MAC=54:e1:ad:a7:48:05:70:54:d2:7f:14:78:08:00 SRC=128.223.43.197 DST=128.223.43.178 LEN=304 TOS=0x00 PREC=0x00 TTL=128 ID=30854 PROTO=UDP SPT=1900 DPT=52108 LEN=284
May 16 16:12:42 gnome-session-binary[2602]: Entering running state
May 16 16:12:42 gnome-shell[2742]: Ignored exception from dbus method: Gio.IOErrorEnum: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code19: Operation was cancelled
May 16 16:12:42 gnome-shell[2742]: gnome-session gave us a dead inhibitor: /org/gnome/SessionManager/Inhibitor2
May 16 16:12:42 gnome-shell[2742]: gnome-session gave us a dead inhibitor: /org/gnome/SessionManager/Inhibitor3
May 16 16:12:47 kernel: [ 557.813435] [UFW BLOCK] IN=enp0s31f6 OUT= MAC=54:e1:ad:a7:48:05:70:54:d2:7f:14:78:08:00 SRC=128.223.43.197 DST=128.223.43.178 LEN=406 TOS=0x00 PREC=0x00 TTL=128 ID=30863 PROTO=UDP SPT=1900 DPT=52108 LEN=386
Found a solution. The culprit was the Caffeine GNOME Shell extension. Uninstalling that returned the shutdown behavior to normal.