Fredrik Salomonsson <[email protected]> writes:

> Hi Floarian,
>
> "pelzflorian (Florian Pelz)" <[email protected]> writes:
>
>> Fredrik Salomonsson <[email protected]> writes:
>>
>>> That did fix the issue with it shutting itself off when trying to wake
>>> it up with the power button.  However it got replaced with it directly
>>> going back to suspend when waking up.  Only after a few suspend/wake
>>> cycles does it finally wake up again.
>>
>> Hello Fredrik.  No idea, but just to make sure your issue really is with
>> the kernel, could you try
>>
>> $ sudo -i
>> # echo disk > /sys/power/state
>>
>> or instead of disk whatever other suspend you want from
>> https://docs.kernel.org/admin-guide/pm/sleep-states.html#basic-sysfs-interfaces-for-system-suspend-and-hibernation
>> ?
>
> Thanks for the pointer!  Looks like it might be deep mem_sleep that have
> some issues.  I tested `echo disk > /sys/power/state` but that failed.

For my cheap HP laptop, I use disk.  My /etc/config.scm has

  (swap-devices
   (list
    (swap-space
     (target "/swapfile")
     (dependencies (filter (file-system-mount-point-predicate "/")
                           file-systems)))))

  (kernel-arguments
   (cons* "resume=/dev/nvme0n1p2"   ;Device containing /swapfile
          "resume_offset=4161536"   ;Offset that /swapfile has on it
          %default-kernel-arguments)))

similar to the manual[1].  Of course disk is more often called hibernate.
This /swapfile might be necessary for your
hybrid sleep, too, though.  And /swapfile must be big enough.

Regards,
Florian

[1]
info "(guix)Swap Space"
https://guix.gnu.org/manual/devel/en/html_node/Swap-Space.html

Reply via email to