LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 11-11-2023, 05:30 PM   #1
will41
Member
 
Registered: Jul 2020
Posts: 76

Rep: Reputation: Disabled
Laptop Won't Wake From Suspend


I am working with an Lenovo Ideapad C940 Yoga. It has a 512gb ssd, 16gb mem and i7 intel processor. It dual boots with Win 10 and Fedora 38 Cinnamon with standard ext4 partitions including /, /home, /swap.

Following is some information generated by lsblk:

Code:
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
zram0       252:0    0     8G  0 disk [SWAP]
nvme0n1     259:0    0 476.9G  0 disk 
├─nvme0n1p1 259:1    0   260M  0 part 
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0   118G  0 part 
├─nvme0n1p4 259:4    0  1000M  0 part 
├─nvme0n1p5 259:5    0   250M  0 part /boot/efi
├─nvme0n1p6 259:6    0 254.4G  0 part /home
├─nvme0n1p7 259:7    0  93.1G  0 part /
└─nvme0n1p8 259:8    0    10G  0 part [SWAP]
nvme1n1     259:9    0  27.3G  0 disk 
└─nvme1n1p1 259:10   0  27.3G  0 part
Following is information from /sbin/lspci:

Code:
bash-5.2$ /sbin/lspci
00:00.0 Host bridge: Intel Corporation Ice Lake-LP Processor Host Bridge/DRAM Registers (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Iris Plus Graphics G7 (rev 07)
00:04.0 Signal processing controller: Intel Corporation Processor Power and Thermal Controller (rev 03)
00:07.0 PCI bridge: Intel Corporation Ice Lake Thunderbolt 3 PCI Express Root Port #0 (rev 03)
00:07.1 PCI bridge: Intel Corporation Ice Lake Thunderbolt 3 PCI Express Root Port #1 (rev 03)
00:0d.0 USB controller: Intel Corporation Ice Lake Thunderbolt 3 USB Controller (rev 03)
00:0d.2 System peripheral: Intel Corporation Ice Lake Thunderbolt 3 NHI #0 (rev 03)
00:12.0 Serial controller: Intel Corporation Ice Lake-LP Integrated Sensor Solution (rev 30)
00:14.0 USB controller: Intel Corporation Ice Lake-LP USB 3.1 xHCI Host Controller (rev 30)
00:14.2 RAM memory: Intel Corporation Ice Lake-LP DRAM Controller (rev 30)
00:14.3 Network controller: Intel Corporation Ice Lake-LP PCH CNVi WiFi (rev 30)
00:15.0 Serial bus controller: Intel Corporation Ice Lake-LP Serial IO I2C Controller #0 (rev 30)
00:15.1 Serial bus controller: Intel Corporation Ice Lake-LP Serial IO I2C Controller #1 (rev 30)
00:15.2 Serial bus controller: Intel Corporation Ice Lake-LP Serial IO I2C Controller #2 (rev 30)
00:16.0 Communication controller: Intel Corporation Ice Lake-LP Management Engine (rev 30)
00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 30)
00:1d.0 PCI bridge: Intel Corporation Ice Lake-LP PCI Express Root Port #9 (rev 30)
00:1d.2 PCI bridge: Intel Corporation Device 34b2 (rev 30)
00:1f.0 ISA bridge: Intel Corporation Ice Lake-LP LPC Controller (rev 30)
00:1f.3 Multimedia audio controller: Intel Corporation Ice Lake-LP Smart Sound Technology Audio Controller (rev 30)
00:1f.4 SMBus: Intel Corporation Ice Lake-LP SMBus Controller (rev 30)
00:1f.5 Serial bus controller: Intel Corporation Ice Lake-LP SPI Controller (rev 30)
55:00.0 Non-Volatile memory controller: Intel Corporation Optane NVME SSD H10 with Solid State Storage [Teton Glacier] (rev 03)
56:00.0 Non-Volatile memory controller: Intel Corporation Optane NVME SSD H10 with Solid State Storage [Teton Glacier]
bash-5.2$
The Optane NVME has been disabled in the BIOS.

I am trying to correct two seemingly related problems. Under mem_sleep=s2idle, power use during sleep (suspend) is in the range of 6% per hour. Attempting to correct that, I have changed to mem_sleep=deep (see GRUB_CMDLINE entry below):

After inserting the GRUB-CMDLINE statement into /etc/default/grub, I ran:
sudo grub2-mkconfig -o /etc/grub2-efi.cfg
and then re-booted

GRUB currently looks like this:

Code:
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
# GRUB_CMDLINE_LINUX="rhgb quiet"
# GRUB_CMDLINE_LINUX="resume=UUID=47fd7e34-a729-49e2-97f0-a1c8b0acc75f rhgb quiet"
# GRUB_CMDLINE_LINUX="resume=UUID=47fd7e34-a729-49e2-97f0-a1c8b0acc75f"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
mem_sleep now looks like this:

Code:
cat /sys/power/mem_sleep
s2idle [deep]
At this point, I cannot confirm that this solved the problem because now, when I close the lid to suspend or run "systemctl suspend", it appears to suspend but it will not wake up. The only way I’ve found to “wake it” is to hold the start button to re-set the system and then re-boot by clicking it again. Searching for a solution, I found suggestions to add the location of the “swap” partition for saving and recovering data for the suspend operation. As you see I have 3 commented out lines trying different syntax attempts; none of which work.

When installing F38, I understood that a swap partition is required for suspend or hibernate and for 12-16 gb of memory, about 10gb is satisfactory. I’m not sure this is correct, nor am I sure that having a swap partition and zram at the same time is proper.

I have run the command “journal -b” following a lid closure and re-boot. I’ve looked for clues toward the end of the file as to what is going on but there are thousands of lines which mean little to me. I see nothing regarding "suspend" in that timeframe. I can provide a copy of as many lines as might be useful to you but I will need some guidance as to what to look for.

I found on this suggestion on this forum from a year ago:
"Briefly, the issue was caused by problems with ASPM resulting in the system not being able to properly wake up the SSD after suspend. To fix, "pcie_aspm=off" was added to the kernel parameters in order to explicitly disable ASPM."
It does not explain how to do this and I would be going blind and dumb to proceed on my own. So, I would like some advice on this before proceeding.

Any advice would be appreciated.

Last edited by will41; 11-11-2023 at 05:42 PM.
 
Old 11-11-2023, 06:30 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,338

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by will41 View Post
When installing F38, I understood that a swap partition is required for suspend or hibernate and for 12-16 gb of memory, about 10gb is satisfactory. I’m not sure this is correct, nor am I sure that having a swap partition and zram at the same time is proper.
As I understand the documentation on suspend mem_sleep=s2idle does not use any swap space but mem_sleep=deep does. Since you have 16gb of memory and you have 10gb of swap the problem may be lack of swap space. The recommendations for the size of swap space when hibernating run all over the place. I would try the maximum swap space recommendation I found for 16gb memory which is 20gb of swap space.
 
Old 11-11-2023, 09:52 PM   #3
will41
Member
 
Registered: Jul 2020
Posts: 76

Original Poster
Rep: Reputation: Disabled
Certainly worth a try. Does everything else in GRUB loo OK?
 
Old 11-12-2023, 12:53 AM   #4
lvm_
Member
 
Registered: Jul 2020
Posts: 938

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Deep sleep may have to be enabled in BIOS - check your ACPI/power BIOS settings, it is usually called 'Suspend to RAM' or STR there (which makes rather obvious that it doesn't use swap and cannot be affected by swap settings). If your notebook has a sleep LED, does it behave as expected when suspended?

Last edited by lvm_; 11-12-2023 at 02:47 AM.
 
Old 11-12-2023, 10:38 AM   #5
will41
Member
 
Registered: Jul 2020
Posts: 76

Original Poster
Rep: Reputation: Disabled
First. To JailBait, No. Increasing the size of of Swap did not make anything better.
To lvm, I checked the BIOS again to make sure and, no, there is no setting regarding ACP/power, sleep, or hibernation. This is a relatively new (2021) Lenovo and the BIOS is apparently Lenovo's with their label on the BIOS page and is very limited in what settings it offers. It is not the more comprehensive "blue text on grey background" one that I am used to seeing. I have read that there are boot up key combinations that will open the "advanced" BIOS but none of those combinations work for me.
Also, while checking, I noticed that under "storage" settings the "mode" is still at RTS which is a setting used by Optane. I thought when I disabled Optane that I also reset the mode to AHCI. Apparently I didn't and perhaps that has an effect on my current issues? However, If I select it to make the change I get a warning that the disk will be erased which would mean re-installing both Windows and Fedora. I'm, of course, willing to do that if it will result in a fix. Any advice on that?lv
o
Update: lvm, Sorry. I forgot to answer your last question. No. The power indicator light does not flash which is normal during sleep. It stays steady on.

Last edited by will41; 11-12-2023 at 04:58 PM.
 
Old 11-13-2023, 10:38 PM   #6
will41
Member
 
Registered: Jul 2020
Posts: 76

Original Poster
Rep: Reputation: Disabled
I have found some different processes to change RST to ACHI in my BIOS. Does anyone have an opinion as to which is the best:
Quote:
A. Change RST to ACHI in BIOS using the Windows Registry:
Start Registry Editor, and navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\iaStorV\

Here, in the right column, double-click on the Start key, and change its value to 0.

Next, double-click on the iaStorV entry in the left column to expand it, select the StartOverride entry, and then in the right column, change the value of the key 0 to 0.

Repeat this set of changes for the following path in the Registry Editor:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\storahci\

Once this step is complete, reboot and start your computer’s BIOS. Normally, BIOS is accessed by hitting the F2 or Del key during the early boot sequence. In the BIOS menu, change the hard disk controller type to AHCI. The exact terminology and steps required to access and manage controller type in BIOS often depend on the specific implementation by the platform vendor.

Exit BIOS, and let the system boot. Windows should load normally, and you can check the controller mode in the Device Manager. It should read: Standard SATA AHCI Controller.
Quote:
B. Change RST to ACHI in BIOS using Windows Safeboot:

Boot into Windows
Open a shell as administrator
Run bcdedit /set safeboot minimal
Reboot, enter BIOS and switch to AHCI
Reboot into Windows again
Open another shell as administrator
Run bcdedit /deletevalue safeboot
Reboot
Quote:
C. Change RST to ACHI in BIOS using Re-install (I have no source indicating that this will work):
Boot to BIOS without any Windows prep
Change RST to ACHI
Do a complete Windows re-install from Windows Installer USB.

Last edited by will41; 11-13-2023 at 10:44 PM.
 
Old 11-19-2023, 10:57 PM   #7
will41
Member
 
Registered: Jul 2020
Posts: 76

Original Poster
Rep: Reputation: Disabled
It appears that I have found a solution to my suspend issues (actually it wasn't suspending at all but just locking up after turning off the screen). A while back, I installed Fedora 38 Cinnamon spin. After using it a while, I decided to try the Gnome desktop and installed it along with Cinnamon. After wasting a lot of time and questions trying to fix the suspend issue it finally occurred to me that there could be some issues with the combination after trying to do some configurations of Gnome. Anyway, this evening I reinstalled the Cinnamon spin and removed every remnant of Gnome I could find from my dot files. It now seems to be working perfectly; close the lid and it goes right to sleep and open it and it wakes right up. Hooray! And, the little white light on the power button winks very nicely when it is asleep.

I hope this helps someone.
 
  


Reply



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
System won't wake from suspend with keyboard or mouse (power button only) Donny Bahama Linux - Desktop 2 02-15-2023 12:32 PM
Systemctl suspend - Won't Wake llewellen Linux - Laptop and Netbook 7 12-03-2020 12:45 AM
elementary OS on macbook 2008 - won't wake from suspend titanium_geek Linux - Laptop and Netbook 5 10-29-2020 04:50 AM
Linux Mint 13 - Laptop Won't Wake Up from Suspend pcfast Linux - Newbie 5 12-16-2013 09:08 PM
Laptop Suspend: Broken on Wake Up perlhacker14 Debian 0 06-19-2007 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 01:50 AM.

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