Bug 218455 - nvme nvme0: Does your device have a faulty power saving mode enabled?
Summary: nvme nvme0: Does your device have a faulty power saving mode enabled?
Status: NEW
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: NVMe (show other bugs)
Hardware: Intel Linux
: P3 normal
Assignee: IO/NVME Virtual Default Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-03 12:11 UTC by Adam Obuchowski
Modified: 2024-04-17 18:02 UTC (History)
2 users (show)

See Also:
Kernel Version: 6.8.0-0.rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
log (15.40 KB, text/plain)
2024-02-03 12:11 UTC, Adam Obuchowski
Details
smartctl info (2.85 KB, text/plain)
2024-02-03 13:10 UTC, Adam Obuchowski
Details

Description Adam Obuchowski 2024-02-03 12:11:53 UTC
Created attachment 305817 [details]
log

Linux fedora 6.8.0-0.rc0.20240112git70d201a40823.5.fc40.x86_64
Laptop: Chuwi Freebook 2023
System is freezing at random times - no relation whether it's used or idle.
Needs to be rebooted to work again.
Changes on /sys/module/nvme_core/parameters/default_ps_max_latency_us do not bring any result.
Can this be kernel bug or rather hardware failure ?
Comment 1 Adam Obuchowski 2024-02-03 13:10:11 UTC
Created attachment 305818 [details]
smartctl info
Comment 2 Artem S. Tashkinov 2024-02-04 10:04:12 UTC
Have you tried booting with:

nvme_core.default_ps_max_latency_us=0 pcie_aspm=off

?
Comment 3 Adam Obuchowski 2024-02-07 10:40:22 UTC
Yes and validated if the setting is applied, but did not help.
I have also tested this laptop with windows - it doesnt happen on windows.
I understand this may be wrong on hardware that ignores disabled power states, but if Windows can handle it somehow - there should also be workaround to do this with Linux. 
This doesn't happen on debug kernel, but i guess the reason may be that debug kernel creates constant load by saving logs, which prevents the drive from resting. 
The drive in described in Bios as Airdisk, their webiste is only chinese - hard to find any information and Chuwi guys declare support only for Windows.
Comment 4 Keith Busch 2024-02-27 17:35:43 UTC
There probably is a way to make it work in Linux, but if it isn't behaving in a spec compliant manner, then either the maker needs to disclose how it actually works or someone who has the device could reverse engineer what differences are happening between the operating systems and make a fix from there.
Comment 5 Adam Obuchowski 2024-03-04 14:18:50 UTC
I just wonder if this is only nvme issue (on windows it works with generic driver without this experience) or the problem may be located somwhere on how linux deals with file system after (lets say) unexpected nvme restart. In the end, log does not indicate that storage could not be restarted - the final problem is that its getting remounted with read-only mode to secure fs consistency, so maybe solutiion should be not on driver level. Not sure if this is the right place to elaborate such suppositions.
Comment 6 Keith Busch 2024-03-04 16:18:45 UTC
It is common for vendors to WHQL their hardware prior to releasing it, which can change the Windows driver for quirky behavior. Windows also has non-standard ACPI settings that we don't know about in Linux; D3Storage was one such example, but I believe that has been standardized now.

The error message indicates we can't do MMIO. That's at the PCIe Link Layer, well below the filesystem in the software stack.
Comment 7 Adam Obuchowski 2024-04-17 18:02:02 UTC
Surprisingly, issue has got resolved on kernel 6.9 :)

Note You need to log in before you can comment on or make changes to this bug.