1

I am struggling 1 week with this + read ~100 articles and still can not solve it.

Kubuntu 16.04 on ThinkPad P50 with two NVME disks on raid1 + nvidia M1000M (using nouveau). Because grub can not install on NVME disks in raid (bug when calculation offsets) i am booting from small physical partition of first disk and then using another raid1 encrypted partition for /home and others.

My problem is that suspend is not working. When i try: pm-suspend, or echo mem > /sys/power/state or systemclt suspend

It works (unfortunately not always, but always with /sys/power/state), but when i try to return from suspend i even get GUI, but it hangs. I can switch ALT+CTRL+F1, login and then see raid1 failures and crazy number of interrupts causing LoadAverage to grow to 10+. Further examination of syslog shows that all components returned from suspend state, except the primary disk for which i do have the following errors:

Nov 19 11:08:47 arrakis kernel: [  159.002849] thermal thermal_zone2: failed to read out thermal zone (-5)
Nov 19 11:09:16 arrakis kernel: [  188.023836] nvme nvme0: I/O 135 QID 2 timeout, aborting
Nov 19 11:09:16 arrakis kernel: [  188.024027] nvme nvme0: Abort status: 0x0
Nov 19 11:09:16 arrakis kernel: [  188.055867] nvme nvme1: I/O 66 QID 1 timeout, aborting
Nov 19 11:09:16 arrakis kernel: [  188.057419] nvme nvme1: Abort status: 0x0
Nov 19 11:09:46 arrakis mdadm[978]: Fail event detected on md device /dev/md4, component device /dev/nvme0n1p4
Nov 19 11:09:46 arrakis kernel: [  218.041194] nvme nvme0: I/O 135 QID 2 timeout, reset controller
Nov 19 11:09:46 arrakis kernel: [  218.041564] nvme nvme0: completing aborted command with status: fffffffc
Nov 19 11:09:46 arrakis kernel: [  218.041569] blk_update_request: I/O error, dev nvme0n1, sector 123734032
Nov 19 11:09:46 arrakis kernel: [  218.041594] md: super_written gets error=-5
Nov 19 11:09:46 arrakis kernel: [  218.041599] md/raid1:md4: Disk failure on nvme0n1p4, disabling device.
Nov 19 11:09:46 arrakis kernel: [  218.041599] md/raid1:md4: Operation continuing on 1 devices.
Nov 19 11:09:47 arrakis kernel: [  219.065321] nvme nvme1: I/O 66 QID 1 timeout, reset controller
Nov 19 11:09:47 arrakis kernel: [  219.065864] nvme nvme1: completing aborted command with status: fffffffc
Nov 19 11:09:47 arrakis kernel: [  219.065869] blk_update_request: I/O error, dev nvme1n1, sector 123734032
Nov 19 11:09:47 arrakis kernel: [  219.065894] md: super_written gets error=-5
Nov 19 11:09:47 arrakis kernel: [  219.195902] nvme nvme1: async event result 00010000

Also /cat/proc/mdstat confirms that one disk is removed from raid1 (_U).

Tried kernels: 4.8.2, 4.8, 4.6, default (4.4). Tried kernel options: nomodeset (actually it fails with nouveau), noapic, nolapic (removed, could not boot with that), acpi_osi=Linux (also empty).

And still the same problem. BIOS upgraded to the newest (current version).

Should i assume NVME disks are not yet really well supported in Linux ? Under Apple macosx suspend for nvme disk is working fine but i have only one there - so maybe that is related to mdadm/raid ?

Please help.

Thanks, Michal


As requested i am adding logs.

I have executed pm-suspend at 9:24:41. After that blank screen and only hard reset helps.

pm-suspend.log:

sob, 19 lis 2016, 10:45:11 CET: performing suspend
Initial commandline parameters: 
nie, 20 lis 2016, 09:24:41 CET: Running hooks for suspend.
Running hook /usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend:
/usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/000record-status suspend suspend:
/usr/lib/pm-utils/sleep.d/000record-status suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:
Linux arrakis 4.8.2-040802-generic #201610161339 SMP Sun Oct 16 17:41:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Module                  Size  Used by
ctr                    16384  6
ccm                    20480  3
vmnet                  53248  13
fuse                   98304  3
vmw_vsock_vmci_transport    28672  0
vsock                  36864  1 vmw_vsock_vmci_transport
vmw_vmci               69632  1 vmw_vsock_vmci_transport
nls_utf8               16384  0
vmmon                  86016  0
cifs                  675840  0
dns_resolver           16384  1 cifs
fscache                61440  1 cifs
ipt_MASQUERADE         16384  7
nf_nat_masquerade_ipv4    16384  1 ipt_MASQUERADE
iptable_nat            16384  1
nf_conntrack_ipv4      20480  1
nf_defrag_ipv4         16384  1 nf_conntrack_ipv4
nf_nat_ipv4            16384  1 iptable_nat
nf_nat                 28672  2 nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack          114688  4 nf_conntrack_ipv4,nf_nat_masquerade_ipv4,nf_nat_ipv4,nf_nat
iptable_filter         16384  0
ip_tables              24576  2 iptable_filter,iptable_nat
x_tables               36864  3 ip_tables,iptable_filter,ipt_MASQUERADE
tun                    28672  2
binfmt_misc            20480  1
dm_crypt               24576  1
algif_skcipher         20480  0
af_alg                 16384  1 algif_skcipher
arc4                   16384  2
dm_mod                114688  3 dm_crypt
intel_rapl             20480  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
coretemp               16384  0
kvm_intel             192512  0
kvm                   593920  1 kvm_intel
irqbypass              16384  1 kvm
crct10dif_pclmul       16384  0
iwlmvm                241664  0
crc32_pclmul           16384  0
mac80211              663552  1 iwlmvm
snd_hda_codec_realtek    86016  1
snd_hda_codec_generic    69632  1 snd_hda_codec_realtek
ghash_clmulni_intel    16384  0
uvcvideo               90112  0
videobuf2_vmalloc      16384  1 uvcvideo
videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_v4l2         24576  1 uvcvideo
snd_seq_midi           16384  0
aesni_intel           167936  9
snd_seq_midi_event     16384  1 snd_seq_midi
videobuf2_core         40960  2 uvcvideo,videobuf2_v4l2
snd_rawmidi            32768  1 snd_seq_midi
snd_hda_intel          36864  3
aes_x86_64             20480  1 aesni_intel
lrw                    16384  1 aesni_intel
iwlwifi               147456  1 iwlmvm
gf128mul               16384  1 lrw
snd_hda_codec         135168  3 snd_hda_intel,snd_hda_codec_generic,snd_hda_codec_realtek
glue_helper            16384  1 aesni_intel
ablk_helper            16384  1 aesni_intel
videodev              180224  3 uvcvideo,videobuf2_core,videobuf2_v4l2
cryptd                 24576  4 ablk_helper,ghash_clmulni_intel,aesni_intel
efi_pstore             16384  0
rtsx_pci_ms            20480  0
snd_hda_core           81920  4 snd_hda_intel,snd_hda_codec,snd_hda_codec_generic,snd_hda_codec_realtek
nls_iso8859_1          16384  1
joydev                 20480  0
media                  40960  2 uvcvideo,videodev
thinkpad_acpi          86016  1
intel_cstate           20480  0
intel_rapl_perf        16384  0
serio_raw              16384  0
efivars                20480  1 efi_pstore
nvram                  16384  1 thinkpad_acpi
snd_hwdep              16384  1 snd_hda_codec
memstick               20480  1 rtsx_pci_ms
snd_seq                65536  2 snd_seq_midi_event,snd_seq_midi
cfg80211              589824  3 iwlmvm,iwlwifi,mac80211
snd_pcm               110592  3 snd_hda_intel,snd_hda_codec,snd_hda_core
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              32768  2 snd_seq,snd_pcm
mei_me                 36864  0
rfkill                 24576  6 thinkpad_acpi,cfg80211
snd                    86016  17 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_timer,thinkpad_acpi,snd_rawmidi,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_realtek,snd_pcm
mei                   102400  1 mei_me
shpchp                 36864  0
battery                16384  0
ac                     16384  0
soundcore              16384  1 snd
tpm_crb                16384  0
evdev                  24576  25
parport_pc             28672  0
ppdev                  20480  0
lp                     20480  0
parport                49152  3 lp,parport_pc,ppdev
efivarfs               16384  1
autofs4                40960  2
ext4                  589824  2
crc16                  16384  1 ext4
jbd2                  110592  1 ext4
fscrypto               28672  1 ext4
mbcache                16384  3 ext4
raid10                 49152  0
raid456               110592  0
async_raid6_recov      20480  1 raid456
async_memcpy           16384  2 raid456,async_raid6_recov
async_pq               16384  2 raid456,async_raid6_recov
async_xor              16384  3 async_pq,raid456,async_raid6_recov
async_tx               16384  5 async_xor,async_pq,raid456,async_memcpy,async_raid6_recov
xor                    24576  1 async_xor
raid6_pq              102400  3 async_pq,raid456,async_raid6_recov
libcrc32c              16384  1 raid456
crc32c_generic         16384  0
raid0                  20480  0
multipath              16384  0
linear                 16384  0
hid_generic            16384  0
usbhid                 53248  0
hid                   118784  3 hid_generic,usbhid
raid1                  36864  1
md_mod                131072  7 raid1,raid10,multipath,linear,raid0,raid456
rtsx_pci_sdmmc         24576  0
mmc_core              147456  1 rtsx_pci_sdmmc
nouveau              1544192  6
mxm_wmi                16384  1 nouveau
i2c_algo_bit           16384  1 nouveau
ttm                    98304  1 nouveau
drm_kms_helper        167936  1 nouveau
syscopyarea            16384  1 drm_kms_helper
crc32c_intel           24576  1
e1000e                245760  0
sysfillrect            16384  1 drm_kms_helper
psmouse               131072  0
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
ptp                    20480  1 e1000e
pps_core               16384  1 ptp
drm                   368640  15 nouveau,ttm,drm_kms_helper
nvme                   28672  5
rtsx_pci               57344  2 rtsx_pci_sdmmc,rtsx_pci_ms
ahci                   36864  0
nvme_core              53248  8 nvme
libahci                32768  1 ahci
thermal                20480  0
wmi                    16384  2 mxm_wmi,nouveau
video                  40960  2 thinkpad_acpi,nouveau
fjes                   28672  0
button                 16384  1 nouveau
              total        used        free      shared  buff/cache   available
Mem:       49367596      625024    47741464       17636     1001108    48157740
Swap:       8388604           0     8388604
/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:
/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.

Running hook /etc/pm/sleep.d/10_grub-common suspend suspend:
/etc/pm/sleep.d/10_grub-common suspend suspend: success.

Running hook /etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend:
/etc/pm/sleep.d/10_unattended-upgrades-hibernate suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/40inputattach suspend suspend:
/usr/lib/pm-utils/sleep.d/40inputattach suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend:
/usr/lib/pm-utils/sleep.d/50unload_alx suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend:
Selected interface 'p2p-dev-wlp4s0'
OK
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable.

Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:
/usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.

Running hook /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend:
/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/95anacron suspend suspend:
/usr/lib/pm-utils/sleep.d/95anacron suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend:
/usr/lib/pm-utils/sleep.d/95hdparm-apm suspend suspend: not applicable.

Running hook /usr/lib/pm-utils/sleep.d/95led suspend suspend:
/usr/lib/pm-utils/sleep.d/95led suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
Kernel modesetting video driver detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:
kernel.acpi_video_flags = 0
/usr/lib/pm-utils/sleep.d/99video suspend suspend: success.

Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:
/etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.

nie, 20 lis 2016, 09:24:42 CET: performing suspend

/var/log/syslog:

Nov 20 09:18:22 arrakis systemd[1]: Started CUPS Scheduler.
Nov 20 09:22:47 arrakis wpa_supplicant[1087]: wlp4s0: WPA: Group rekeying completed with 4e:5e:0c:70:fc:24 [GTK=CCMP]
Nov 20 09:24:23 arrakis systemd[1]: Started CUPS Scheduler.
Nov 20 09:24:23 arrakis org.kde.KScreen[1904]: kscreen: Primary output changed from KScreen::Output(Id: 67 , Name: "eDP-1" ) ( "eDP-1" ) to KScreen::Output(Id: 67 , Name: "eDP-1" ) ( "eDP-1" )
Nov 20 09:24:24 arrakis org.kde.KScreen[1904]: message repeated 15 times: [ kscreen: Primary output changed from KScreen::Output(Id: 67 , Name: "eDP-1" ) ( "eDP-1" ) to KScreen::Output(Id: 67 , Name: "eDP-1" ) ( "eDP-1" )]
Nov 20 09:24:41 arrakis systemd[1]: Started Run anacron jobs.
Nov 20 09:24:41 arrakis anacron[4221]: Anacron 2.3 started on 2016-11-20
Nov 20 09:24:41 arrakis anacron[4221]: Normal exit (0 jobs run)
Nov 20 09:24:41 arrakis systemd[1]: Stopped Run anacron jobs.
Nov 20 09:25:26 arrakis rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="915" x-info="http://www.rsyslog.com"] start
Nov 20 09:25:26 arrakis 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 ]

At 9:25:26 we can see already messages after hard reboot - so nothing interesting in syslog. This time i did not have NVME disk log errors, i have it only when suspend using /sys/power/state (and then it's almost successful because i can get back to system/GUI but disks are failed to come back).

Also in X.org logs nothing strange - logs are the same as for subsequent correct reboot.

What could be wrong ? Why pm-suspend is killing my laptop while echo mem > /sys/power/state almost works fine (except disks ?)

Thanks,

4
  • It has nothing to do with the disks. Such problems are often related with graphics drivers. Nvidia recommends the 375 driver version only for your card: nvidia.com/download/driverResults.aspx/111596/en-us
    – user589808
    Nov 19, 2016 at 10:44
  • I have tried 375.20 driver - but is not stable, i have the same problem as with 370 from ppa and official 367 - black screen (nomodeset does not help). Honestly nvidia drivers seems to be very unstable - the last time i had no problems with those on Linux were 4+ years ago :( I've spend so much time trying to install nvidia, tried different manuals - and always the same result: blank screen after booting :( Nov 19, 2016 at 11:40
  • To debug issues occurring during suspension or after wake-up, please edit your question and include the output of sudo dmesg (mostly covered by syslog) and the content of /var/log/pm-suspend.log after a (potentially unsuccessful) suspend/wake-up cycle. Thanks. Nov 19, 2016 at 14:14

1 Answer 1

0

With GRUB

As mentioned in this answer, this is a known bug. Simply edit the file /etc/default/grub and add this argument acpiphp.disable=1 to your grub config variable GRUB_CMDLINE_LINUX_DEFAULT to prevent ACPI hot plugging. However, the op of the answer states that it doesn't necessarily disable the hot plugging.

After saving the file, update your grub bootloader.

$ sudo update-grub

Without GRUB (UEFI only)

If you are not using grub but have a UEFI system you can use efibootmgr to modify your existing boot record. First check your boot records by simply entering:

$ sudo efibootmgr 
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0024,0025,0026,0027,0016,0019
Boot0002* Ubuntu
Boot0016  UEFI OS
Boot0019  TS120GSSD
Boot0025* WDC WDS120G
Boot0026* debian
Boot0027* Force MP600

Now you want to update your Ubuntu boot record with the argument "nvme_core.default_ps_max_latency_us=0". This forces the nvme drive to go to lower power state asap, which helps the machine to go into suspend mode. However, expect some delay in wakeup in some cases.

To make the change, enter the following command:

$ sudo efibootmgr -b 0002 -@ "nvme_core.default_ps_max_latency_us=0"

Then reboot the machine

$ sudo reboot

Now you can suspend the machine without error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .