0

I have Ubuntu 20.04 I want my pc to hibernate/sleep mode . How ever each time I press the suspend butten. My pc gets into sleep mode but when I try to wake him up ,the screen get very dark and then I need to reboot my pc I tried changing the brightness but that did not work.

My pc : TOSHIBA-SATELLITE-C55-C.

other info : pc info pic

those are the things I found ,but none of them fixed my problem :

1)18.04 Screen remains blank after wake up from suspend

2)Kubuntu 20.04 Black Screen After Sleep

3)Blank screen after Sleep/Hibernate on ubuntu 18.04

I tried doing this manuel : How to enable hibernate option in Ubuntu 20.04?

but now after the reboot I cant load the pc ,I get this eror : enter image description here

Lorenz Keel
  • 8,905

1 Answers1

0

I am using hibernation on thinkpads, but it takes some steps before it works:

I do not use swap files. Never worked. So a dedicated swap partition is needed for these instructions. The size of the swap partition must be at least as large as your RAM

  1. After installing copy the uuid entry from fstab. It is represented as xxx below. The commands presume you are su or sudo...
  2. Create file /etc/initramfs-tools/conf.d/resume and add the line Resume=UUID=xxxx
  3. Execute update-initramfs -u
  4. In /etc/default/grub set GRUB_CMDLINE_LINUX="quiet splash resume=UUID=xxxx"
  5. Execute update-grub
  6. Change contents of/var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla:

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:* Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes

Note: The "Disable hibernate" sections can be removed -or not

Reboot, then try: systemctl hibernate

If that works, you can change your settings (e.g. Lid close to hibernation).

Since Ubuntu 18 I am getting an grub error after a sucessful hibernation. This is due to a recordfail. To eliminate this problem I've done the following:

create /etc/systemd/system/use-10_grub_common.servicefile

[Unit]
Description=Execute the /etc/pm/sleep.d/10_grub_common script after hibernation.
After=hibernate.target

[Service] Type=oneshot ExecStart=/etc/pm/sleep.d/10_grub-common thaw

[Install] WantedBy=hibernate.target

Enable that: systemctl enable use-10_grub_common

Disclaimer: Works with Intel GPU, NOT with Nivdia (on my laptops at least)

kanehekili
  • 6,402