7

After a long suspended session my system gives me this message Read-error on swap-device (8:0:441040) (this is the last one received). It reboots in some way, because there are not more programs opened by me before the suspension, it's pratically a new user session. I searched bad sectors in swap partition with badblocks command but everything seems fine, recently i've incremented my swap but seems that the two things are not related because i got the error messagge even before the size incrementation process. I've already: changed the UUID in the fstab file after the incrementation (just to be sure), reformatted the swap partition, looked for bad sectors, i don't know what to do now. Another thing, in this moment my system mounts arch, but this is a problem that i didn't have before with other distros.

  • Is the swap partition large enough to hold all available RAM? – Kusalananda Apr 28 '18 at 7:49
  • Yes. I did the incrementation because of the previous size, porting the amount of space from 1GB to 8GB (my ram is 4GB) – AmonDice Apr 28 '18 at 8:13
  • 1
    I noticed that the passed time between the activation of suspend session and reactivation of the system affects in some way this issue. After 2-3 hours of suspended session i can resume correctly the user session, but after 10 hours circa i get the error message. I think that even the number of programs opened can be a variable. – AmonDice Apr 28 '18 at 9:54
3

There is a bug which matches everything you describe (including the separate comments when I wrote this answer). The bug was introduced in upstream kernel v4.14, which was fixed in v4.17 and v4.16.8.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.16.y&id=7859056bc73dea2c3714b00c83b253d4c22bf7b6

If you still do not have a new enough kernel, and you don't want to install an older kernel (switch to the linux-lts package mentioned in the Arch thread below?), there is a workaround. You can add the option "scsi_mod.scan=sync" to the end of your kernel command line, e.g. in GRUB.

The original Arch forum thread on it is here:

https://bbs.archlinux.org/viewtopic.php?id=235027

"Read-error on swap-device" during resume is a possible signature for this error (but this error message could be caused by other things, and most of the time this crash was quite silent, at least for me). For examples where this message happened, see:

https://askubuntu.com/questions/1035208/ubuntu-18-04-error-on-waking-up-from-sleep-read-error-on-swap-device/

https://bugzilla.redhat.com/show_bug.cgi?id=1553979#c29

| improve this answer | |
  • I really appreciate your help, a lot of usefull informations, but right now i don't have the chance to recreate the environment for test your solution (that solve what was my problem). Again, thanks for your time – AmonDice Jul 21 '18 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.