You are not logged in.
Pages: 1
Hello,
I would to use systemctl hibernate. I have read that I have to edit HOOKS in /etc/mkinitcpio.conf and rebuild initramfs.
This is what I've done:
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES="piix ide_disk reiserfs"
MODULES=""
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=""
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No raid, lvm2, or encrypted root is needed.
# HOOKS="base"
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS="base udev autodetect block filesystems"
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS="base udev block filesystems"
#
## This setup assembles a pata mdadm array with an encrypted root FS.
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
# HOOKS="base udev block mdadm encrypt filesystems"
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS="base udev block lvm2 filesystems"
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block filesystems usbinput fsck resume"
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""
After I have rebuilt initramfs with sudo mkinitcpio -p linux and it has success.
But systemctl hibernate doesn't work the same. This is the log of journaltctl -xn:
Showing user generated messages only. Users in the group 'adm' can see all messages. Pass -q to turn this notice off.
-- Logs begin at lun 2013-01-14 20:27:39 GMT, end at lun 2013-01-28 19:33:58 GMT. --
gen 27 19:38:16 black pulseaudio[460]: [pulseaudio] pid.c: Daemon already running.
gen 27 19:38:16 black pulseaudio[467]: [pulseaudio] pid.c: Daemon already running.
-- Reboot --
gen 27 20:18:13 black pulseaudio[269]: [pulseaudio] module-gconf.c: Unable to read or parse data from client.
gen 27 20:18:13 black pulseaudio[269]: [pulseaudio] module.c: Failed to load module "module-gconf" (argument: ""): initialization failed.
gen 27 20:18:14 black pulseaudio[269]: [pulseaudio] main.c: Module load failed.
-- Reboot --
gen 28 14:25:04 black pulseaudio[275]: [pulseaudio] module-gconf.c: Unable to read or parse data from client.
gen 28 14:25:04 black pulseaudio[275]: [pulseaudio] module.c: Failed to load module "module-gconf" (argument: ""): initialization failed.
gen 28 14:25:04 black pulseaudio[275]: [pulseaudio] main.c: Module load failed.
gen 28 14:25:28 black pulseaudio[480]: [pulseaudio] pid.c: Daemon already running.
-- Reboot --
gen 28 19:30:13 black pulseaudio[257]: [pulseaudio] module.c: Failed to load module "module-gconf" (argument: ""): initialization failed.
What's wrong?
Regards,
grant.
Offline
https://wiki.archlinux.org/index.php/Hi … esume_Hook
To add the resume hook, edit /etc/mkinitcpio.conf as root and add resume to the HOOKS array. resume must be placed after block and/or lvm2, but before filesystems.
Offline
HOOKS="base udev autodetect modconf block resume filesystems usbinput fsck"
Doesn't work the same. Maybe because I don't have/use a swap partition?
Last edited by Grant (2013-01-28 20:34:12)
Offline
This is /var/log/pm-suspend.log:
Initial commandline parameters:
mar 29 gen 2013, 12.46.13, GMT: Running hooks for hibernate.
Running hook /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate:
Linux black 3.7.4-1-ARCH #1 SMP PREEMPT Mon Jan 21 23:05:29 CET 2013 x86_64 GNU/Linux
Module Size Used by
iTCO_wdt 5288 0
iTCO_vendor_support 1930 1 iTCO_wdt
gpio_ich 4409 0
r8169 56712 0
coretemp 6231 0
i915 526542 3
video 11332 1 i915
drm_kms_helper 33007 1 i915
drm 225482 4 i915,drm_kms_helper
i2c_i801 10917 0
kvm 384721 0
mii 4092 1 r8169
i2c_algo_bit 5392 1 i915
lpc_ich 11346 0
intel_agp 10745 1 i915
intel_gtt 15361 3 i915,intel_agp
pcspkr 1900 0
snd_hda_codec_realtek 61665 1
mperf 1268 0
asus_atk0110 12097 0
psmouse 76176 0
joydev 9728 0
evdev 10137 7
serio_raw 5074 0
processor 27464 0
snd_hda_intel 27700 3
snd_hda_codec 100743 2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 6429 1 snd_hda_codec
snd_pcm 77827 2 snd_hda_codec,snd_hda_intel
snd_page_alloc 7427 2 snd_pcm,snd_hda_intel
snd_timer 18935 1 snd_pcm
snd 60157 12 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_hda_codec,snd_hda_intel
i2c_core 23076 5 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit
soundcore 5443 1 snd
microcode 14434 0
button 4670 1 i915
ext4 447457 2
crc16 1360 1 ext4
jbd2 78834 1 ext4
mbcache 6027 1 ext4
hid_generic 1146 0
usbhid 41358 0
hid 86421 2 hid_generic,usbhid
sr_mod 14824 0
cdrom 35521 1 sr_mod
sd_mod 31067 3
ata_generic 3339 0
pata_acpi 3452 0
uhci_hcd 25069 0
ata_piix 23353 2
ehci_hcd 51745 0
usbcore 173914 3 uhci_hcd,ehci_hcd,usbhid
usb_common 955 1 usbcore
libata 168291 3 pata_acpi,ata_generic,ata_piix
scsi_mod 130423 3 libata,sd_mod,sr_mod
total used free shared buffers cached
Mem: 4043436 1376052 2667384 0 16916 586440
-/+ buffers/cache: 772696 3270740
Swap: 0 0 0
/usr/lib/pm-utils/sleep.d/00logging hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate:
/usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub hibernate hibernate:
/usr/lib/pm-utils/sleep.d/01grub hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate:
/usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/50netcfg hibernate hibernate:
/usr/lib/pm-utils/sleep.d/50netcfg hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules hibernate hibernate:
/usr/lib/pm-utils/sleep.d/75modules hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock hibernate hibernate:
/usr/lib/pm-utils/sleep.d/90clock hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate:
/usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led hibernate hibernate:
/usr/lib/pm-utils/sleep.d/95led hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate:
Kernel modesetting video driver detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:
/usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.
mar 29 gen 2013, 12.46.14, GMT: performing hibernate
/usr/lib/pm-utils/pm-functions: line 316: echo: write error: Nessun device corrisponde
mar 29 gen 2013, 12.46.16, GMT: Awake.
mar 29 gen 2013, 12.46.16, GMT: Running hooks for thaw
Running hook /usr/lib/pm-utils/sleep.d/99video thaw hibernate:
/usr/lib/pm-utils/sleep.d/99video thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler thaw hibernate:
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led thaw hibernate:
/usr/lib/pm-utils/sleep.d/95led thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq thaw hibernate:
/usr/lib/pm-utils/sleep.d/94cpufreq thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock thaw hibernate:
/usr/lib/pm-utils/sleep.d/90clock thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules thaw hibernate:
Reloaded unloaded modules.
/usr/lib/pm-utils/sleep.d/75modules thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/50netcfg thaw hibernate:
/usr/lib/pm-utils/sleep.d/50netcfg thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth thaw hibernate:
/usr/lib/pm-utils/sleep.d/49bluetooth thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub thaw hibernate:
/usr/lib/pm-utils/sleep.d/01grub thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave thaw hibernate:
/usr/lib/pm-utils/sleep.d/00powersave thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging thaw hibernate:
/usr/lib/pm-utils/sleep.d/00logging thaw hibernate: success.
mar 29 gen 2013, 12.46.16, GMT: Finished.
Initial commandline parameters:
mar 29 gen 2013, 12.48.15, GMT: Running hooks for hibernate.
Running hook /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate:
Linux black 3.7.4-1-ARCH #1 SMP PREEMPT Mon Jan 21 23:05:29 CET 2013 x86_64 GNU/Linux
Module Size Used by
iTCO_wdt 5288 0
iTCO_vendor_support 1930 1 iTCO_wdt
gpio_ich 4409 0
r8169 56712 0
coretemp 6231 0
i915 526542 3
video 11332 1 i915
drm_kms_helper 33007 1 i915
drm 225482 4 i915,drm_kms_helper
i2c_i801 10917 0
kvm 384721 0
mii 4092 1 r8169
i2c_algo_bit 5392 1 i915
lpc_ich 11346 0
intel_agp 10745 1 i915
intel_gtt 15361 3 i915,intel_agp
pcspkr 1900 0
snd_hda_codec_realtek 61665 1
mperf 1268 0
asus_atk0110 12097 0
psmouse 76176 0
joydev 9728 0
evdev 10137 7
serio_raw 5074 0
processor 27464 0
snd_hda_intel 27700 3
snd_hda_codec 100743 2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 6429 1 snd_hda_codec
snd_pcm 77827 2 snd_hda_codec,snd_hda_intel
snd_page_alloc 7427 2 snd_pcm,snd_hda_intel
snd_timer 18935 1 snd_pcm
snd 60157 12 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_hda_codec,snd_hda_intel
i2c_core 23076 5 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit
soundcore 5443 1 snd
microcode 14434 0
button 4670 1 i915
ext4 447457 2
crc16 1360 1 ext4
jbd2 78834 1 ext4
mbcache 6027 1 ext4
hid_generic 1146 0
usbhid 41358 0
hid 86421 2 hid_generic,usbhid
sr_mod 14824 0
cdrom 35521 1 sr_mod
sd_mod 31067 3
ata_generic 3339 0
pata_acpi 3452 0
uhci_hcd 25069 0
ata_piix 23353 2
ehci_hcd 51745 0
usbcore 173914 3 uhci_hcd,ehci_hcd,usbhid
usb_common 955 1 usbcore
libata 168291 3 pata_acpi,ata_generic,ata_piix
scsi_mod 130423 3 libata,sd_mod,sr_mod
total used free shared buffers cached
Mem: 4043436 1555888 2487548 0 31488 677192
-/+ buffers/cache: 847208 3196228
Swap: 0 0 0
/usr/lib/pm-utils/sleep.d/00logging hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate:
/usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub hibernate hibernate:
/usr/lib/pm-utils/sleep.d/01grub hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate:
/usr/lib/pm-utils/sleep.d/49bluetooth hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/50netcfg hibernate hibernate:
/usr/lib/pm-utils/sleep.d/50netcfg hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules hibernate hibernate:
/usr/lib/pm-utils/sleep.d/75modules hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock hibernate hibernate:
/usr/lib/pm-utils/sleep.d/90clock hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate:
/usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led hibernate hibernate:
/usr/lib/pm-utils/sleep.d/95led hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate:
Kernel modesetting video driver detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:
/usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.
mar 29 gen 2013, 12.48.16, GMT: performing hibernate
/usr/lib/pm-utils/pm-functions: line 316: echo: write error: Nessun device corrisponde
mar 29 gen 2013, 12.48.18, GMT: Awake.
mar 29 gen 2013, 12.48.18, GMT: Running hooks for thaw
Running hook /usr/lib/pm-utils/sleep.d/99video thaw hibernate:
/usr/lib/pm-utils/sleep.d/99video thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler thaw hibernate:
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led thaw hibernate:
/usr/lib/pm-utils/sleep.d/95led thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq thaw hibernate:
/usr/lib/pm-utils/sleep.d/94cpufreq thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock thaw hibernate:
/usr/lib/pm-utils/sleep.d/90clock thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules thaw hibernate:
Reloaded unloaded modules.
/usr/lib/pm-utils/sleep.d/75modules thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/50netcfg thaw hibernate:
/usr/lib/pm-utils/sleep.d/50netcfg thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth thaw hibernate:
/usr/lib/pm-utils/sleep.d/49bluetooth thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub thaw hibernate:
/usr/lib/pm-utils/sleep.d/01grub thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave thaw hibernate:
/usr/lib/pm-utils/sleep.d/00powersave thaw hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging thaw hibernate:
/usr/lib/pm-utils/sleep.d/00logging thaw hibernate: success.
mar 29 gen 2013, 12.48.18, GMT: Finished.
after sudo pm-hibernate.
Why it doesn't work?
Offline
please use code tags
And yes, you need a swap to hibernate. However, you may be able to use a file backed swap (untested: http://wiki.debian.org/Hibernation/Hibe … Partition).
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I imagine I can't use RAM, also if I have 4GB, because the system image file is written on hdd.
There's something strange in filefrag.
[root@black black]# swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 4197372 0 -1
[root@black black]# filefrag -v /dev/sda5
Filesystem type is: 1021994
File size of /dev/sda5 is 0 (0 blocks, blocksize 4096)
/dev/sda5: 0 extents found
[root@black black]#
I don't see the the array like here https://wiki.archlinux.org/index.php/Sw … e_resuming . Why?
Last edited by Grant (2013-01-31 11:16:29)
Offline
/dev/sda5 is a partition, not a file.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
And so what's the command?
Offline
Read that from the beginning, you have to create a swap file. https://wiki.archlinux.org/index.php/Swap#Swap_file
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
Pages: 1