![]() I therefore made a sort of script to unload the buggy modules and immediately reinsert them on resume: # remove buggy modules Hibernation works if I unload those modules in addition to brcmfmac, but the system quickly becomes unusable without those modules. ![]() Where /dev/mmcblk1p2 is my root partition (yours is more likely to be something like /dev/sda2).ĭuring resume I saw the image loading successfully, but in my case (just an example - YMMVAPD) then some more drivers ( i2c_designware) threw some errors and I got a complete system freeze on resume. This will be the root partition (or whatever partition your swap file is located on) My parameters are now: GRUB_CMDLINE_LINUX_DEFAULT="no_console_suspend initcall_debug resume=/dev/mmcblk1p2 resume_offset=34816" You still need to set a boot parameter for the partition to resume from. Therefore, the additional boot parameter in my case is resume_offset=34816. This required an additional boot parameter, resume_offset=n where n is the first number under physical_offset in the output of sudo filefrag -v /swapfile: $ sudo filefrag -v /swapfileįile size of /swapfile is 1425873920 (348114 blocks of 4096 bytes)Įxt: logical_offset: physical_offset: length: expected: flags: Once again with help from the Arch wiki page and some additional tinkering, I managed to get hibernation to work on 17.04 with a swap file. Update: Hibernation using a swap file on 17.04. I also have to blacklist the btsdio module which seems to be incompatible with brcmfmac On resume I reinsert the module sudo modprobe brcmfmacĪnd everything worked perfectly. Sure enough I adjusted my hibernation procedure to unload the module first: sudo modprobe -r brcmfmac Watching the system very slowly shut down and reading all the debug messages, I noticed that there were a lot of problems with "brcm", so I guessed my Broadcom wireless driver module was to blame. In my case, after resume I lost WiFi, and the kernel clearly was upset as most commands (for example reading anything from /sys, reloading modules or any systemctl command) would not work - the process would appear to start and just hang (all this would be returned to normal after reboot of course). Which helped me see what was going wrong on resume from hibernation. I set this: GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/mmcblk0p3 no_console_suspend initcall_debug" Remove quiet and splash and add initcall_debug and no_console_suspend which will cause init system calls to be printed to the console so you can watch what is going wrong. Set some more boot parameters to capture more information. I include my case below as an example, but detailed information on debugging S states can be found in this blog and also this one. If you still have problems, start debugging. To resume, press the power button and the system will boot. Then you can try to hibernate, by issuing the command: sudo systemctl hibernate Using my example: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/mmcblk0p3"Īny time you change this file, you must run sudo update-grub or the changes will have no effect. To the line starting GRUB_CMDLINE_LINUX_DEFAULT add resume=/dev/YourSwapPartition to the section in quotes (replace with the the partition you identified earlier). ![]() Where /dev/mmcblk0p3 is the partition to specifyĪdd a boot parameter: sudoedit /etc/default/grub If your problem is that you get a clean boot instead of the expected resume, at a minimum you most likely need to set a boot parameter to find the disk imageįind your swap partition: grep swap /etc/fstabįor me this returns (partial output) # swap was on /dev/mmcblk0p3 during installation Your swap partition or swap file may need to be the same size as RAM to allow hibernation, but there is a good chance you will be able to hibernate if it is at least 2/5 the size of RAM, according to the Arch wiki page, so try other steps first before increasing swap size. Note: if using Btrfs DO NOT attempt to use a swap file as this may cause filesystem corruption The state is written either to a swap partition or to a swap file. If that fails, begin troubleshooting: in the hibernate state (HTD or ACPI S4) the machine state is written to disk so that no power is needed to preserve it. This case study may be useful for others with problems. I also managed to get it working on 17.04 with a swap file. After some tweaks, I was able to hibernate using the interface of systemd (init system in 16.04 and above). # Install Monit 5.23 (Ubuntu 16.Hibernation using systemctl and getting it working in tough casesįor me, pm-hibernate always fails. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |