Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hibernate on a Lenovo IdeaPad Yoga 13: XFCE problem?

25 views
Skip to first unread message

Charles Curley

unread,
Feb 25, 2022, 4:30:06 PM2/25/22
to
The appears to not offer hibernate. Neither hibernate nor hybrid sleep
are available in the logout menu. Calling an XFCE command to hibernate
("xfce4-session-logout --hibernate") does nothing. Suspend is available
and works.

On installation, I selected the default disk layout and got a swap space
of a measly 976M. I speculated that this was not enough (the machine has
3.7Gi of physical RAM), so I added an 8 Gi swap file. That made no
difference. Nor did upgrading to linux-image-5.15.0-0.bpo.3-amd64 make
any difference.

According to this article, "echo disk | sudo tee /sys/power/state", etc.
should work, and it does. This leads me to think that this is an XFCE
problem, not a kernel issue.
https://www.cloudsavvyit.com/9607/how-to-hibernate-or-sleep-linux-from-the-command-line/


root@ideapc:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 119.2G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 118.8G 0 part
└─sda5_crypt 254:0 0 118.7G 0 crypt
├─debian--vg-root 254:1 0 117.8G 0 lvm /
└─debian--vg-swap_1 254:2 0 976M 0 lvm [SWAP]
root@ideapc:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root debian-vg -wi-ao---- <117.79g
swap_1 debian-vg -wi-ao---- 976.00m
root@ideapc:~# free
total used free shared buff/cache available
Mem: 3.7Gi 1.8Gi 513Mi 96Mi 1.4Gi 1.6Gi
Swap: 9.0Gi 0B 9.0Gi
Total: 12Gi 1.8Gi 9.5Gi
root@ideapc:~# uname -a
Linux ideapc 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux
root@ideapc:~#

root@ideapc:~# uname -a
Linux ideapc 5.15.0-0.bpo.3-amd64 #1 SMP Debian 5.15.15-2~bpo11+1 (2022-02-03) x86_64 GNU/Linux
root@ideapc:~#



--
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Alexander V. Makartsev

unread,
Feb 26, 2022, 2:40:06 AM2/26/22
to
On 26.02.2022 02:23, Charles Curley wrote:
> The appears to not offer hibernate. Neither hibernate nor hybrid sleep
> are available in the logout menu. Calling an XFCE command to hibernate
> ("xfce4-session-logout --hibernate") does nothing. Suspend is available
> and works.
>
> On installation, I selected the default disk layout and got a swap space
> of a measly 976M. I speculated that this was not enough (the machine has
> 3.7Gi of physical RAM), so I added an 8 Gi swap file.
Creating a swap file won't do. It has to be a swap partition, big enough
to store memory footprint of a working OS and everything that is
currently running on it.
Additionally check "initramfs" config file:
"/etc/initramfs-tools/conf.d/resume"
It needs to have UUID of a swap partition that will be used for hibernation.
Example config:
    $ cat /etc/initramfs-tools/conf.d/resume
    RESUME=UUID=d0331ef1-bc12-473f-bd4a-b4edf0d4d0a8

    $ sudo blkid | grep swap
    /dev/sdb2: LABEL="swap" UUID="d0331ef1-bc12-473f-bd4a-b4edf0d4d0a8"
TYPE="swap" PARTUUID="88839920-fc62-4f3a-aa7c-e97cd1ed4d5d"

But your case is different, because your swap partition is encrypted.
I've found an article which looks detailed enough, so give it a shot:
https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

--
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

Cindy Sue Causey

unread,
Feb 26, 2022, 8:10:08 AM2/26/22
to
On 2/25/22, Charles Curley <charle...@charlescurley.com> wrote:
> The appears to not offer hibernate. Neither hibernate nor hybrid sleep
> are available in the logout menu. Calling an XFCE command to hibernate
> ("xfce4-session-logout --hibernate") does nothing. Suspend is available
> and works.


Mine's XFCE4 on Bookworm. It has hibernate, but I don't immediately
see any references to hybrid sleep. For mine, hibernate is under:

Applications (desktop menu) > Settings > Power Manager > General (tab)

Power Manager offers Suspend, Hibernate, and Shutdown combinations
that (should allegedly) take effect when Users push the power, sleep,
hibernate, and battery buttons.

Am feeling safe in assuming that "xfce4-power-manager" is the package
that provides those. That's brought in automatically when I manually
install "xfce4" and "xfce4-goodies" during each debootstrap
installation.

Regarding "xfce4-session-logout --hibernate", I haven't tried it
because I've got a large session running right now. BUT it's offered
as an option when viewing "man xfce4-session-logout".

Ooh, and you know, there's "xfce4-session-logout --hybrid-sleep" as an
option, too.

The fact that it's not working for you makes me wonder: Do you have a
screensaver installed? It wasn't too long ago that I mentioned here
that I've encountered ongoing conflicts between screensavers and power
managers.

The poverty level decision was to skip screensavers to help put a dent
in the electric bill. I miss screensavers because they're
entertaining. I also appreciate each individual's creativity that goes
into dreaming them up. Thank you, Developers! :)

Cindy :)
--
Talking Rock, Pickens County, Georgia, USA
* runs with birdseed *

Charles Curley

unread,
Feb 26, 2022, 10:40:05 AM2/26/22
to
Sorry I wasn't clear in the previous email. I have hibernation
working from the terminal, but not from XFCE. It is a warning that XFCE
isn't telling the whole story about hibernation. (It may also be a
caution for the Debian Installer folks.)

Thank you for the research.

On Sat, 26 Feb 2022 12:33:05 +0500
"Alexander V. Makartsev" <avb...@gmail.com> wrote:

> > On installation, I selected the default disk layout and got a swap
> > space of a measly 976M. I speculated that this was not enough (the
> > machine has 3.7Gi of physical RAM), so I added an 8 Gi swap file.
> Creating a swap file won't do. It has to be a swap partition, big
> enough to store memory footprint of a working OS and everything that
> is currently running on it.

The swap area does have to be big enough to accept the memory
footprint. However, my swap area + swap file is working just fine for
hibernation.

> Additionally check "initramfs" config file:
> "/etc/initramfs-tools/conf.d/resume"
> It needs to have UUID of a swap partition that will be used for
> hibernation. Example config:
>     $ cat /etc/initramfs-tools/conf.d/resume
>     RESUME=UUID=d0331ef1-bc12-473f-bd4a-b4edf0d4d0a8

I seem to be working without a UUID.

root@ideapc:~# cat /etc/initramfs-tools/conf.d/resume
RESUME=/dev/mapper/debian--vg-swap_1
root@ideapc:~#



>
>     $ sudo blkid | grep swap
>     /dev/sdb2: LABEL="swap"
> UUID="d0331ef1-bc12-473f-bd4a-b4edf0d4d0a8" TYPE="swap"
> PARTUUID="88839920-fc62-4f3a-aa7c-e97cd1ed4d5d"

root@ideapc:~# blkid | grep swap
/dev/mapper/debian--vg-swap_1: UUID="1fe1b820-f6e7-4b03-a3d6-f76f31a3452a" TYPE="swap"
root@ideapc:~# grep swap /etc/fstab
/dev/mapper/debian--vg-swap_1 none swap sw 0 0
/swapfile1 none swap sw 0 0
root@ideapc:~#



>
> But your case is different, because your swap partition is encrypted.
> I've found an article which looks detailed enough, so give it a shot:
> https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

That article has no date on it. The work was done with Ubuntu 12.04, now
almost ten years old. I suspect that a lot of work has gone into making
things easier for the user. Since I already have hibernation working
(from the terminal but not the GUI), I didn't read the article closely.

Charles Curley

unread,
Feb 26, 2022, 11:10:06 AM2/26/22
to
On Sat, 26 Feb 2022 08:06:49 -0500
Cindy Sue Causey <butterf...@gmail.com> wrote:

> Mine's XFCE4 on Bookworm. It has hibernate, but I don't immediately
> see any references to hybrid sleep.

Sorry, I should have specified. My problems are under Bullseye.

> For mine, hibernate is under:
>
> Applications (desktop menu) > Settings > Power Manager > General (tab)

That's the controls for hibernate, suspend, etc.

To invoke them from XFCE, Applications (desktop menu) -> Log Out. You
should see in the second row Suspend, Hibernate, Hybrid Sleep, and
Switch User. The middle two are missing on my IdeaPad. All four are
present on other computers here, including the Lenovo T520 I am using
right now.

>
> Power Manager offers Suspend, Hibernate, and Shutdown combinations
> that (should allegedly) take effect when Users push the power, sleep,
> hibernate, and battery buttons.

I haven't tried those. I don't use them.

>
> Am feeling safe in assuming that "xfce4-power-manager" is the package
> that provides those. That's brought in automatically when I manually
> install "xfce4" and "xfce4-goodies" during each debootstrap
> installation.

Thanks. That sounds reasonable. I'll keep that in mind if I file a bug
report.

>
> Regarding "xfce4-session-logout --hibernate", I haven't tried it
> because I've got a large session running right now. BUT it's offered
> as an option when viewing "man xfce4-session-logout".
>
> Ooh, and you know, there's "xfce4-session-logout --hybrid-sleep" as an
> option, too.
>
> The fact that it's not working for you makes me wonder: Do you have a
> screensaver installed? It wasn't too long ago that I mentioned here
> that I've encountered ongoing conflicts between screensavers and power
> managers.

Interesting, I will go look at that email thread. I have light-locker
installed, which provides the screen saver. However, light-locker works
with XFCE on several other machines I have.

>
> The poverty level decision was to skip screensavers to help put a dent
> in the electric bill. I miss screensavers because they're
> entertaining. I also appreciate each individual's creativity that goes
> into dreaming them up. Thank you, Developers! :)

I use screen savers not so much to save electricity (although on
laptops that is a consideration) as for security. So I have a script
that calls xflock4 available in my ~/Desktop directory. I can hit that
if I have to put my laptop down in a semi-secure location.
0 new messages