Ubuntu Zesty Linux with Samsung PM951 NVMe SSD crashing

0

I have a Dell XPS 9550 with the PM951 Samsung NVMe SSD drive. This worked perfectly fine under Ubuntu Yakkety, but since I upgraded to Ubuntu Zesty it crashes on a regular basis. It seems related to the drive because it only happens when the system is under heavy I/O load.

I can use the system for a very long time if it's just SSH, but if I start compiling it will crash fairly quickly.

As I say, it was rock solid under Yakkety, this has only started happening since I upgraded to Zesty.

Windows 10 used to have the same problem, but I installed the latest Samsung drivers and Windows is stable now.

Any ideas to fix this would be very welcome.

Christopher

Posted 2017-04-30T22:39:05.213

Reputation: 133

I'm seeing the same thing I updated from ubuntu 16.04 to 17.04, before reverting. I think it has to do with kernal 4.8 vs 4.4, but I'm not sure. – Oscar Smith – 2017-05-03T02:10:00.740

Maybe it matters: how do you perform the fstrim? Daily/weekly cron job or mount flag? If you use a mount flag (= meaning constant fstrim) I'd try cron job instead. – Csaba Toth – 2017-06-17T17:09:16.813

BTW, I'd consider AskUbuntu as a forum – Csaba Toth – 2017-06-17T17:10:56.480

Also, how is the crash exactly? If it's not a total black-out, and you see some kernel panic and stuff, provide some dmesg and kernel output. – Csaba Toth – 2017-06-17T17:13:20.323

Answers

4

Kernels up to 4.8.46 seem to work, the problem occurs from 4.8.49 and newer. The 4.10 kernel are affected, too. This is because of the introduction of APST into the nvme driver, which doesn't work properly with the Samsung PM951 SSDs.

The kernel parameter nvme_core.default_ps_max_latency_us=6000 disables the P4 power save state and renders the system stable again.

c3p0

Posted 2017-04-30T22:39:05.213

Reputation: 56

It is because of this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1678184

– c3p0 – 2017-05-05T08:52:33.857

Why is this downvoted? – Csaba Toth – 2017-06-17T17:04:53.967

Following the referenced bug and performing some of the same changes resolves the problem for me. The bug does note that a fix to the latest Yakkety kernel will resolve the problem without the need for the kernel param. – Christopher – 2017-06-27T14:26:48.203