You are not logged in.

#1 2021-09-03 15:38:11

CesarPantoja
Member
Registered: 2019-08-29
Posts: 4

Laptop NVME not detected by Linux?

Hi friends, to make a long story short, I bought a laptop with 1TB NVME disk. I moved my old laptop's dual boot 2TB NVME disk to the new laptop, so now both disks are connected to the new laptop.
The first time I booted, Arch installation could see the 1TB disk, so I started wiping it with something like

 dd if=/dev/zero of=/dev/nvme1n0 status=progress

. I had to restart the laptop because I was doing some other things so I interrupted the process midway and what I most needed was to remove the GPT anyway, so it was ok.

After I finished migrating my old disk to the new laptop (as in, making Windows and Linux work on the new laptop on the same 2TB disk), I wanted to move my Linux partition to the 1TB disk and leave the 2TB for Windows, but now Arch (nor Arch installation) doesn't see the it.

> lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
nvme1n1       259:0    0   1.8T  0 disk  
├─nvme1n1p1   259:1    0   499M  0 part  
├─nvme1n1p2   259:2    0   100M  0 part  /boot
├─nvme1n1p3   259:3    0    16M  0 part  
├─nvme1n1p4   259:4    0   1.4T  0 part  
├─nvme1n1p5   259:5    0   816M  0 part  
├─nvme1n1p6   259:6    0   200M  0 part  
├─nvme1n1p7   259:7    0     8G  0 part  [SWAP]
└─nvme1n1p8   259:8    0 468.7G  0 part  
  └─cryptroot 254:0    0 468.7G  0 crypt /

I see these messages related to NVME in dmesg:

> dmesg
 .........
[    0.719309] nvme nvme0: pci function 0000:02:00.0
[    0.719328] nvme nvme1: pci function 0000:03:00.0
..........
..........
[    0.719557] nvme 0000:02:00.0: can't change power state from D3hot to D0 (config space inaccessible)
[    0.719881] nvme nvme0: Removing after probe failure status: -19
..........
..........
[    0.726243] nvme nvme1: missing or invalid SUBNQN field.
[    0.726252] nvme nvme1: Shutdown timeout set to 8 seconds
.........

And on lscpi I see this about the disk that's not recognised:

> lspci -vvv
........
02:00.0 Non-Volatile memory controller: Solid State Storage Technology Corporation Device 1001 (rev ff) (prog-if ff)
        !!! Unknown header type 7f

03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 (prog-if 02 [NVM Express])
        Subsystem: Samsung Electronics Co Ltd Device a801
        .......
        .......

I have seen online that I could try and change the board SATA mode from RAID to AHCI, but the new laptop's BIOS doesn't even give me that choice. And that doesn't explain why I was able to see it the first time.

And to make matters more confusing, Windows does see the disk and I was able to "mount" and format it as NTFS


What could be the case? What else can I try to fix this issue?

Thanks!

Last edited by CesarPantoja (2021-09-03 15:38:45)

Offline

#2 2021-09-04 12:28:59

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,584

Re: Laptop NVME not detected by Linux?

Which brand and model is the new laptop ?

Please post output of

# fdisk -l 

(run as root)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#3 2021-09-05 21:04:56

CesarPantoja
Member
Registered: 2019-08-29
Posts: 4

Re: Laptop NVME not detected by Linux?

yes sorry, I should have probably pasted the output of fdisk.

sudo fdisk -l
Disk /dev/nvme1n1: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Samsung SSD 970 EVO Plus 2TB            
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B9EF5766-E6FE-4828-A12A-D39DFDF08DFA

Device              Start        End    Sectors   Size Type
/dev/nvme1n1p1       2048    1023999    1021952   499M Windows recovery environment
/dev/nvme1n1p2    1024000    1228799     204800   100M EFI System
/dev/nvme1n1p3    1228800    1261567      32768    16M Microsoft reserved
/dev/nvme1n1p4    1261568 2905145343 2903883776   1.4T Microsoft basic data
/dev/nvme1n1p5 2905145344 2906816511    1671168   816M Windows recovery environment
/dev/nvme1n1p6 2906816512 2907226111     409600   200M Linux extended boot
/dev/nvme1n1p7 2907226112 2924003327   16777216     8G Linux filesystem
/dev/nvme1n1p8 2924003328 3907028991  983025664 468.7G Linux filesystem


Disk /dev/mapper/cryptroot: 468.74 GiB, 503307042816 bytes, 983021568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

new laptop is a Razer Blade 15 with 11th gen Intel processor and a 3080

As you can see, root is encrypted. I also have secure boot enabled but even with secure boot disabled, the disk doesn't show up.

Thanks!

Offline

#4 2021-09-06 08:41:08

Wild Penguin
Member
Registered: 2015-03-19
Posts: 247

Re: Laptop NVME not detected by Linux?

Never seen that problem, but by searching with that error some hits do come up.

I would suspect the device might just be broken ("config space inaccessible" sound a bit worrysome to me!). You could try on another computer if it shows up there. You did do quite a heavy write operation, and it could have just been the last straw if the device was near failure (while there was nothing wrong per se with the write).

Does /dev/nvme0 show up (despite no block devices i.e. /dev/nvme0n* not showing up)? If so, you could try nvme-cli tool to show the SMART log, error log and/or try secure erase. Maybe the drive is confused somehow by the last dd operation...

EDIT: Even if you can recover the drive, I would be careful using that drive and not put any important (documents) on it (which are not backed up somewhere safe) until it is determined what caused the error in the first place.

EDIT: Didn't notice this part:

And to make matters more confusing, Windows does see the disk and I was able to "mount" and format it as NTFS

That is indeed confusing. You could try to erase, firmware upgrade it from windows. Double check it works consistently in windows. Somehow I feel this still points towards an H/W issue. Of course, some laptops have a bunch of proprietary components, and it is possible it just doesn't like Linux...

Last edited by Wild Penguin (2021-09-06 08:49:39)

Offline

#5 2021-09-08 20:11:14

CesarPantoja
Member
Registered: 2019-08-29
Posts: 4

Re: Laptop NVME not detected by Linux?

If it's any use, the 1TB disk is Gen4 nvme. I can't remove the disk because it will void the warranty (the screw has a sticker on top).

Double check it works consistently in windows.

yep, everything is working fine, no errors after checks. Playing games off of it.

Offline

#6 2021-09-09 08:26:40

Wild Penguin
Member
Registered: 2015-03-19
Posts: 247

Re: Laptop NVME not detected by Linux?

CesarPantoja wrote:

If it's any use, the 1TB disk is Gen4 nvme.

You mean PCIe 4.0? Haven't heard of NVME generations before, is that a marketing term (for PCIe 4.0)?

Either way this shouldn't be an issue. I'm starting to veer towards the laptop being designed for Windows and just not being compatible with the Linux Kernel (there's still the mystery, why it worked the first time?). There is little a user can do to add support for NVMe - it should just be supported natively by the Kernel.

Try the nvme-cli tool I pointed above (you didn't reply to the question if /dev/nvme0 exists or not). If nvme-cli can not be used, you could make a secure erase from Windows. Also, if there are firmware upgrades available for either the SSD or the Razer Blade, upgrade them. I wouldn't do those from within Linux (unless the manufacturer specifically supports this, but I strongly doubt it).

This is a longshot, but another piece of information which could be helpful, is the complete output of `lcpci -vvv`. There seems to be many generations of Razer Blade 15 and they may have different chipsets in them. Studying the output (PCIe Bridges etc.) you might be able to find out if this is an issue with a specific version of the Razer Blade, or all of them. Post the output here.

Offline

#7 2021-09-09 15:18:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,447

Re: Laptop NVME not detected by Linux?

Potentially broken power saving? Can you/have you tried: https://wiki.archlinux.org/title/Solid_ … ST_support

Offline

#8 2021-09-17 07:10:51

stanarch
Member
Registered: 2021-09-16
Posts: 1

Re: Laptop NVME not detected by Linux?

I have a very similar setup (Razer Blade mid 2021, 11th gen Intel cpu) and had the same issue with arch installation not seeing the stock NVME.  I was able to resolve the issue by enabling the "Intel VMD technology" option in the chipset tab of the laptop's BIOS, after which, I was able to partition and install Arch on the drive.

Last edited by stanarch (2021-09-17 07:11:42)

Offline

#9 2021-10-04 01:27:19

alf20
Member
Registered: 2019-01-10
Posts: 1

Re: Laptop NVME not detected by Linux?

I also have this problem with the mid-2021 Razer Blade 17 and one of the NVME slots (it has two).
I did some triaging using different distros with different kernel versions and even switched several NVME disks. I get the  ' nvme 0000:02:00.0: can't change power state from D3hot to D0 (config space inaccessible) ' error only on one of the slots, the drive does not matter, only the slot. Every distro shipped with kernel 5.11 and lower are able to detect and use the drive or rather that M.2. slot (and Windows of course). When I use a 5.13 kernel distro like Arch, Manjaro, Solus or even Pop OS 21.10, they can not recognize that M.2. slot.
Changing the BIOS to enable  the "Intel VMD technology" option did not help in my case.
Adding a kernel parameter such as nvme_core.default_ps_max_latency_us=0 or nvme_core.default_ps_max_latency_us=200, did not help
So it seems like a kernel regression. Where can I file this? the kernel bugzilla account is not really active...
Thanks!

Last edited by alf20 (2021-10-04 01:33:53)

Offline

#10 2021-10-05 12:10:40

Wild Penguin
Member
Registered: 2015-03-19
Posts: 247

Re: Laptop NVME not detected by Linux?

The kernel bugzilla seems very active!

However they ask one to use the bug tracking of the distribution you are using (the Kernel of). If you have compiled the Kernel yourself from the vanilla sources (not sources from your distribution packages) then in principle only then you are "allowed" yo use the upstream tracker. So in this case, use one of the distributions trackers you can reproduce this in - it would make most sense to use the one you use the most.

EDIT: TYPOs

Last edited by Wild Penguin (2021-10-06 05:53:37)

Offline

#11 2021-10-30 04:01:12

Alpyne
Member
Registered: 2021-10-30
Posts: 1

Re: Laptop NVME not detected by Linux?

I have been experiencing this issue on my 2021 Razer Blade 15 Advanced (RZ09-0409CEA3), running the latest Arch ISO.

I was able to make the installation medium detect the NVMe SSD by turning on "Intel VMD technology" in BIOS, but after installation, Linux couldn't boot because it couldn't find it again. I thought it was a lost cause until I found this thread (I am using Arch, not Manjaro, but this fix worked the same), where someone suggested adding the "vmd" module. I did this in an arch-chroot from the installation medium, and (with VMD still enabled in the BIOS) was able to boot Linux after that:

linux-aarhus wrote:

edit /etc/mkinitcpio.conf and add vmd to the modules line

MODULES=(... vmd ...)

Then rebuild

sudo mkinitcpio -P

Source: https://forum.manjaro.org/t/razer-2021- … ls/86144/2

Offline

Board footer

Powered by FluxBB