LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-30-2023, 04:47 AM   #1
FlyingPotato_131
LQ Newbie
 
Registered: Mar 2023
Posts: 5

Rep: Reputation: 0
disk enters read-only state after resuming from suspend on Huawei RLEF-X laptop


I have installed pop_os on a laptop I sometimes use, but I found many things break upon returning from sleep. I've done some digging and found this in the systemd journal while in the broken state

Code:
Mar 30 12:42:13 pop-os systemd-sleep[5012]: System returned from sleep state.
Mar 30 12:42:13 pop-os kernel: PM: suspend exit
Mar 30 12:42:13 pop-os kernel: EXT4-fs error (device nvme0n1p3): __ext4_find_entry:1663: inode #3690611: comm hdparm: reading directory lblock 0
Mar 30 12:42:13 pop-os kernel: Buffer I/O error on dev nvme0n1p3, logical block 0, lost sync page write
Mar 30 12:42:13 pop-os kernel: EXT4-fs (nvme0n1p3): I/O error while writing superblock
Mar 30 12:42:13 pop-os systemd-sleep[5123]: /usr/lib/systemd/system-sleep/hdparm: 5: /usr/lib/pm-utils/power.d/95hdparm-apm: Input/output error
Mar 30 12:42:13 pop-os [5120]: /usr/lib/systemd/system-sleep/pop-default-settings_bluetooth-suspend failed with exit status 126.
Mar 30 12:42:13 pop-os [5120]: /usr/lib/systemd/system-sleep/hdparm failed with exit status 126.
Mar 30 12:42:13 pop-os systemd[1]: systemd-suspend.service: Deactivated successfully.
Mar 30 12:42:13 pop-os systemd[1]: Finished System Suspend.
Mar 30 12:42:13 pop-os systemd[1]: Stopped target Sleep.
Mar 30 12:42:13 pop-os systemd[1]: Reached target Suspend.
Mar 30 12:42:13 pop-os systemd-logind[763]: Operation 'sleep' finished.
Mar 30 12:42:13 pop-os systemd[1]: Stopped target Suspend.
Mar 30 12:42:13 pop-os ModemManager[808]: <info>  [sleep-monitor-systemd] system is resuming
for some reason the disk seems to be in a readonly state after waking up. I have tested it on a liveusb endeavouros and have the same problem. What may be causing this issue?

here's the output of inxi

Code:
CPU: 12-core (4-mt/8-st) 12th Gen Intel Core i5-12500H (-MST AMCP-)
speed/min/max: 3043/400/4500:3300 MHz Kernel: 6.2.0-76060200-generic x86_64
Up: 5m Mem: 3194.8/15721.9 MiB (20.3%) Storage: 476.94 GiB (14.1% used)
 
Old 03-31-2023, 03:48 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,329

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
What is the output of:
Code:
sudo lspci -vv -s $(lspci |awk '/NVMe/ {print $1}')
 
Old 03-31-2023, 04:04 PM   #3
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: KDE Neon
Posts: 1,272

Rep: Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525Reputation: 525
I had a similar issue on my Chromebook running Linux from SD card. It was sporadic when resuming from sleep, but from what I could determine it was a power issue with the SD card not getting powered up fast enough as the system resumed from memory.
Some links for reading:
https://www.kernel.org/doc/html/v5.4...m/devices.html
https://01.org/blogs/2018/improving-...me-performance
https://www.linuxtechmore.com/2022/0...-on-linux.html

The last link has a possible fix, others are just informative.
 
Old 04-01-2023, 11:12 AM   #4
FlyingPotato_131
LQ Newbie
 
Registered: Mar 2023
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by smallpond View Post
What is the output of:
Code:
sudo lspci -vv -s $(lspci |awk '/NVMe/ {print $1}')

for some reason $(lspci |awk '/NVMe/ {print $1}') returns nothing (i.e. the output is empty)
 
Old 04-01-2023, 02:03 PM   #5
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Why not try simply
Code:
 lspci | grep -i nvme
and see what it returns.

Once you know the actual name then put it into the previous command as the system sees it.

To test the output of
Code:
lspci |awk '/NVMe/ {print $1}'
you would need to use only that or
Code:
echo $(lspci |awk '/NVMe/ {print $1}')
. That part only gives the device to be selected from the output of "lspci -vv -s"

Last edited by computersavvy; 04-01-2023 at 02:51 PM.
 
Old 04-02-2023, 03:16 PM   #6
FlyingPotato_131
LQ Newbie
 
Registered: Mar 2023
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by computersavvy View Post
Why not try simply
Code:
 lspci | grep -i nvme
and see what it returns.

Once you know the actual name then put it into the previous command as the system sees it.

To test the output of
Code:
lspci |awk '/NVMe/ {print $1}'
you would need to use only that or
Code:
echo $(lspci |awk '/NVMe/ {print $1}')
. That part only gives the device to be selected from the output of "lspci -vv -s"
as I expected, lspci | grep -i nvme shows nothing, i.e. the drive doesn't appear as a pci device (it does appear as a block device though)
 
Old 04-06-2023, 07:31 AM   #7
FlyingPotato_131
LQ Newbie
 
Registered: Mar 2023
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by uteck View Post
I had a similar issue on my Chromebook running Linux from SD card. It was sporadic when resuming from sleep, but from what I could determine it was a power issue with the SD card not getting powered up fast enough as the system resumed from memory.
Some links for reading:
https://www.kernel.org/doc/html/v5.4...m/devices.html
https://01.org/blogs/2018/improving-...me-performance
https://www.linuxtechmore.com/2022/0...-on-linux.html

The last link has a possible fix, others are just informative.
I have tried setting iommu=soft but it has not worked, in fact the system stopped loading at all
 
Old 07-12-2023, 05:53 PM   #8
toliak
LQ Newbie
 
Registered: Jul 2023
Posts: 1

Rep: Reputation: 0
Hello.

I have ran into the same problem on RLEF-X laptop.

Briefly:
The kernel puts the disk into D3Cold state when it goes to suspend.
On wake up, kernel returns back the disk from the D3Cold state into D0 and fails.

Highly likely, that the NVMe disk does not support D3Cold.
For example, there is a reddit post (about IdeaPad laptop with the same issue) where the one replaced NVMe by another one and suspend began to work correctly.

I have made a "research" over that issue and found, that the only way is to modify kernel sources and recompile the kernel.
Full research located at https://gist.github.com/Toliak/86340...4337ba6d8e971b.

Last edited by toliak; 07-12-2023 at 05:55 PM.
 
Old 12-04-2023, 11:49 PM   #9
FlyingPotato_131
LQ Newbie
 
Registered: Mar 2023
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by toliak View Post
Hello.

I have ran into the same problem on RLEF-X laptop.

Briefly:
The kernel puts the disk into D3Cold state when it goes to suspend.
On wake up, kernel returns back the disk from the D3Cold state into D0 and fails.

Highly likely, that the NVMe disk does not support D3Cold.
For example, there is a reddit post (about IdeaPad laptop with the same issue) where the one replaced NVMe by another one and suspend began to work correctly.

I have made a "research" over that issue and found, that the only way is to modify kernel sources and recompile the kernel.
Full research located at https://gist.github.com/Toliak/86340...4337ba6d8e971b.
yoooooo I shall try this to see if it works
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen flashes and turns blank after resuming from blank state. Possibly a kernel bug. Fedora 35 with 5.14 kernel noname01 Linux - Newbie 3 11-21-2021 07:45 PM
[SOLVED] Screen remains off after resuming from suspend to ram after upgrading kernel. Arcosanti Slackware 6 11-12-2015 01:50 PM
Problem resuming from suspend to disk with multiple swap partitions guanx Slackware 2 10-02-2013 08:57 AM
Wireless stops working after resuming from suspend to disk/ram piratesmack Slackware 9 12-25-2009 10:16 PM
monitor does not turn on after resuming from suspend nappaji Puppy 2 08-24-2006 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration