Failed to resume from sleep mode

Failed to resume from sleep mode below error
Not always but sometime
When resume hanged, Error message was shown and freezed

Jan 19 22:29:24 localhost kernel: pciehp 0000:00:1c.0:pcie004: link training error: status 0x1001
Jan 19 22:29:24 localhost kernel: pciehp 0000:00:1c.0:pcie004: Failed to check link status

https://pbs.twimg.com/media/DFZWqgEXYAAuhb-.jpg

gpu is GT 1030 fanless

# uname -a
Linux localhost 4.11.9-1-ARCH #1 SMP PREEMPT Wed Jul 5 18:23:08 CEST 2017 x86_64 GNU/Linux

# pacman -Q | grep nvidia
lib32-nvidia-cg-toolkit 3.1-5
lib32-nvidia-utils 381.22-1
nvidia 381.22-4
nvidia-cg-toolkit 3.1-4
nvidia-settings 381.22-2
nvidia-utils 381.22-1

Does using pcie_port_pm=off as kernel parameter help?

I tried it but nothing changed

Ok. Please run nvidia-bug-report.sh and attach output file to your post so we know what kind of device is at pci:0000:00:1c
Not necessarily the Nvidia GPU.

Come to think of it, it is unlikely that the Nvidia GPU is hung up at pci:0000:00:1c.0, this should be some chipset pcie root port. There’s probably an ethernet port or the like that’s claiming to support hotplug while it really doesn’t (reliably).
Workaround: disable hotplug for it (as root)

echo 0000:00:1c.0:pcie04 > /sys/bus/pci_express/drivers/pciehp/unbind

Has to be done after every boot, of course.
What kind of device there is you can check with
lspci -t
to get the tree of pci devices and
lspci -nn
to get the port to device mapping.

Thank you for reply

I uploaded nvidia-bug-report.log.gz
http://www.pastefile.com/CExtA

Actually resume hangup has happened after I installed geforce card into pcie slot.
So, I doubt geforce make somewhat problem

Here is lspci result

# lspci -t
-[0000:00]-+-00.0
           +-01.0-[01]--+-00.0
           |            \-00.1
           +-14.0
           +-16.0
           +-1a.0
           +-1b.0
           +-1c.0-[02]--
           +-1c.3-[03]----00.0
           +-1c.5-[04-05]----00.0-[05]--
           +-1d.0
           +-1f.0
           +-1f.2
           \-1f.3
# 
# lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 05)
00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 05)
00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 05)
00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 [8086:8c10] (rev d5)
00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 [8086:8c16] (rev d5)
00:1c.5 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 [8086:8c1a] (rev d5)
00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 05)
00:1f.0 ISA bridge [0601]: Intel Corporation C220 Series Chipset Family H81 Express LPC Controller [8086:8c5c] (rev 05)
00:1f.2 SATA controller [0106]: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [8086:8c02] (rev 05)
00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 05)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP108 [10de:1d01] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:0fb8] (rev a1)
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
04:00.0 PCI bridge [0604]: Integrated Technology Express, Inc. IT8893E PCIe to PCI Bridge [1283:8893] (rev 41)
#

0000:00:1c.0 is just an empty slot. While this might be triggered by inserting the GPU card it looks more like buggy firmware/bios. Link training fails because there’s nothing to train.
Leaves you with the workaround, did you try it? If it works, you could make this permanent by making a systemd unit file starting it as one-shot service on boot.

I tried it, but error returns
Is this what you expected?

# echo 0000:00:1c.0:pcie04 > /sys/bus/pci_express/drivers/pciehp/unbind
bash: echo: write error: No such device

# ls -l
total 0
lrwxrwxrwx 1 root root    0 Jul 27 02:24 0000:00:1c.0:pcie004 -> ../../../../devices/pci0000:00/0000:00:1c.0/0000:00:1c.0:pcie004
--w------- 1 root root 4096 Jul 27 02:24 bind
--w------- 1 root root 4096 Jul 26 23:58 uevent
--w------- 1 root root 4096 Jul 27 02:23 unbind
#

No, failed to unbind, can have many reasons. Then your only exit that I know is to compile your own kernel and disable pcie hotplug.