You are not logged in.

#1 2021-02-01 05:10:15

Robr3rd
Member
Registered: 2014-10-19
Posts: 12

Unable to use Suspend or Hibernate

Suspend and Hibernate do not appear to work on my laptop (ASUS G750 which is running GNOME (X.org) on Intel+Nvidia hardware with 24GB of MEM and a 12GB swap partition).

I am unsure of what exactly caused it, but I _think_ that it happened around the same time that I upgraded the system's RAM.  It originally had 8GB soldered + 4GB in slot#1 and slot#2 empty.  I eventually removed the 4GB slot#1 stick and installed 2x8GB for a total of 24GB.

I am _fairly certain_ that Suspend/Hibernate continued to work for 1-2 weeks but I couldn't say for sure as system usage was light during that time.  I have since tried removing the upgrade sticks and even tried it with just the 8GB soldered (that way RAM was definitely smaller than swap) but it didn't help.

Of note, this issue is consistent across both Arch Linux and Windows 10--each of which exists on two separate SSDs (Samsung 860 EVO 1TB) with no overlap between the two disks--with Windows 10 being used maybe 15% of the time on this machine for specific games.

I've done what feels like an exhaustive search of resources and tried a number of things, but I really am just completely out of ideas at this point.  I've used https://www.computernetworkingnotes.com … ystem.html as a guide to eliminating GNOME from the equation to issue the Suspend/Hibernate commands directly, but the behavior of "cold boot resume" persisted.

If there's a bright side to any of this so, it's that I've learned a lot about power management states from Intel's docs for its open source power management stuff, although while developing a basic understanding of this has helped me better understand the process, I still have nothing to show for it in the way of a system that actually has a functioning version of all that. wink

Last edited by Robr3rd (2021-02-01 05:10:53)

Offline

#2 2021-02-01 08:01:35

speedyx
Member
From: Italy
Registered: 2008-09-05
Posts: 84

Re: Unable to use Suspend or Hibernate

Arch uses systemd and it is enough to test what is mentioned here .

- Have you added the kernel parameter for the resume partition?
- Do you have at least 24-26 GB swap space?


Twitter: @speedytux The Freedom Technologies Are Available... And Work!
I love archlinux: the last STABLE kernel release + the last STABLE gnome release + the last STABLE apps releases. The upstream developers decide what is STABLE.
Philipe Müller, Manjaro: "Always remember how you started with Linux and what your beginner questions were!"

Offline

#3 2021-02-03 03:39:11

Robr3rd
Member
Registered: 2014-10-19
Posts: 12

Re: Unable to use Suspend or Hibernate

RE: swap space size:
My swap partition is 13GB (for the 12GB my laptop originally came with...8GB soldered+4GB expansion).  This always worked fine.  Having suspected that the problem is that my RAM exceeds my swap space (like you're asking about), I have been testing on 8GB of RAM.  Before I posted this question, I tried to hibernate with 8GB of RAM installed and it still did not fix the issue.

RE: "Have you added the kernel parameter for the resume partition?"
Are you asking about the `/etc/fstab`'s `<type>` column?  If so, then yes. The relevant line is `UUID=<uuid>    none    swap    defaults    0 0`.

Offline

#4 2021-02-03 07:54:38

speedyx
Member
From: Italy
Registered: 2008-09-05
Posts: 84

Re: Unable to use Suspend or Hibernate

Here you can find the documentation of the needed configuration.

I'm usually generous with the ammount of the swap space [ = RAM + 2GB ] and it have worked always perfectly.

Last edited by speedyx (2021-02-03 07:56:24)


Twitter: @speedytux The Freedom Technologies Are Available... And Work!
I love archlinux: the last STABLE kernel release + the last STABLE gnome release + the last STABLE apps releases. The upstream developers decide what is STABLE.
Philipe Müller, Manjaro: "Always remember how you started with Linux and what your beginner questions were!"

Offline

#5 2021-02-06 05:09:45

Robr3rd
Member
Registered: 2014-10-19
Posts: 12

Re: Unable to use Suspend or Hibernate

Thanks for the link.  I did some more reading and testing but it still does not work, so here is some more information.

1. Using a GParted LiveUSB, I moved some partitions around and now have 24GB RAM and 32GB of swap (overkill, I know, but I'm okay with this)

2. Here is the output of `sudo lsblk` (notably, 'swap' is '8:2') and the contents of `/sys/power/resume`:

$ sudo lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOIN
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   512M  0 part /boot
├─sda2   8:2    0    32G  0 part [SWAP]
├─sda3   8:3    0    60G  0 part /
├─sda4   8:4    0    60G  0 part /var
├─sda5   8:5    0   180G  0 part /home
└─sda6   8:6    0   599G  0 part /mnt/Data

$ cat /sys/power/resume
8:2

3. The relevant snippet from `sudo blkid` for the swap partition is as follows (notably, it has `PARTLABEL="swap"`):

/dev/sda2: LABEL="swap" UUID="a32b27ac-fc77-42f2-a9cd-0dd3af0b5a6a" TYPE="swap" PARTLABEL="swap" PARTUUID="9dba343c-f4cd-4a79-8d53-5ee45943b227"

4. I am using GRUB as my bootloader (GPT partition table), and the notable configurations are...:

$ cat /etc/default/grub | grep CMDLINE
GRUB_CMDLINE_LINUX_DEFAULT="resume=PARTLABEL=swap"
GRUB_CMDLINE_LINUX=""

$ cat /boot/grub/grub.cfg | grep resume | head -n1
	linux	/vmlinuz-linux root=UUID=340b9a7e-3b06-47d3-aa30-6d3c2482e380 rw  resume=PARTLABEL=swap

Given the above information (much of which is thanks to your help), I figured I would try a simple `sudo systemctl suspend` but it did not work--resuming the system results in a "cold boot".

Offline

#6 2021-02-06 10:29:32

speedyx
Member
From: Italy
Registered: 2008-09-05
Posts: 84

Re: Unable to use Suspend or Hibernate

Have you already tried with 

 resume=LABEL=swap 

  or

 resume=UUID=... 

?

Would you like to post the /etc/mkinitcpio.conf HOOKS section?

Last edited by speedyx (2021-02-06 10:30:40)


Twitter: @speedytux The Freedom Technologies Are Available... And Work!
I love archlinux: the last STABLE kernel release + the last STABLE gnome release + the last STABLE apps releases. The upstream developers decide what is STABLE.
Philipe Müller, Manjaro: "Always remember how you started with Linux and what your beginner questions were!"

Offline

#7 2021-02-07 04:59:45

Robr3rd
Member
Registered: 2014-10-19
Posts: 12

Re: Unable to use Suspend or Hibernate

Alternate resume settings
I had not tried either of those, no.  I just tried them both now, though, and did not see a difference.

First I set `/etc/default/grub` to `resume=LABEL=swap` (and ran `grub-mkconfig` of course), rebooted (to ensure the new settings were being used), and then tried `systemctl suspend` again.

Then I did the same thing with `resume=UUID=a32b27ac-fc77-42f2-a9cd-0dd3af0b5a6a` (edit grub config -> grub-mkconfig -> reboot -> systemctl suspend).

Neither configuration solved the problem.


mkinitcpio.conf

$ cat /etc/mkinitcpio.conf | grep '^HOOKS='
HOOKS="base udev autodetect modconf block filesystems keyboard fsck"

More specific description of system behavior
I'm not sure if this makes a difference or is helpful, but I do think that you're on the right track with it being specifically a "resume" issue since the system appears to suspend (I can "wake" it by pressing the "space" key on the keyboard rather than needing to press the power button), but when it "wakes" it acts as thought it is performing a cold boot.

Last edited by Robr3rd (2021-02-07 05:03:28)

Offline

#8 2021-02-07 05:43:21

speedyx
Member
From: Italy
Registered: 2008-09-05
Posts: 84

Re: Unable to use Suspend or Hibernate

In mkinitcpio.conf add resume after udev.
Then run

# mkinitcpio -P 

And retry rebooting
Arch Wiki on Mkinitcpio Hooks


Twitter: @speedytux The Freedom Technologies Are Available... And Work!
I love archlinux: the last STABLE kernel release + the last STABLE gnome release + the last STABLE apps releases. The upstream developers decide what is STABLE.
Philipe Müller, Manjaro: "Always remember how you started with Linux and what your beginner questions were!"

Offline

#9 2021-02-14 05:29:22

Robr3rd
Member
Registered: 2014-10-19
Posts: 12

Re: Unable to use Suspend or Hibernate

Thanks for the advice (...and apologies for not getting back to you on this sooner).

I tried your advice but the issue persists.

I now have in my `/etc/mkinitcpio.conf` file the following line: `HOOKS="base udev resume autodetect modconf block filesystems keyboard fsck"`.

After adding `resume`, running `mkinitcpio -P`, and `sudo reboot` I tested this again with `systemctl suspend` but nothing changed.

I'm not sure if this helps any, but below is the output of `mkinitcpio -P`:

==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.10.15-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [resume]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 5.10.15-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [resume]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful

Offline

#10 2021-04-17 03:43:25

Robr3rd
Member
Registered: 2014-10-19
Posts: 12

Re: Unable to use Suspend or Hibernate

Just checking in on this thread if anybody has any other advice...

Offline

#11 2021-04-20 13:14:44

str0gg
Member
Registered: 2012-12-01
Posts: 57
Website

Re: Unable to use Suspend or Hibernate

maybe you should check bios settings then.

Could You past output of

sudo grep resume /boot/grub/grub.cfg

Offline

Board footer

Powered by FluxBB