Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: 13.2 and hibernate amnesia

  1. #1
    Join Date
    Mar 2015
    Location
    PH
    Posts
    23

    Question 13.2 and hibernate amnesia

    Hi all! I have 13.2 installed and use hibernate everyday.

    The problem is when the system turns on, it proceeds straight to a cold boot, complete with an fsck. Turning off for hibernate seems to work fine, as in the system manages to save state then turn off properly. I've tried disabling zram before hibernate and it doesn't make a difference. Swap partition is 8GB, RAM is 16GB, but images don't exceed 4GB most of the time. Running `sudo pm-hibernate` makes no difference either.

    Resuming from hibernate sporiadically used to work before (it used to resume properly at times), but after editing /etc/susend.conf to enable "suspend loglevel = 7", resuming from hibernate broke completely.
    When hibernate used to work and resumed properly, sometimes it doesn't go to the desktop after loading, requiring me to press MagicSysRq+E to get to the desktop.

    Laptop:

    Asus N55SF
    i5-2450M
    Nvidia GT555M
    16GB RAM

    Thank you!

    dmesg and pm-suspend.log
    https://gist.github.com/tsdmgz/eeed0b67fb7b335cd88d

    /etc/fstab

    Code:
    UUID=57539cb4-bc4c-474e-a9a5-29cca9dffab7 /                    ext4       acl,user_xattr        1 1
    UUID=ed04644d-acd5-48aa-8e40-0ba013d293eb /boot                ext2       acl,user_xattr        1 2
    UUID=2345be2c-1a5d-4d94-80d2-09b70339d544 swap                 swap       defaults              0 0
    UUID=d2b42b5b-3082-4251-a20e-b39c4ab08320 /home                ext4       defaults              1 2
    UUID=DC7A3FE87A3FBE58 /mnt/d               ntfs-3g    users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0
    UUID=993f858f-5108-4451-89d7-82b5f473735d /mnt/d/work		ext4	defaults		0 0
    tmpfs                /tmp                 tmpfs      defaults              0 0
    
    //xiaoyun.dmgzhome/share	/mnt/z	cifs	noauto,_netdev,file_mode=0666,dir_mode=0777,username=guest,password=,users,gid=users	0	0
    /proc/swaps

    Code:
    Filename                                Type            Size    Used    Priority
    /dev/sda8                               partition       8288116 0       -1
    /dev/zram0                              partition       524284  0       100
    /dev/zram1                              partition       524284  0       100
    /dev/zram2                              partition       524284  0       100
    /dev/zram3                              partition       524284  0       100
    /etc/default/grub

    Code:
    # Modified by YaST2. Last modification on Sat Jan 17 13:23:07 PHT 2015
    # THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
    # For the new kernel it try to figure out old parameters. In case we are not able to recognize it (e.g. change of flavor or strange install order ) it it use as fallback installation parameters from /etc/sysconfig/bootloader
    
    # If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update
    # /boot/grub2/grub.cfg.
    GRUB_DISTRIBUTOR=openSUSE
    GRUB_DEFAULT=saved
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=1
    GRUB_CMDLINE_LINUX_DEFAULT=" resume=/dev/disk/by-uuid/2345be2c-1a5d-4d94-80d2-09b70339d544 showopts elevator=deadline i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 nouveau.modeset=0"
    # kernel command line options for failsafe mode
    GRUB_CMDLINE_LINUX_RECOVERY="showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe"
    GRUB_CMDLINE_LINUX=""
    # Uncomment to enable BadRAM filtering, modify to suit your needs
    # This works with Linux (no patch required) and with any kernel that obtains
    # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
    #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
    # Uncomment to disable graphical terminal (grub-pc only)
    GRUB_TERMINAL=gfxterm
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    GRUB_GFXMODE=auto
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID=true
    # Uncomment to disable generation of recovery mode menu entries
    #GRUB_DISABLE_LINUX_RECOVERY=true
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"
    # Skip 30_os-prober if you experienced very slow in probing them
    # WARNING foregin OS menu entries will be lost if set true here
    GRUB_DISABLE_OS_PROBER=false
    # Set to 'y' for grub to be installed on an encrypted partition
    GRUB_ENABLE_CRYPTODISK=n
    SUSE_BTRFS_SNAPSHOT_BOOTING=true
    GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/background.png
    GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
    suspend.conf

    Code:
    #############################################################################
    ##
    ## note:
    ## using pm-utils or powersaved, this file (/etc/suspend.conf) only serves as
    ## a template, image_size and resume_device are filled in dynamically
    ## and the generated /var/lib/s2disk.conf is used to suspend.
    ## _If_ you enter stuff here, it will be copied to that file unchanged,
    ## but this might skip some features and sanity checks.
    ##
    #############################################################################
    ##
    ## your snapshot device. You should not need to change this.
    # snapshot device = /dev/snapshot
    #
    ## enter your swap device here. Read the warning on pm-utils above, please!
    #resume device = <path_to_resume_device_file>
    #
    ## image size will also be filled in by pm-utils
    #image size = 350000000
    #
    suspend loglevel = 7
    #max loglevel =
    #
    ## compute checksum will slow down suspend and resume.
    ## Debugging option, default n
    #compute checksum = y
    #
    ## compression will often speed up suspend and resume (default y)
    #compress = n
    #
    ## encryption support is rather basic right now - e.g. USB keyboards will not
    ## work to enter the key in the standard initrd, also beware of
    ## non-US keyboard layouts. Only use this if you know what you are doing.
    #encrypt = y
    #
    ## RSA key file that is used for encryption
    #RSA key file = /etc/suspend.key
    #
    ## start writing out the image early, before buffers are full.
    ## will most of the time speed up overall writing time (default y)
    #early writeout = n
    #
    ## use splash picture? (default y)
    #splash = y
    #
    ## shutdown method:
    ## platform - go through ACPI BIOS to power off the machine (default on
    ##            machines that support it)
    ## shutdown - just power off like after a shutdown
    ## reboot   - reboot instead of powering off. For debugging only.
    #shutdown method = platform
    #
    ## resume offset: for use with swapfiles, use "swap-offset" to find out.
    #resume offset = 12345
    #
    ## pause after resume for n seconds, so that the timing information can
    ## actually be read (default 0 => don't pause)
    #resume pause = 3
    #
    ## use threads for suspend? (default n)
    ## this hugely speeds up encryption and also compression on mulitcore machines
    #threads = y

  2. #2

    Default Re: 13.2 and hibernate amnesia

    Maybe it works if you uninstall pm-utils?
    They are deprecated anyway.

  3. #3
    Join Date
    Mar 2015
    Location
    PH
    Posts
    23

    Default Re: 13.2 and hibernate amnesia

    Quote Originally Posted by wolfi323 View Post
    Maybe it works if you uninstall pm-utils?
    They are deprecated anyway.
    Uninstalled pm-utils, rebooted, and attempted another hibernate. It still went straight into cold boot.

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,648

    Default Re: 13.2 and hibernate amnesia

    BTRFS on root?? Could be the grub problem of not being able to write to BTRFS???? But usually it gets stuck in wake from sleep mode. try erasing

    /boot/grub2/grubenv

  5. #5

    Default Re: 13.2 and hibernate amnesia

    Quote Originally Posted by gogalthorp View Post
    BTRFS on root?? Could be the grub problem of not being able to write to BTRFS???? But usually it gets stuck in wake from sleep mode. try erasing

    /boot/grub2/grubenv
    ???
    You're completely mixing things up.

    When resuming from sleep mode, grub is not even started.

    And the problem that grub2 cannot write to btrfs "only" causes the boot menu to disappear when resume from hibernate fails. But it doesn't cause the resume to fail.

    @gjie:
    You don't have "noresume" on your kernel commandline by chance? But I think the hibernation should be aborted in that case.
    OTOH, there are known problems with resuming and the nvidia driver. But it should at least resume, there might be graphics problems afterwards though. Still, try to disable desktop effects before you hibernate. Does this help?

    And a side-note: IMHO you're playing "russian roulette" anyway by hibernating with 8GiB swap for 16GiB RAM. Even if it is not the problem here.

    PS: your kernel command line is quite long:
    Code:
    Command line: BOOT_IMAGE=/vmlinuz-3.16.7-7-desktop root=UUID=57539cb4-bc4c-474e-a9a5-29cca9dffab7 resume=/dev/disk/by-uuid/2345be2c-1a5d-4d94-80d2-09b70339d544 showopts elevator=deadline i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 nouveau.modeset=0

    Maybe some option is causing the resume to fail? Try to remove them all (everything after "showopts") as a test.
    And check that the resume= option specifies the correct partition, i.e. that
    /dev/disk/by-uuid/2345be2c-1a5d-4d94-80d2-09b70339d544 is indeed your swap partition.
    Last edited by wolfi323; 12-Mar-2015 at 06:04.

  6. #6

    Default Re: 13.2 and hibernate amnesia

    Quote Originally Posted by wolfi323 View Post
    And check that the resume= option specifies the correct partition, i.e. that /dev/disk/by-uuid/2345be2c-1a5d-4d94-80d2-09b70339d544 is indeed your swap partition.
    Sorry, you posted your fstab earlier anyway, and this seems to be correct.

    Well, I can only suspect then that the zram is causing the problem.
    Try without, does it work then?

    I cannot help with that at all though.

  7. #7
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,648

    Default Re: 13.2 and hibernate amnesia

    I agree but that was worth a shot. since the control is dove via the grubenv file . Grub is still in control of the resume boot that is were the resume info comes from

  8. #8

    Default Re: 13.2 and hibernate amnesia

    Quote Originally Posted by gogalthorp View Post
    I agree but that was worth a shot. since the control is dove via the grubenv file .
    The grubenv file doesn't "control" anything. It can be used to set an entry to boot the next time though, which would apply here of course.
    So if a wrong entry would be specified there, the resume might not be done at all (if that entry has the "noresume" option e.g.).

    But the pm-utils log showed that the first entry was set by the hibernation, i.e. "grub-once 0" was called.
    And the kernel command line shows that this one doesn't have the "noresume" parameter.

    Grub is still in control of the resume boot that is were the resume info comes from
    That's true.
    But deleting grubenv wouldn't help at all (even if it would be the culprit), as this is created by the hibernation process in the first place.

  9. #9
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,648

    Default Re: 13.2 and hibernate amnesia

    Well if it is created right. if it is corrupted or created wrong it would effect the boot. It would need to be present and correct to trigger (thus control) the resume process and grub would fall through and do a normal boot sequence and not do the resume. My understanding is that the file must be present and assumed formed right to trigger the resume. If the file is not present or ill formed then a normal boot happens and I assume the BTRFS work around does not remove the file since it is a normal boot and it should not be there in that case.

  10. #10

    Default Re: 13.2 and hibernate amnesia

    Quote Originally Posted by gogalthorp View Post
    Well if it is created right. if it is corrupted or created wrong it would effect the boot.
    It would (and does anyway) affect the boot, yes. But not in the way as you seem to think.

    It would need to be present and correct to trigger (thus control) the resume process and grub would fall through and do a normal boot sequence and not do the resume. My understanding is that the file must be present and assumed formed right to trigger the resume. If the file is not present or ill formed then a normal boot happens and I assume the BTRFS work around does not remove the file since it is a normal boot and it should not be there in that case.
    Your understanding is wrong.
    grubenv is not at all needed to trigger the resume.

    You need a correct resume= option on the kernel command line to trigger the resume, and that is (should be) part of the menu entry in grub.cfg.
    grubenv is only used/necessary to set the correct menu entry to be booted (in this case it's the default one anyway, so grubenv is redundant regarding this), and to hide the boot menu so that the user cannot select a different entry by mistake (this could even cause data loss).

    And the second part is a problem with /boot on btrfs, as grub2 cannot remove that entry from grubenv so the menu stays hidden.
    But again, this would not have any influence on the resume itself, and the resume script that is run during/after the resume removes that entry in grubenv as a workaround for btrfs.
    Last edited by wolfi323; 12-Mar-2015 at 09:24.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •