Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 687386 - sys-power/suspend fails to resume system because of checksum error
Summary: sys-power/suspend fails to resume system because of checksum error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew Savchenko
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-06-04 19:31 UTC by Ralf Glauberman
Modified: 2021-01-07 09:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix buffer size (fix_checksum.patch,358 bytes, patch)
2019-06-04 19:31 UTC, Ralf Glauberman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Glauberman 2019-06-04 19:31:54 UTC
Created attachment 578806 [details, diff]
Fix buffer size

s2disk from sys-power/suspend works fine in suspending the system to disk but when trying to resume the system the operation fails and reports a checksum error (when "compute checksum = y" is set in /etc/suspend.conf).
The attached patch fixes the problem for me. Patch is taken from a comment by user yecril71pl on https://sourceforge.net/projects/suspend/reviews.
The patch was already posted there in 2013 but upstream seems to be dead.
Comment 1 Larry the Git Cow gentoo-dev 2019-06-05 17:39:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=774f69ba399f8e47633426257c0106b6cbb1df50

commit 774f69ba399f8e47633426257c0106b6cbb1df50
Author:     Andrew Savchenko <bircoph@gentoo.org>
AuthorDate: 2019-06-05 17:37:58 +0000
Commit:     Andrew Savchenko <bircoph@gentoo.org>
CommitDate: 2019-06-05 17:39:39 +0000

    sys-power/suspend: fix checksum buffer size
    
    Closes: https://bugs.gentoo.org/687386
    Package-Manager: Portage-2.3.67, Repoman-2.3.13
    Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>

 sys-power/suspend/Manifest                     |  1 +
 sys-power/suspend/metadata.xml                 |  1 +
 sys-power/suspend/suspend-1.0_p20190605.ebuild | 60 ++++++++++++++++++++++++++
 3 files changed, 62 insertions(+)
Comment 2 Andrew Savchenko gentoo-dev 2019-06-05 17:42:48 UTC
(In reply to Ralf Glauberman from comment #0)
> Created attachment 578806 [details, diff] [details, diff]
> Fix buffer size
> 
> s2disk from sys-power/suspend works fine in suspending the system to disk
> but when trying to resume the system the operation fails and reports a
> checksum error (when "compute checksum = y" is set in /etc/suspend.conf).
> The attached patch fixes the problem for me. Patch is taken from a comment
> by user yecril71pl on https://sourceforge.net/projects/suspend/reviews.
> The patch was already posted there in 2013 but upstream seems to be dead.

Thanks.

I have a repo on github with many fixes for suspend (most notable is port to recent libgcrypt): https://github.com/bircoph/suspend. They are all in Gentoo now.

There are some more ideas for further development, so I may officially fork the project one day.
Comment 3 Ralf Glauberman 2019-06-05 20:07:04 UTC
Thank you very much for implementing this fix so quickly
Comment 4 Andrew Savchenko gentoo-dev 2021-01-07 09:27:58 UTC
(In reply to Ralf Glauberman from comment #0)
> Created attachment 578806 [details, diff] [details, diff]
> Fix buffer size
> 
> s2disk from sys-power/suspend works fine in suspending the system to disk
> but when trying to resume the system the operation fails and reports a
> checksum error (when "compute checksum = y" is set in /etc/suspend.conf).
> The attached patch fixes the problem for me. Patch is taken from a comment
> by user yecril71pl on https://sourceforge.net/projects/suspend/reviews.
> The patch was already posted there in 2013 but upstream seems to be dead.

Hmm, I have a report from user that this patch leads to doubled RAM usage after s2ram resume. While I can't confirm this myself, this should be investigated further. Maybe this patch triggers another problem.