Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

optimal configuration of M.2 NVMe PCIe SSDs

Need help with peripherals or devices?
Post Reply
Message
Author
Morrison
Posts: 4
Joined: 2018-06-07 19:45

optimal configuration of M.2 NVMe PCIe SSDs

#1 Post by Morrison »

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

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: optimal configuration of M.2 NVMe PCIe SSDs

#2 Post by sunrat »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: optimal configuration of M.2 NVMe PCIe SSDs

#3 Post by Head_on_a_Stick »

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).
deadbang

Morrison
Posts: 4
Joined: 2018-06-07 19:45

Re: optimal configuration of M.2 NVMe PCIe SSDs

#4 Post by Morrison »

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

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: optimal configuration of M.2 NVMe PCIe SSDs

#5 Post by sunrat »

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!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: optimal configuration of M.2 NVMe PCIe SSDs

#6 Post by p.H »

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).

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: optimal configuration of M.2 NVMe PCIe SSDs

#7 Post by sunrat »

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!

Morrison
Posts: 4
Joined: 2018-06-07 19:45

Re: optimal configuration of M.2 NVMe PCIe SSDs

#8 Post by Morrison »

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#Stora ... [quote]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.[/quote]
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

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: optimal configuration of M.2 NVMe PCIe SSDs

#9 Post by p.H »

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.

Morrison
Posts: 4
Joined: 2018-06-07 19:45

Re: optimal configuration of M.2 NVMe PCIe SSDs

#10 Post by Morrison »

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

vmclark
Posts: 187
Joined: 2008-07-30 15:16
Has thanked: 1 time

Re: optimal configuration of M.2 NVMe PCIe SSDs

#11 Post by vmclark »

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.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: optimal configuration of M.2 NVMe PCIe SSDs

#12 Post by sunrat »

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!

Post Reply