Comment 102 for bug 1678184

Revision history for this message
Judy Brock (judy.brock) wrote : RE: [Bug 1678184] Re: APST quirk needed for Samsung 512GB NVMe drive

Hi,

Unfortunately I do not work in this area in Samsung although I have tried in the past to try to find the right contacts (not consistently successful)

Judy.

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Ian Ozsvald
Sent: Tuesday, November 20, 2018 3:39 AM
To: Judy Brock
Subject: [Bug 1678184] Re: APST quirk needed for Samsung 512GB NVMe drive

I'd like to follow-up on this bug - it affects me using kernel 4.19.0 on
a Dell XPS 9550 with a 1TB Samsung drive. Details below. Do I need to
open a new bug as I've got a 1TB drive and this bug report was opened
for a 512GB drive?

$ uname -a
Linux ian-XPS-15-9550 4.19.0-041900-generic #201810221809 SMP Mon Oct 22 22:11:45 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-4.19.0-041900-generic root=/dev/mapper/mint--vg-root ro quiet splash vt.handoff=1

$ sudo nvme list
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 S2FZNYAG801690 PM951 NVMe SAMSUNG 1024GB 1 314.10 GB / 1.02 TB 512 B + 0 B BXV76D0Q

A few weeks back I reformatted my machine due to Dropbox's requirement
to drop encrypted home folders (I went for full-disk encryption). I'm
using Linux Mint 19.0. I used to run kernel 4.9.91, I had to stick to
that in my previous machine's Mint installation as >4.9.91 had boot
issues (e.g. missing firmware for my wifi) and going 4.10+ caused other
issues including, from memory, strange disk issues that I didn't track
down along with occasional GPU+second screen issues. I was keen to
upgrade to 4.10+ but sticking to 4.9.91 gave me a stable machine. I'm
keen to push on now that I'm running on a fresh installation.

Having installed Mint 19.0 and upgraded to 4.19.0 I was happy that everything worked...until left idle for a while when I got similar errors to the ones noted here:
Oct 31 11:33:04 ian-XPS-15-9550 kernel: EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
Oct 31 11:33:04 ian-XPS-15-9550 kernel: EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro
Oct 31 11:33:05 ian-XPS-15-9550 kernel: EXT4-fs (nvme0n1p1): mounted filesystem with ordered data mode. Opts: (null)
Oct 31 15:09:44 ian-XPS-15-9550 kernel: EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
Oct 31 15:09:44 ian-XPS-15-9550 kernel: EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro
Oct 31 15:09:44 ian-XPS-15-9550 kernel: EXT4-fs (nvme0n1p1): mounted filesystem with ordered data mode. Opts: (null)

After this state the machine would be unusable due to a read-only
filesystem.

So far I've only exprerimented with disabling APSTE (using: `sudo nvme
set-feature -f 0x0c -v=0 /dev/nvme0`) - if I do this after every awaken
from suspend then I'm able to use the laptop for over a week without
issues with many suspended sessions. If I forget to disable APSTE after
awakening from suspend then I lose the hard-drive to a read-only state
in 1-2 hours depending on usage.

I'm going to start experimenting with adding the grub boot parameter to
try different values starting with
`nvme_core.default_ps_max_latency_us=250`. I figured opening up this
report and taking guidance on what you'd need and whether I needed a new
bug report would get the ball rolling.

Much obliged! Ian.

Note that the following command was run after I disabled APSTE, I'm not
sure if the results vary before/after settting APSTE, I can re-run it if
that's useful after a fresh boot:

$ sudo nvme id-ctrl /dev/nvme0
NVME Identify Controller:
vid : 0x144d
ssvid : 0x144d
sn : S2FZNYAG801690
mn : PM951 NVMe SAMSUNG 1024GB
fr : BXV76D0Q
rab : 2
ieee : 002538
cmic : 0
mdts : 5
cntlid : 1
ver : 0
rtd3r : 0
rtd3e : 0
oaes : 0
ctratt : 0
oacs : 0x17
acl : 7
aerl : 3
frmw : 0x6
lpa : 0
elpe : 63
npss : 4
avscc : 0x1
apsta : 0x1
wctemp : 0
cctemp : 0
mtfa : 0
hmpre : 0
hmmin : 0
tnvmcap : 0
unvmcap : 0
rpmbs : 0
edstt : 35
dsto : 0
fwug : 0
kas : 0
hctma : 0
mntmt : 0
mxtmt : 0
sanicap : 0
hmminds : 0
hmmaxd : 0
sqes : 0x66
cqes : 0x44
maxcmd : 0
nn : 1
oncs : 0x1f
fuses : 0
fna : 0
vwc : 0x1
awun : 255
awupf : 0
nvscc : 1
acwu : 0
sgls : 0
subnqn :
ioccsz : 0
iorcsz : 0
icdoff : 0
ctrattr : 0
msdbd : 0
ps 0 : mp:6.00W operational enlat:5 exlat:5 rrt:0 rrl:0
          rwt:0 rwl:0 idle_power:- active_power:-
ps 1 : mp:4.20W operational enlat:30 exlat:30 rrt:1 rrl:1
          rwt:1 rwl:1 idle_power:- active_power:-
ps 2 : mp:3.10W operational enlat:100 exlat:100 rrt:2 rrl:2
          rwt:2 rwl:2 idle_power:- active_power:-
ps 3 : mp:0.0700W non-operational enlat:500 exlat:5000 rrt:3 rrl:3
          rwt:3 rwl:3 idle_power:- active_power:-
ps 4 : mp:0.0050W non-operational enlat:2000 exlat:22000 rrt:4 rrl:4
          rwt:4 rwl:4 idle_power:- active_power:-

--
You received this bug notification because you are subscribed to the bug
report.
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_bugs_1678184&d=DwIFaQ&c=JfeWlBa6VbDyTXraMENjy_b_0yKWuqQ4qY-FPhxK4x8w-TfgRBDyeV4hVQQBEgL2&r=YJM_QPk2w1CRIo5NNBXnCXGzNnmIIfG_iTRs6chBf6s&m=ub1ZZPj0DdQfx0PZolkBM8xQEWufc3OZ-agb6oQG_XY&s=BW8XXJ-Edp3F9ynlXRE6-1Mo-WRcylmI2MGJHqT0mtE&e=

Title:
  APST quirk needed for Samsung 512GB NVMe drive

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Yakkety:
  Fix Released
Status in linux source package in Zesty:
  Fix Released

Bug description:
  APST support just landed in the latest Zesty kernel (4.10.0-14.16) as
  part of https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_ubuntu_-2Bsource_linux_-2Bbug_1664602&d=DwIFaQ&c=JfeWlBa6VbDyTXraMENjy_b_0yKWuqQ4qY-FPhxK4x8w-TfgRBDyeV4hVQQBEgL2&r=YJM_QPk2w1CRIo5NNBXnCXGzNnmIIfG_iTRs6chBf6s&m=ub1ZZPj0DdQfx0PZolkBM8xQEWufc3OZ-agb6oQG_XY&s=CJ88q-MQahXdO_zS4m7sa8c2bh5QiinphlJb6Kecd9s&e=.
  That patch has a quirk for certain 256GB Samsung drives found in Dell
  laptops that do not behave well when APST is enabled. I am
  experiencing the same symptoms with the same model laptop except with
  a 512GB Samsung. Prior to manually disabling APST the drive would die
  and system would go down in flames with I/O errors within 20 to 40
  minutes of boot.

  $ sudo nvme list
  Node SN Model Namespace Usage Format FW Rev
  ---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
  /dev/nvme0n1 ************** PM951 NVMe SAMSUNG 512GB 1 500.20 GB / 512.11 GB 512 B + 0 B BXV76D0Q

  ProblemType: Bug
  DistroRelease: Ubuntu 17.04
  Package: linux-image-4.10.0-14-generic 4.10.0-14.16
  ProcVersionSignature: Ubuntu 4.10.0-14.16-generic 4.10.3
  Uname: Linux 4.10.0-14-generic x86_64
  ApportVersion: 2.20.4-0ubuntu2
  Architecture: amd64
  AudioDevicesInUse:
   USER PID ACCESS COMMAND
   /dev/snd/controlC0: ajclayton 3305 F.... pulseaudio
  CurrentDesktop: Unity:Unity7
  Date: Fri Mar 31 09:42:38 2017
  InstallationDate: Installed on 2012-09-08 (1665 days ago)
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
  MachineType: Dell Inc. XPS 15 9550
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.10.0-14-generic root=UUID=779e5929-5ffb-49b1-9786-1adcde824b7d ro rootflags=subvol=@ noprompt nouveau.modeset=0 log_buf_len=20M
  RelatedPackageVersions:
   linux-restricted-modules-4.10.0-14-generic N/A
   linux-backports-modules-4.10.0-14-generic N/A
   linux-firmware 1.164
  SourcePackage: linux
  UpgradeStatus: Upgraded to zesty on 2017-03-07 (23 days ago)
  dmi.bios.date: 04/07/2016
  dmi.bios.vendor: Dell Inc.
  dmi.bios.version: 01.02.00
  dmi.board.name: 0N7TVV
  dmi.board.vendor: Dell Inc.
  dmi.board.version: A00
  dmi.chassis.type: 9
  dmi.chassis.vendor: Dell Inc.
  dmi.modalias: dmi:bvnDellInc.:bvr01.02.00:bd04/07/2016:svnDellInc.:pnXPS159550:pvr:rvnDellInc.:rn0N7TVV:rvrA00:cvnDellInc.:ct9:cvr:
  dmi.product.name: XPS 15 9550
  dmi.sys.vendor: Dell Inc.

To manage notifications about this bug go to:
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.launchpad.net_ubuntu_-2Bsource_linux_-2Bbug_1678184_-2Bsubscriptions&d=DwIFaQ&c=JfeWlBa6VbDyTXraMENjy_b_0yKWuqQ4qY-FPhxK4x8w-TfgRBDyeV4hVQQBEgL2&r=YJM_QPk2w1CRIo5NNBXnCXGzNnmIIfG_iTRs6chBf6s&m=ub1ZZPj0DdQfx0PZolkBM8xQEWufc3OZ-agb6oQG_XY&s=zi2FKM9HSZefkpRMGjYme3RHhFgSq_oKqR7aS5FhwzM&e=