Skip to content

Commit 2f1772c

Browse files
authored
Add information about NVMe APST (xcp-ng#27)
Add information about NVMe APST, including example of setting kernel boot parameters
1 parent 963b2b5 commit 2f1772c

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

docs/troubleshooting.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -386,4 +386,38 @@ You can also remove the `hwe` kernel and use the `generic` one: this way, the pr
386386

387387
:::tip
388388
Alternatively, in a fresh Ubuntu 18.04 install, you can switch to UEFI and you won't have this issue.
389-
:::
389+
:::
390+
391+
## Disappearing NVMe drives
392+
393+
Some NVMe drives do not handle Automatic Power State Transition (APST) well on certain motherboards or adapters and will disappear from the system when attempting to lower their power state. You may see logs in dmesg that indicate this is happeneing.
394+
395+
```
396+
[65056.815294] nvme nvme0: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0xffff
397+
[65060.797874] nvme 0000:04:00.0: Refused to change power state, currently in D3
398+
[65060.815452] xen: registering gsi 32 triggering 0 polarity 1
399+
[65060.815473] Already setup the GSI :32
400+
[65060.937775] nvme nvme0: Removing after probe failure status: -19
401+
[65060.950019] print_req_error: I/O error, dev nvme1n1, sector 895222784
402+
[65060.950022] print_req_error: I/O error, dev nvme1n1, sector 438385288
403+
[65060.950040] print_req_error: I/O error, dev nvme1n1, sector 223301496
404+
[65060.950072] print_req_error: I/O error, dev nvme1n1, sector 256912800
405+
[65060.950077] print_req_error: I/O error, dev nvme1n1, sector 189604552
406+
[65060.950085] print_req_error: I/O error, dev nvme1n1, sector 390062504
407+
[65060.950087] print_req_error: I/O error, dev nvme1n1, sector 453909496
408+
[65060.950099] print_req_error: I/O error, dev nvme1n1, sector 453915072
409+
[65060.950102] print_req_error: I/O error, dev nvme1n1, sector 246194176
410+
[65060.950107] print_req_error: I/O error, dev nvme1n1, sector 246194288
411+
[65061.030575] nvme nvme0: failed to set APST feature (-19)
412+
```
413+
414+
APST can be disabled by adding `nvme_core.default_ps_max_latency_us=0` to your kernel boot parameters. For example, in xcp-ng 8.1, edit `/boot/grub/grub.cfg` to include a new parameter on the first `module2` line.
415+
416+
```
417+
menuentry 'XCP-ng' {
418+
search --label --set root root-jnugiq
419+
multiboot2 /boot/xen.gz dom0_mem=7584M,max:7584M watchdog ucode=scan dom0_max_vcpus=1-16 crashkernel=256M,below=4G console=vga vga=mode-0x0311
420+
module2 /boot/vmlinuz-4.19-xen root=LABEL=root-jnugiq ro nolvm hpet=disable console=hvc0 console=tty0 quiet vga=785 splash plymouth.ignore-serial-consoles nvme_core.default_ps_max_latency_us=0
421+
module2 /boot/initrd-4.19-xen.img
422+
}
423+
```

0 commit comments

Comments
 (0)