LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-04-2020, 08:32 AM   #1
Fredlottrup
LQ Newbie
 
Registered: Oct 2020
Posts: 1

Rep: Reputation: Disabled
Can't wake laptop from hibernate mode


Hi all

When my pc is hibernating there seems to be no way for me to wake my pc.
Nothing happens when i press any key or clicks using the touchpad. The only solutions seems to be pressing the power button which boots the pc and nothing of my work have been saved.

I'm running Pop!_os on my Lenovo Yoga Slim 7 AMD Ryzen 7 4700u
 
Old 10-04-2020, 09:24 AM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,627

Rep: Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556

Pressing the power button is the correct method to wake a hibernating computer. This will boot the machine then restore RAM from hard-drive, so it returns to its previous state.

(If you want to wake it up via keyboard/touchpad then you need to use sleep mode and have a constant power supply; a working battery is enough for a matter of hours, but not days.)

If you're instructing the machine to hibernate, but not having it return to previous state, either it's not writing RAM to disk before shutdown, or it's not reading it from disk after startup - I would expect both situations to be logged - try checking log files in "/var/log" and "dmesg" (as root/sudo) to see if there's any clues.

 
Old 10-04-2020, 09:33 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,680
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
A hibernating computer is actually off. Therefore pressing keys has no effect. You can wake up a sleeping computer that way but not a hibernating one. Instead you must switch it on again by using the power button. When you do so, it starts to boot and goes as far as loading the kernel. What is supposed to happen next is that the kernel looks for a resume image on the swap partition. If it finds one, it is supposed to copy the image into memory rather than running init, at which point you can carry on where you left off.

You need to find out why this is not happening. For example, does the kernel boot line in grub contain a resume parameter with the right disk partition (for example "resume=/dev/sda2")? Has your initrd image been made with the right resume parameter? Pop_os is in the Debian family, so there should be a file somewhere in /etc that contains the resume disc name which is used by the mkinitrd script.

Last edited by hazel; 10-04-2020 at 09:35 AM.
 
Old 10-05-2020, 03:38 AM   #4
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,818

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Fredlottrup View Post
Hi all

When my pc is hibernating there seems to be no way for me to wake my pc.
Nothing happens when i press any key or clicks using the touchpad. The only solutions seems to be pressing the power button which boots the pc and nothing of my work have been saved.

I'm running Pop!_os on my Lenovo Yoga Slim 7 AMD Ryzen 7 4700u
There is good/interesting information on resuming-from-disk after hibernating in the file:
Code:
/usr/src/linux/Documentation/power/swsusp-and-swap-files.txt
The gist of this article/file is setting up a swap file for use in hibernate/resume. (Note: you'll need to install the kernel sources package in order to read it.)

Note, though, that the procedure documented in the article would not be something I'd want to deal with on a regular basis. Step two of the process is:
Code:
Use an application that will bmap the swap file with the help of the
FIBMAP ioctl and determine the location of the file's swap header, as the
offset, in <PAGE_SIZE> units, from the beginning of the partition which
holds the swap file.
Oh, yeah... no possibility of getting that wrong.

IMHO, using a swap partition is tons easier. You'll need to make sure that there's a "resume=/dev/sdXn" in the grub configuration and in the kernel boot command line to inform the kernel the disk ("sdX") and partition number ("n") where the swap partition is located. I'd be sure and make any swap partition the same size or larger than your physical RAM. Making it smaller would, I'm sure, result in cases where resume from hibernation wouldn't work. (This is a guess on my part as I always make more swap than my installed RAM.)

HTH...
 
  


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
Can I wake up a server in "standby" or "memory" mode using wake-on-lan? songweijia Linux - Server 2 03-03-2010 06:51 PM
ability to put a server in hibernate during a power flux and then wake remotely j-me Linux - Server 2 01-22-2009 08:37 AM
Nautilus opens after hibernate/wake taylorkh Ubuntu 0 09-14-2008 01:56 PM
bcm5754/tg3 fails to wake-on-lan from hibernate mwk Linux - Hardware 0 03-07-2008 10:56 AM
wake on lan magic packet does not wake. albean Linux - Networking 1 06-30-2007 03:57 PM

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

All times are GMT -5. The time now is 09:02 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