optimal configuration of M.2 NVMe PCIe SSDs

Getting your soundcard to work, using Debian on non-i386 hardware, etc

optimal configuration of M.2 NVMe PCIe SSDs

Postby Morrison » 2019-11-10 21:39

Dear community,

I would like to have some clarification about how to configure an M.2 PCI Express SSD with Linux using NVM Express (NVMe) as logical device interface. There are various threads at many forums dealing with unrecognized NVMe SSDs at boot using Linux kernels. The main tenor for this situation is just to change the UEFI device configuration from "RAID On" to "AHCI", i.e. switching from the Intel Rapid Storage controller (sometimes called RST) to the Advanced Host Controller Interface (AHCI). From my point of view this is quite ok for older SATA devices (HDDs or SSDs). But current NVMe SSDs would evolve their full performance in "RAID"/RST mode only.

The same applies to Legacy BIOS Mode (BIOS emulation, Compatibility Support Module, CSM). To my knowledge, this also doesn't work/boot with NVMe SSDs.

1. Is this true?

2. How to configure the Linux kernel at boot to access NVMe SSDs?

I want to install debian 10 at a DELL G7 17 (7790) laptop. The installer or live install images run fine but do not recognize the M.2 PCIe NVMe SSD. Windows 10 shipped with the computer runs well. If I change the UEFI device configuration from "RAID" to "AHCI", installer and live system find the NVMe SSD. Then the device is named as /dev/nvme0. But maybe in this configuration the performance is not optimal.

Thank you and best
Morrison
Morrison
 
Posts: 4
Joined: 2018-06-07 19:45

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby sunrat » 2019-11-11 07:27

You need to configure Windows to run under AHCI mode before you change it in UEFI setup. Otherwise Windows won't boot.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby Head_on_a_Stick » 2019-11-11 12:45

Morrison wrote:If I change the UEFI device configuration from "RAID" to "AHCI", installer and live system find the NVMe SSD. Then the device is named as /dev/nvme0. But maybe in this configuration the performance is not optimal.

I have an M.2 NVMe drive and it performs very well indeed when configured as AHCI, I get over 1GiB/second write speeds with dd(1).
Don't break DebianHow to report bugs

SharpBang GNU/Linux® — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10695
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby Morrison » 2019-11-12 16:51

Hey sunrat and Head_on_a_Stick,

thanks for your comments. I already saw the thread on the Windows configuration issue when switching to AHCI and will do so, in case I
have to use the AHCI option. But I don't want to :wink:. The performance argumentation is not based on my own experience. I just found it here
https://en.wikipedia.org/wiki/NVM_Expre ... _with_AHCI

Thank you anyway and best
Morrison
Morrison
 
Posts: 4
Joined: 2018-06-07 19:45

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby sunrat » 2019-11-12 19:55

I'm very interested to hear back from you when you get your NVMe drive working without switching to AHCI. It would be most helpful to many other people who have recently installed NVMe drives.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby p.H » 2019-11-12 21:30

Morrison wrote:in case I have to use the AHCI option. But I don't want to :wink:. The performance argumentation is not based on my own experience. I just found it here
https://en.wikipedia.org/wiki/NVM_Expre ... _with_AHCI

A lot of confusion in this thread. The RAID/AHCI setting in the BIOS only affects the motherboard chipset operation. It won't turn an NVMe SSD into an AHCI SSD. It affects primarily the SATA controller operation (which is not involved with the NVMe SSD operation), but in RAID mode it also seems to "hide" the SSD as an independent PCIe device (compare the output of lspci in each mode).
p.H
 
Posts: 1185
Joined: 2017-09-17 07:12

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby sunrat » 2019-11-12 23:21

p.H wrote:A lot of confusion in this thread. The RAID/AHCI setting in the BIOS only affects the motherboard chipset operation. It won't turn an NVMe SSD into an AHCI SSD. It affects primarily the SATA controller operation (which is not involved with the NVMe SSD operation), but in RAID mode it also seems to "hide" the SSD as an independent PCIe device (compare the output of lspci in each mode).

That's what I understood was implied by that Wikipedia article. Thanks for explaining it more clearly @p.H.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby Morrison » 2019-11-15 21:50

p.H wrote:A lot of confusion in this thread. The RAID/AHCI setting in the BIOS only affects the motherboard chipset operation. It won't turn an NVMe SSD into an AHCI SSD. It affects primarily the SATA controller operation (which is not involved with the NVMe SSD operation), but in RAID mode it also seems to "hide" the SSD as an independent PCIe device (compare the output of lspci in each mode).

Well, I don't understand too much of hardware. I just have read that there are three computer bus interfaces provided through the M.2 connector as in use here (PCI Express, Serial ATA, USB). So I thought switching from RAID to AHCI also switches the computer bus interface from PCIe to SATA. But maybe that's wrong. I got this idea here: https://en.wikipedia.org/wiki/M.2#Storage_interfaces
PCI Express using AHCI
Used for PCI Express SSDs and interfaced through the AHCI driver and provided PCI Express lanes, providing backward compatibility with widespread SATA support in operating systems at the cost of performance.

lspci output of the DELL G7, differences in red
RAID mode (no NVMe visible):
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 07)
00:08.0 System peripheral: Intel Corporation Skylake Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller (rev 10)
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1d.6 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a30d (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2070 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU106 USB 3.1 Host Controller (rev a1)
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU106 USB Type-C Port Policy Controller (rev a1)
02:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:01.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:02.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
04:00.0 System peripheral: Intel Corporation JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] (rev 02)
3a:00.0 USB controller: Intel Corporation JHL6340 Thunderbolt 3 USB 3.1 Controller (C step) [Alpine Ridge 2C 2016] (rev 02)
3b:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 2502 (rev 1f)
3c:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)


AHCI mode (NVMe accessible)
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 07)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 07)
00:08.0 System peripheral: Intel Corporation Skylake Gaussian Mixture Model
00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller (rev 10)
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake Mobile PCH SATA AHCI Controller (rev 10)
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1d.5 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1d.6 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device a30d (rev 10)
00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
01:00.0 VGA compatible controller: NVIDIA Corporation TU106M [GeForce RTX 2070 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU106 USB 3.1 Host Controller (rev a1)
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU106 USB Type-C Port Policy Controller (rev a1)
02:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:00.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:01.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
03:02.0 PCI bridge: Intel Corporation JHL6340 Thunderbolt 3 Bridge (C step) [Alpine Ridge 2C 2016] (rev 02)
04:00.0 System peripheral: Intel Corporation JHL6340 Thunderbolt 3 NHI (C step) [Alpine Ridge 2C 2016] (rev 02)
3a:00.0 USB controller: Intel Corporation JHL6340 Thunderbolt 3 USB 3.1 Controller (C step) [Alpine Ridge 2C 2016] (rev 02)
3b:00.0 Non-Volatile memory controller: Toshiba America Info Systems Device 011a
3c:00.0
Ethernet controller: Realtek Semiconductor Co., Ltd. Device 2502 (rev 1f)
3d:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)

Thanks a lot!
Morrison
Morrison
 
Posts: 4
Joined: 2018-06-07 19:45

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby p.H » 2019-11-16 21:22

Morrison wrote:I just have read that there are three computer bus interfaces provided through the M.2 connector as in use here (PCI Express, Serial ATA, USB). So I thought switching from RAID to AHCI also switches the computer bus interface from PCIe to SATA.

No it doesn't. An M.2 device interface type is fixed by hardware. An NVMe SSD interface cannot be changed to AHCI or SATA.

With lspci you can see that switching to AHCI just switches the SATA controller (00:17.0) to standard AHCI mode and unhides the NVMe SSD (3b:00.0) by enabling its PCI bridge (00:1d.5). I can just suppose that in RAID mode the SSD is "hidden" behind the RAID controller and is accessible only through some proprietary Intel RST interface.
p.H
 
Posts: 1185
Joined: 2017-09-17 07:12

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby Morrison » 2019-11-18 20:23

p.H wrote:No it doesn't. An M.2 device interface type is fixed by hardware. An NVMe SSD interface cannot be changed to AHCI or SATA.

Ok. That's great as it means there is no loss of performance in principle when switching UEFI configuration from "RAID On" to "AHCI".

Thanks for the clarification and participation.
Morrison
Morrison
 
Posts: 4
Joined: 2018-06-07 19:45

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby vmclark » 2019-11-19 15:29

I've just recently struggled with this. Somehow I managed to install Windows 10 + Linux into my previous m.2, but when trying recently I discovered when dual booting, I must use AHCI and Windows must be install using AHCI. If you read Intel's RST FAQ, it states Linux is not supported.
vmclark
 
Posts: 167
Joined: 2008-07-30 15:16

Re: optimal configuration of M.2 NVMe PCIe SSDs

Postby sunrat » 2019-11-19 20:50

vmclark wrote:... I discovered when dual booting, I must use AHCI and Windows must be install using AHCI.


You can reconfigure Windows to use AHCI when it is already installed but you need to do it before you change the setting in BIOS/UEFI setup. Just search for a guide on the internet.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2920
Joined: 2006-08-29 09:12
Location: Melbourne, Australia


Return to Hardware

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable