0

Preamble/System Specs

I have posted the main section of this post also to https://github.com/NigelCunningham/tuxonice-kernel/issues/30

I've had issues restoring from hibernation in Ubuntu, starting shortly after I purchased my laptop a couple of years ago...

My system is running the unity DM on xenial (16.04LTS) currently with kernel Linux [namehere] 4.4.0-78-generic-tuxonice #99~ppa1-Ubuntu SMP Thu May 18 20:29:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux. The tuxonice flavor of the kernel was installed and updated from ppa: deb http://ppa.launchpad.net/tuxonice/ppa/ubuntu xenial main. The laptop is Dell Inspiron 14-5447 with i5-4210U CPU, 8GB RAM and a 1TB non-Dell HDD with approximately 55% in linux partitions. Additionally, I use tint2 for a systray that lists all windows of all apps (in addition to the dock, which just shows all apps that are open), in addition to showing battery status above time-til-empty and hh:nn:ss above DDDD yyyy-mm-dd (apologies for using MS notation).

The system is dual-boot (grub2) with windows10, but I rarely use windows, and as a general rule don't have a linux hibernation image on disk when I'm using windows (or windows hibernation image when using linux)

The (Main) Problem

Approximately 50% of the time that I hibernate, I can not restore this disk image on the first try. The process makes it to 100% of the main userspace + kernel copy/restore, but then freezes on one of the next several steps:

  • (Non-backlit blank screen)
  • Doing atomic copy/restore (at 100%)
  • Doing atomic copy/restore (at 0%)
  • (possibly Doing atomic copy/restore at 100% again)

  • Infrequently it makes it to the login screen, but then freezes.

Sometimes when the system locks, the caps lock light flashes steadily. Other times there's no outward indication that it's locked. After shutting down by holding in the power button waiting a few secs and turning it back on, it usually (maybe 75% of the time) is able to restore from hibernate (of course, if I hit the 'c' key to confirm that I want to try to use the image again).

If it locks up on the second try, I'll try up to 8 times to restore..but if it hasn't restored on the 4th try, I don't think I've ever had it restore later, so I'll eventually invalidate the image, my assumption being that some part of the hibernation image was saved improperly. If it locks up on the login screen it sometimes, but not always, has already removed the hibernation image, making it impossible to try to restore again with that image.

If I use the default (non-tuxonice) kernel, I SEEM to have a slightly higher rate of success on the first try, but in the event of failure I'm not provided with the option to try to use the image again. So, I haven't rigorously tested the rates of success with both kernels.

I seem to have issues restoring from image more frequently when I've changed power or display state (plugged in to unplugged or vice versa; external display to unplugged or vv) between when I created the image and restore the image. But the issues don't happen every time that occurs, nor do they exclusively happen when power or display state are changed.

I sometimes use suspend instead of hibernate. About 10% of the time, this locks on the login screen, displaying the time I put it to sleep rather than the current time. When shutting down and rebooting, there is no option to use an image to restore (as expected).

Failure rate for either hibernate or suspend does not seem to be dependent on the method of hibernation/suspend: selection from the power menu on the top menubar, closing laptop w/o both external display+power plugged in, critically low battery, or command-line invocation.

Other system oddities

For completeness sake: there are a couple of oddities on my system. Occasionally (~1%) when powering up (either on warm or cold boot; hibernation or no hibernation) the keyboard does not respond. I have a 100 second wait-for-keypress delay in grub2 so that if the kb doesn't respond, I can shut off the system and try again before prompted about the hibernation image. The keyboard always seems to work on the second try, but that might just be by virtue of the low failure rate. Plugging in an external keyboard during the countdown does not rescue the built-in keyboard nor does the external keyboard work.

Additionally, sometimes my tint2 panel appears on bootup, but usually not. If restoring from a hibernated image, the tint2 panel always appears (as it was always running prior to hibernation). When tint2 is not showing on the GUI, top DOES shows tint2 running, but must be layered under my desktop.

Three times since I've owned this system, the swap partition has "disappeared" and the entry in /etc/fstab or mtab has an invalid or unregistered identifying UUID code.

Final questions/plea for help

So how do I go about to diagnose/fix the hibernation (and suspend?) issue(s)? Is there a way to flush all open filehandles to disk before hibernation, as when hibernation fails, the last few items I saved-to-disk are not fully present in the ext4 fs (within an LVM I believe). The disk/bios use gpt partition tables and efi. My keyboard does not have a sysreq key listed (even as a Fn key option), so I can't use the alt sysreq r e i s u b mnemonic, if that's even advised to begin with.

  • cross-posted to github.com/NigelCunningham/tuxonice-kernel/issues/30 – mpag Jun 6 '17 at 21:57
  • Thanks for the report. The standard approach to diagnosing these sorts of issues is to try to isolate a particular driver or set of drivers that cause the issue, by seeking to do something along the lines of a binary search of stopping services and unloading kernel modules before attempting to hibernate. Given what you say about your display freezing sometimes, I'd start by looking there. Is there any way you can run an alternative driver? Any messages post-reboot related to the display? (You will want to do SysRq-S-U-B to sync and unmount filesystems before rebooting if that's possible). Rega – user697550 Jun 6 '17 at 23:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.