Bug 28528 - Resuming from hibernation instead start fresh; user loose work
Summary: Resuming from hibernation instead start fresh; user loose work
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: x86_64 Linux
Priority: High critical
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL: https://www.mageialinux-online.org/fo...
Whiteboard: MGA8TOO
Keywords: IN_ERRATA8
Depends on:
Blocks:
 
Reported: 2021-03-05 15:18 CET by Alain Choucroot
Modified: 2023-03-20 22:07 CET (History)
12 users (show)

See Also:
Source RPM: dracut-051-4.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Alain Choucroot 2021-03-05 15:18:41 CET
Description of problem:

With a newly installed mga8 on a mga7 computer, hibernation does not work anymore. More precisely hibernating (for example via "systemctl hibernate") seems ok. Yet it reboots "normally", ignoring the stored image

Comparing this mga8 computer with another "unmigrated" mga7 computer reveals that the "resume" module in dracut is missing, replaced by "kernel-modules-extra"

A workaround is to manually add the module in 51-mageia-resume.conf

#cat /etc/dracut.conf.d/51-mageia-resume.conf
add_device+=" UUID=2b1f437b-3e28-4f03-adce-19e79a021be8 "
add_dracutmodules+=" resume "
localhost dracut.conf.d # dracut -fv


Then hibernating works again.
Comment 1 Aurelien Oudelet 2021-03-05 15:30:50 CET
Hi, thanks for reporting this bug.*

Reproduced.
I put my system to hibernate state (leaving a LibreOffice and Firefox opened to make sure the difference).
Rebooting leads me to sddm asking me for new session, no LibreOffice nor Firefox window opened...

Raising priority and severity as putting a system to hibernate and to be not able to restore session can lead to a potential data loss for unsaved work.

Assigned to the package maintainer for Cauldron and MGA8TOO.

(Please set the status to 'assigned' if you are working on it)

Version: 8 => Cauldron
Severity: minor => critical
Component: Installer => RPM Packages
Target Milestone: --- => Mageia 8
Whiteboard: (none) => MGA8TOO
Assignee: bugsquad => pkg-bugs
Keywords: (none) => FOR_ERRATA8
CC: (none) => mageia, ouaurelien, thierry.vignaud
Priority: Normal => High
Source RPM: dracut => dracut-051-4.mga8.src.rpm

Morgan Leijström 2021-03-05 17:53:29 CET

CC: (none) => fri

Comment 2 Morgan Leijström 2021-03-08 13:21:43 CET
This is severe.
@ Aurelien, did you try the suggested workaround?
Comment 3 Aurelien Oudelet 2021-03-08 15:30:51 CET
Tried and it works!
Comment 4 Morgan Leijström 2021-03-08 15:56:56 CET
Great.
As it is severe and much wanted, it deserves a subchapter:
https://wiki.mageia.org/en/Mageia_8_Errata#Hibernation

Keywords: FOR_ERRATA8 => IN_ERRATA8

Morgan Leijström 2021-03-08 16:01:21 CET

Summary: Hibernation doesn't work after installation from Mageia-8-x86_64.iso => Resuming from hibernation instead start fresh; user loose work

Comment 5 Christophe Nanteuil 2021-03-28 22:36:36 CEST
I confirm the bug and that the workaround works.

CC: (none) => christophe.nanteuil

Comment 6 Thomas Andrews 2021-04-03 22:09:15 CEST
I can confirm this happening on my HP Probook 6550b. Fortunately, I don't do much of any critical work on this laptop. 

The two incidents I remember were when I was reading my morning newspaper. I was called away, and closed the lid to conserve the battery until I returned. LEDs indicated the data was being saved, but when I went to resume it did a cold boot. All I had to do was re-download the newspaper, but still, it was a bit annoying.

Since it's not critical for me I will be leaving this alone, so I can have an untouched system ready to test the update that fixes this when it's sent to QA.

CC: (none) => andrewsfarm

Comment 7 Neal Gompa 2021-04-04 01:37:08 CEST
There's an upstream issue for this: https://github.com/dracutdevs/dracut/issues/924

I poked the issue and I'll talk to the developer working on the issue after the Easter holiday in Germany is over.

CC: (none) => ngompa13

Filip Komar 2021-04-04 22:35:06 CEST

CC: (none) => filip.komar

Comment 8 Morgan Leijström 2021-04-10 22:34:24 CEST
Verified problem and fix on mga8 Plasma 64 bit installed by classical install,
 * upgraded to cauldron *  since a while, on Dell Precision M4400. 

Partitioning: Dual boot w MSW10, and using LVM.


Verified "add_dracutmodules" line is missing:
 # cat /etc/dracut.conf.d/51-mageia-resume.conf 
 add_device+=" /dev/vg-M4400/lv_swap "


Added the missing line by
 # echo 'add_dracutmodules+=" resume "' >> /etc/dracut.conf.d/51-mageia-resume.conf 

Then
 # dracut -fv


And now suspend-resume works :)
Comment 9 Morgan Leijström 2021-04-10 22:55:49 CEST
Added the procedure in errata.
Comment 10 Thomas Andrews 2021-08-10 19:14:52 CEST
(In reply to Thomas Andrews from comment #6)
> 
> Since it's not critical for me I will be leaving this alone, so I can have
> an untouched system ready to test the update that fixes this when it's sent
> to QA.

It now becomes desirable for me to have hibernation functioning on my production install on this hardware, so since it's been months with no news I have used copy-and-paste to apply the workaround from errata, and indeed, it still works. 

Should an upstream fix show up, I can still test it on this hardware, as I now have two other M8 installs on it.
Comment 11 Filip Komar 2021-08-10 23:35:35 CEST
In instal from XFCE 64 fix also works on my PC.
Comment 12 Luděk Janča 2021-10-23 19:15:13 CEST
(In reply to Morgan Leijström from comment #8)
> Verified problem and fix on mga8 Plasma 64 bit installed by classical
> install,
>  * upgraded to cauldron *  since a while, on Dell Precision M4400. 
> 
> Partitioning: Dual boot w MSW10, and using LVM.
> 
> 
> Verified "add_dracutmodules" line is missing:
>  # cat /etc/dracut.conf.d/51-mageia-resume.conf 
>  add_device+=" /dev/vg-M4400/lv_swap "
> 
> 
> Added the missing line by
>  # echo 'add_dracutmodules+=" resume "' >>
> /etc/dracut.conf.d/51-mageia-resume.conf 
> 
> Then
>  # dracut -fv
> 
> 
> And now suspend-resume works :)

Confirming, that it works on HP Probook 430 G5.

CC: (none) => joelp

Comment 13 Jose Paulo Vilela Soares da Cunha 2022-01-15 06:57:01 CET
Description of problem: With a newly installed mga8 on an i7 8770 computer, hibernation does not work.

I have read the Wiki https://wiki.mageia.org/en/Mageia_8_Errata item Miscellaneous - Hibernation. The installed package dracut-051-4.mga8.x86_64.rpm has the file /etc/dracut.conf.d/51-mageia-resume.conf listed but not packaged. Thus, I had crated this file using the suggested command line:

echo 'add_dracutmodules+=" resume "' >> /etc/dracut.conf.d/51-mageia-resume.conf

After that, I had run

dracut -fv

as is suggested in the Wiki. Finally, the hibernation have been working.

Should the dracut-051-4.mga8.x86_64.rpm package be updated?

CC: (none) => jpaulo

Comment 14 Dave Hodgins 2022-01-16 04:44:29 CET
The file is created by /usr/lib/libDrakX/any.pm from the package
drakxtools-backend-18.45-1.mga8

Reassigning to mageiatools group.

Assignee: pkg-bugs => mageiatools
CC: (none) => davidwhodgins

Comment 15 Frank Griffin 2023-02-28 14:18:44 CET
Confirming here for cauldron as well.

CC: (none) => ftg

Comment 16 Martin Whitaker 2023-02-28 16:16:48 CET
Checking the upstream bug report referenced in comment 7, there is now (as of two weeks ago) a fix for this bug in dracut.
Comment 17 Frank Griffin 2023-03-09 16:02:21 CET
I had made the workaround change, but a recent update reverted it, so it has not been incorporated in current dracut.
Comment 18 Morgan Leijström 2023-03-09 16:56:59 CET
Setting for errata 9 - remove if it gets fixed before release.

Target Milestone: Mageia 8 => Mageia 9
Keywords: (none) => FOR_ERRATA9

Comment 19 Martin Whitaker 2023-03-10 22:41:30 CET
(In reply to Frank Griffin from comment #17)
> I had made the workaround change, but a recent update reverted it, so it has
> not been incorporated in current dracut.

Yes, because there hasn't been a new release of dracut yet.

Anyway, I've just tested the supposed fix, and it doesn't work. I've reported that upstream.
Comment 20 Frank Griffin 2023-03-12 16:28:49 CET
I don't get it.  The workaround worked for me (and others) for weeks.  Then it disappeared from the 51* file with a cauldron update.  I put it back, and overnight today my laptop powered off again with the lid shut.  But when I checked the 51* file, the workaround is still there.
Comment 21 Martin Whitaker 2023-03-12 18:08:58 CET
Should be fixed in dracut-057-4.mga9. To test, remove the workaround from /etc/dracut.conf.d/51-mageia-resume.conf and run "dracut -f".
Comment 22 Frank Griffin 2023-03-13 20:39:10 CET
Test worked.  Looks fine now, thanks.
Comment 23 Morgan Leijström 2023-03-13 22:03:15 CET
Nice

Can it get fixed in mga8 too?

Version: Cauldron => 8
Target Milestone: Mageia 9 => ---
Keywords: FOR_ERRATA9 => (none)

Comment 24 Frank Griffin 2023-03-17 13:44:58 CET
(In reply to Frank Griffin from comment #22)
> Test worked.  Looks fine now, thanks.

And now, overnight with lid closed, powered down again.  Did something get reverted ?
Comment 25 Martin Whitaker 2023-03-18 14:36:13 CET
(In reply to Frank Griffin from comment #24)
> And now, overnight with lid closed, powered down again.  Did something get
> reverted ?

No, nothing got reverted.

Run 'lsinitrd -m'. Does that list the "resume" module. If so, what you are seeing is not related to this bug, and you need to check your system logs to find out why the suspend/resume didn't work.
Comment 26 Frank Griffin 2023-03-19 19:04:06 CET
You're right, this appears to have nothing to do with dracut.  Before the shutdown, the log has a flood of messages like this:

Mar 18 23:34:57 jaglap2 kernel: rtw_8821ce 0000:02:00.0:    [ 0] RxErr                  (First)
Mar 18 23:34:57 jaglap2 kernel: pcieport 0000:00:1c.3: AER: Multiple Corrected error received: 0000:02:00.0
Mar 18 23:34:57 jaglap2 kernel: rtw_8821ce 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Receiver ID)
Mar 18 23:34:57 jaglap2 kernel: rtw_8821ce 0000:02:00.0:   device [10ec:c821] error status/mask=00000001/0000e000
Mar 18 23:34:57 jaglap2 kernel: rtw_8821ce 0000:02:00.0:    [ 0] RxErr                  (First)
Mar 18 23:34:57 jaglap2 kernel: pcieport 0000:00:1c.3: AER: Multiple Corrected error received: 0000:02:00.0
Mar 18 23:34:57 jaglap2 kernel: rtw_8821ce 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Physical Layer, (Receiver ID)
Mar 18 23:34:57 jaglap2 kernel: rtw_8821ce 0000:02:00.0:   device [10ec:c821] error status/mask=00000001/0000e000
Mar 18 23:34:57 jaglap2 kernel: rtw_8821ce 0000:02:00.0:    [ 0] RxErr                  (First)

I'm guessing a hardware problem with the wireless.
Comment 27 Thomas Backlund 2023-03-19 19:15:24 CET
can be hw not coping with pcie aspm

you can try on kernel command line:

pcie_aspm=off
Comment 28 Frank Griffin 2023-03-19 20:09:19 CET
Thanks, Thomas.  The log didn't indicate any reason for the poweroff, so I'm guessing that the flood of log messages hit some threshold, and based on googling I added "pci=noaer" to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, which seems to have eliminated the flood. 

Can you tell me exactly which file and line corresponds to the kernel command line ?
Comment 29 Dave Hodgins 2023-03-20 19:24:40 CET
Using pci=noaer suppresses the error messages caused by the "PCIe Bus Error".

pcie_aspm=off and/or pcie_port_pm=off may stop the correctable errors from
happening.
Comment 30 Frank Griffin 2023-03-20 19:51:59 CET
Thanks Dave, I figured that as well, but where do I put them ?
Comment 31 Dave Hodgins 2023-03-20 22:02:49 CET
Assuming grub2 or grub2-efi, /etc/default/grub in the line starting with
GRUB_CMDLINE_LINUX_DEFAULT=

Run update-grub after adding the options to the string in that line.
Comment 32 Dave Hodgins 2023-03-20 22:07:21 CET
I should have added, instead of editing the file directly, you can also choose
to use "mcc/Boot/Setup boot system", select "Next" on the first screen, add
the options in the "Append" field (space between each option, not a comma).
It will run update-grub when "Finish" is selected.

Note You need to log in before you can comment on or make changes to this bug.