Problem:
Suspend/Resume works exactly once. Attempting to suspend a second time results in the machine hanging.
The monitor powers down to standby as it should, but the system unit fan is still running, and there is disk activity occasionally. The power light is on and steady.
The machine is unresponsive to my usual wakeup signal (space bar on keyboard); the power button does nothing unless I hold for 5 seconds and force the machine off. The machine is not accessible via ssh from another machine. In order to regain usability, I need to do a hard reset, or power off and on; that of course gives me a freshly booted system, which will suspend exactly once, then freeze.
Machine and Diagnostic info:
From uname -a:
Linux machine-a 4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
From lspci:
00:00.0 RAM memory: NVIDIA Corporation MCP55 Memory Controller (rev a1)
00:01.0 ISA bridge: NVIDIA Corporation MCP55 LPC Bridge (rev a2)
00:01.1 SMBus: NVIDIA Corporation MCP55 SMBus Controller (rev a2)
00:01.2 RAM memory: NVIDIA Corporation MCP55 Memory Controller (rev a2)
00:02.0 USB controller: NVIDIA Corporation MCP55 USB Controller (rev a1)
00:02.1 USB controller: NVIDIA Corporation MCP55 USB Controller (rev a2)
00:04.0 IDE interface: NVIDIA Corporation MCP55 IDE (rev a1)
00:05.0 IDE interface: NVIDIA Corporation MCP55 SATA Controller (rev a2)
00:05.1 IDE interface: NVIDIA Corporation MCP55 SATA Controller (rev a2)
00:05.2 IDE interface: NVIDIA Corporation MCP55 SATA Controller (rev a2)
00:06.0 PCI bridge: NVIDIA Corporation MCP55 PCI bridge (rev a2)
00:06.1 Audio device: NVIDIA Corporation MCP55 High Definition Audio (rev a2)
00:08.0 Bridge: NVIDIA Corporation MCP55 Ethernet (rev a2)
00:0a.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
00:0b.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
00:0c.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
00:0d.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
**00:0e.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)**
00:0f.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:07.0 Communication controller: LSI Corporation Lucent V.92 Data/Fax Modem
07:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)
07:00.1 Audio device: NVIDIA Corporation GP108 High Definition Audio Controller (rev a1)
From "lshw -c video":
*-display
description: VGA compatible controller
product: GP108 [GeForce GT 1030]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:07:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: **driver=nvidia** latency=0
resources: irq:25 memory:fb000000-fbffffff memory:d0000000-dfffffff memory:ee000000-efffffff ioport:9c00(size=128) memory:c0000-dffff
I followed the instructions in the Ubuntu wiki here .
and from dmesg output:
[ 1.493699] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
[ 1.493705] ima: Allocated hash algorithm: sha1
[ 1.493728] evm: HMAC attrs: 0x1
[ 1.494027] **Magic number: 0:607:178**
[ 1.494030] hash matches /build/linux-hwe-6Ul5JQ/linux-hwe-4.15.0/drivers/base/power/main.c:1209
[ 1.494098] **acpi device:0e: hash matches**
[ 1.494110] platform: hash matches
[ 1.494166] rtc_cmos 00:02: setting system clock to 2068-04-23 12:10:18 UTC (3102408618)
[ 1.494409] powernow_k8: fid 0x12 (2600 MHz), vid 0x8
[ 1.494410] powernow_k8: fid 0x10 (2400 MHz), vid 0xa
If I interpret the wiki correctly, the "culprit" is the first occurrence of 'hash matches' after the 'Magic number'. So, the device in question is "0e" (?). Which according to the lspci output, is one of several PCI express bridges.
From ls -l /sys/devices/pci0000:00/0000:00:0e.0:
total 0
drwxr-xr-x 3 root root 0 Mar 28 15:15 0000:00:0e.0:pcie008
-rw-r--r-- 1 root root 4096 Mar 28 15:15 broken_parity_status
-r--r--r-- 1 root root 4096 Mar 28 15:15 class
-rw-r--r-- 1 root root 4096 Mar 28 15:15 config
-r--r--r-- 1 root root 4096 Mar 28 15:15 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Mar 28 15:15 current_link_speed
-r--r--r-- 1 root root 4096 Mar 28 15:15 current_link_width
-rw-r--r-- 1 root root 4096 Mar 28 15:15 d3cold_allowed
-r--r--r-- 1 root root 4096 Mar 28 15:15 device
-r--r--r-- 1 root root 4096 Mar 28 15:15 dma_mask_bits
lrwxrwxrwx 1 root root 0 Mar 28 15:15 driver -> ../../../bus/pci/drivers/pcieport
-rw-r--r-- 1 root root 4096 Mar 28 15:15 driver_override
-rw-r--r-- 1 root root 4096 Mar 28 15:15 enable
lrwxrwxrwx 1 root root 0 Mar 28 15:15 firmware_node -> ../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:24
-r--r--r-- 1 root root 4096 Mar 28 15:15 irq
-r--r--r-- 1 root root 4096 Mar 28 15:15 local_cpulist
-r--r--r-- 1 root root 4096 Mar 28 15:15 local_cpus
-r--r--r-- 1 root root 4096 Mar 28 15:15 max_link_speed
-r--r--r-- 1 root root 4096 Mar 28 15:15 max_link_width
-r--r--r-- 1 root root 4096 Mar 28 15:15 modalias
-rw-r--r-- 1 root root 4096 Mar 28 15:15 msi_bus
-rw-r--r-- 1 root root 4096 Mar 28 15:15 numa_node
drwxr-xr-x 3 root root 0 Mar 28 15:15 pci_bus
drwxr-xr-x 2 root root 0 Mar 28 15:15 power
--w--w---- 1 root root 4096 Mar 28 15:15 remove
--w--w---- 1 root root 4096 Mar 28 15:15 rescan
--w------- 1 root root 4096 Mar 28 15:15 reset
-r--r--r-- 1 root root 4096 Mar 28 15:15 resource
-r--r--r-- 1 root root 4096 Mar 28 15:15 revision
-r--r--r-- 1 root root 4096 Mar 28 15:15 secondary_bus_number
-r--r--r-- 1 root root 4096 Mar 28 15:15 subordinate_bus_number
lrwxrwxrwx 1 root root 0 Mar 28 15:15 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Mar 28 15:15 subsystem_device
-r--r--r-- 1 root root 4096 Mar 28 15:15 subsystem_vendor
-rw-r--r-- 1 root root 4096 Mar 28 15:15 uevent
-r--r--r-- 1 root root 4096 Mar 28 15:15 vendor
Question: So, where do I go from here?
The cause is something to do with machine-a itself. I have another machine with very similar configuration - let's call it machine-b - which suspends and resumes with absolutely no problem at all. machine-a, however does not. It doesn't matter which command/method I use (pm-suspend, systemctl suspend, s2ram), the result is the same: works once, then freezes the box. Differences between the two machines:
- machine-a is wired ethernet, machine-b is wireless ethernet
- machine-a has a GT 1030 Nvidia graphics card, machine-b has a GT 730 Nvidia graphics card.
- machine-a is using nvidia driver 415.27 (upgraded from 384.130 in an attempt to solve this issue); machine-b is using 384.
- Both are running the same kernel and 16.04 LTS
Can someone suggest how to proceed with solving this? I'm stumped.
P.S. One additonal oddity... this is a syslog snippet from one of the freeze-y suspends. It seems to show the system supending and resuming simultaneously (??). See index 134.641788 and 134.641873, which occur in the same timestamp second:
Mar 26 11:40:16 machine-a kernel: [ 134.191571] Freezing user space processes ... (elapsed 0.012 seconds) done.
Mar 26 11:40:16 machine-a kernel: [ 134.204236] OOM killer disabled.
Mar 26 11:40:16 machine-a kernel: [ 134.204237] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Mar 26 11:40:16 machine-a kernel: [ 134.205834] Suspending console(s) (use no_console_suspend to debug)
Mar 26 11:40:16 machine-a kernel: [ 134.227518] au0828: Suspend
Mar 26 11:40:16 machine-a kernel: [ 134.227520] au0828: stopping V4L2
Mar 26 11:40:16 machine-a kernel: [ 134.228520] parport_pc 00:04: disabled
Mar 26 11:40:16 machine-a kernel: [ 134.228983] serial 00:03: disabled
Mar 26 11:40:16 machine-a kernel: [ 134.250210] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Mar 26 11:40:16 machine-a kernel: [ 134.250295] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
Mar 26 11:40:16 machine-a kernel: [ 134.250392] sd 0:0:0:0: [sda] Stopping disk
Mar 26 11:40:16 machine-a kernel: [ 134.250471] sd 1:0:0:0: [sdb] Stopping disk
Mar 26 11:40:16 machine-a kernel: [ 134.252727] au0828: au0828_dvb_suspend(): Suspending DVB fe 0
Mar 26 11:40:16 machine-a kernel: [ 134.520351] ACPI: Preparing to enter system sleep state S3
Mar 26 11:40:16 machine-a kernel: [ 134.627675] PM: Saving platform NVS memory
Mar 26 11:40:16 machine-a kernel: [ 134.627730] Disabling non-boot CPUs ...
Mar 26 11:40:16 machine-a kernel: [ 134.640737] IRQ 21: no longer affine to CPU1
Mar 26 11:40:16 machine-a kernel: [ 134.640749] IRQ 22: no longer affine to CPU1
Mar 26 11:40:16 machine-a kernel: [ 134.640759] IRQ 23: no longer affine to CPU1
Mar 26 11:40:16 machine-a kernel: [ 134.640766] IRQ 25: no longer affine to CPU1
**Mar 26 11:40:16 machine-a kernel: [ 134.641788] smpboot: CPU 1 is now offline
Mar 26 11:40:16 machine-a kernel: [ 134.641873] ACPI: Low-level resume complete**
Mar 26 11:40:16 machine-a kernel: [ 134.641873] PM: Restoring platform NVS memory
Mar 26 11:40:16 machine-a kernel: [ 134.641873] PCI-DMA: Resuming GART IOMMU
Mar 26 11:40:16 machine-a kernel: [ 134.641873] PCI-DMA: Restoring GART aperture settings
Mar 26 11:40:16 machine-a kernel: [ 134.641873] Enabling non-boot CPUs ...
Mar 26 11:40:16 machine-a kernel: [ 134.641873] x86: Booting SMP configuration:
Mar 26 11:40:16 machine-a kernel: [ 134.641873] smpboot: Booting Node 0 Processor 1 APIC 0x1
Mar 26 11:40:16 machine-a kernel: [ 134.642916] cache: parent cpu1 should not be sleeping
Mar 26 11:40:16 machine-a kernel: [ 134.643519] CPU1 is up
Mar 26 11:40:16 machine-a kernel: [ 134.643957] ACPI: Waking up from system sleep state S3
Mar 26 11:40:16 machine-a kernel: [ 134.644738] pcieport 0000:00:0a.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [ 134.644738] pcieport 0000:00:0b.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [ 134.644738] pcieport 0000:00:0c.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [ 134.644738] pcieport 0000:00:0d.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [ 134.644738] pcieport 0000:00:0e.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [ 134.644738] pcieport 0000:00:0f.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [ 134.660321] snd_hda_intel 0000:00:06.1: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [ 134.660385] forcedeth 0000:00:08.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [ 134.660514] sata_nv 0000:00:05.2: Enabling HT MSI Mapping
sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt update
if not already done.