Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Ubuntu hibernate not work

  1. #21
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Ubuntu hibernate not work

    Great news. You could create a file in /etc/pm-sleep.d to automatically disable the ramdisk before hibernate and recreate it on resume (so you don't have to do it manually each time). The file should be in a format like this:
    Code:
    #!/bin/bash
    
    case "${1}" in
        hibernate)
           # command to disable ramdisk
           ;;
        thaw)
           # command to re-enable ramdisk
           ;;
    esac

  2. #22
    Join Date
    Jan 2009
    Beans
    328

    Re: Ubuntu hibernate not work

    Yes, thank you,bellowing is my ramdisk.sh
    Code:
    root@laptop:~# cat /etc/pm/sleep.d/ramdisk.sh 
    #!/bin/bash 
    
    case "${1}" in
      hibernate)
        # command to disable ramdisk
        swapoff /dev/zram0
        umount /dev/zram0
        echo 1 > /sys/block/zram0/reset
        ;;
      thaw)
        # command to re-enable ramdisk
        /etc/init.d/wicd restart
        ;;
    esac
    root@laptop:~#
    I have two questions, one is how to re-activate the ramdisk, and another is : After resuming, the OS is unlocked, this is a great security concern.
    Could I add some command in the ramdisk.sh, so automatically lock the screen for security?

  3. #23
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Ubuntu hibernate not work

    how to re-activate the ramdisk,
    I've never used ramdisks, but a quick search led me to believe that these may be the commands:
    Code:
    mkswap /dev/zram0
    swapon /dev/zram0
    After resuming, the OS is unlocked
    Perhaps this might help? http://ubuntuforums.org/showpost.php...0&postcount=14

  4. #24
    Join Date
    Jan 2009
    Beans
    328

    Re: Ubuntu hibernate not work

    Yes, thank you.

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

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