0

hopefully someone in this forum can enlighten me about what is causing my problem.

First off, I use Ubuntu 18.04 LTS with Kernel 4.19.8 (generic I guess?).

I installed pm-utils and uswsusp since sudo systemctl hibernate only causes the laptop screen to flicker and hang. Suspend (meaning closing the lid) works flawlessly though.

Now the problem:

Using ~15GB swap partition (8GB RAM) the first sudo pm-hibernate succeeds, it writes the image and restores the session. When I repeat this after that, it does not seem to write the image again and hangs, forcing me to shut down using the power button. When hibernating and rebooting afterwards, it does not seem to work a second time as well, meaning only when I shut down completely, it works.

I added my UUID in /etc/default/grub at grub_cmdline_linux_default=... resume=... and updated grub sudo update-grub

When trying out as root echo platform > /sys/power/disk and echo disk /sys/power/state everything freezes, similarly to using sudo systemctl hibernate. Similarly for echo shutdown and echo reboot

I tried out clearing the cache, using https://askubuntu.com/a/420152/902558 approach, meaning sync && sudo /sbin/sysctl vm.drop_caches=3which returns vm.drop_caches=3in the terminal. After rebooting and trying out sudo pm-hibernate , everything freezes.

I use a Lenovo Yoga 700 14isk which has a Nvidia GPU as secondary gpu, although I don't have any nouveau drivers etc. installed. Perhaps this information can be useful.

If you need more information, please feel free to ask, although bare in mind that my Ubuntu knowledge is exhausted pretty quickly.

user68186
  • 33,360
  • I'm not sure, but maybe try checking initramfs's resume .conf has the UUID of your swap partition? https://askubuntu.com/questions/1033104/i-cant-make-my-ubuntu-18-04-hibernate-i-tried-use-both-swap-file-and-swap-part – Hee Jin Dec 12 '18 at 19:00
  • Yes it does, it is entirely identical. also I already updated the initramfs as in the link, but I didn't dare to experiment as the initial post in your link (making additions to "/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla") – mxOx2kL Dec 12 '18 at 19:13
  • Welcome to Ask Ubuntu. This is a question-answer site.Please don't put SOLVED in the title and the answer (solution) within the question. Please mark the correct answer with a green check mark on the left margin. This indicates the accepted solution. You can also write your own answer to the question and accept it you solved the problem yourself. – user68186 Jan 05 '19 at 15:07
  • Please ask a new question regarding how to make Nvidia and hibernate work together. Don't ask more than one question inside one question. – user68186 Jan 05 '19 at 15:10
  • Please put a link to this question in the new question. This will help readers understand the context. – user68186 Jan 05 '19 at 15:17

1 Answers1

1

It looks like that an repeated attempt to unload a driver fails. If you can disable the Nvidia GPU in the bios try it. I've had never sucess in resuming a Nvidia Card. There is a very good documentation of the hibernate process here: https://www.kernel.org/doc/Documentation/power/swsusp.txt Since every device behaves differently you may find out, where the problem lies.

kanehekili
  • 6,402
  • I tried disabling the GPU in the BIOS, choosing "Uma only" from "Discrete" and... IT WORKED. IT ACTUALLY WORKED. Thank you so much, you are the first one to recommend it!

    So in the end, the real issue was the bios getting confused on which gpu to use? I'm not sure why this suddenly works.

    Other than that, do you know how I can still make use of my Nvidia GPU (like toggle it?) when using "Uma only" mode?

    As far as I can tell, the usual BIOS would have "Optimus" and "Uma only" as options, but mine had "Discrete" instead.

    – mxOx2kL Jan 05 '19 at 14:57
  • Some laptops allow you to switch between a discrete card and the integrated (Intel) card, that resides on the CPU. The problem of toggling the two cards is, that you'll need two different drivers. In you case (optimus is a combination of intel and nvidia) there is a project called "bumblebee", that may support the dual use of both cards - just take a look here: https://bumblebee-project.org/index.html – kanehekili Jan 08 '19 at 20:00