You are not logged in.

#26 2023-09-18 08:42:22

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

seth wrote:

...
nb. that "systemctl suspend" is NOT hibernation (S4), but "suspend to ram" (S3) and that is expected to be way faster that hibernation which writes the RAM to disk, powers down, powers up, reads the previous RAM content from disk to restore the status quo ante...

Oh, I alwas thought S4 was called 'suspend' and S3 was called 'standby'.
So this also explains why there's no new boot-journal created.
OK, Just found that 'systemctl hibernate' should do it and will try again.

Offline

#27 2023-09-18 08:49:33

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

OK, 'systemctl hibernate' gave the same result as trying to hibernate using the XFCE-GUI. That's: 'kernel: PM: Image not found (code -22)'
So, why does hibernation at work at first?
I will gather data that I think might be important to this again, here, for hopefully making it easier:

The kernel line:

Sep 18 10:36:29 250g8 kernel: Command line: BOOT_IMAGE=/@/boot/vmlinuz-linux root=UUID=4843fb47-bb68-4a90-9e76-8b1a8719aa8e rw rootflags=subvol=@ loglevel=3 nvme_core.default_ps_max_latency_us=0 iommu=soft resume=UUID=b44e24c0-3400-4df8-a163-cc9291ef5da6

The fstab:

[ladmin@250g8 ~]$ cat /etc/fstab 
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p5
UUID=4843fb47-bb68-4a90-9e76-8b1a8719aa8e	/         			btrfs     	rw,relatime,ssd,discard=async,space_cache=v2,subvol=/@		0 0

# /dev/nvme0n1p5
UUID=4843fb47-bb68-4a90-9e76-8b1a8719aa8e	/home     			btrfs     	rw,relatime,ssd,discard=async,space_cache=v2,subvol=/@home	0 0

# /dev/nvme0n1p5
UUID=4843fb47-bb68-4a90-9e76-8b1a8719aa8e	/var      			btrfs     	rw,relatime,ssd,discard=async,space_cache=v2,subvol=/@var	0 0

# /dev/nvme0n1p5
UUID=4843fb47-bb68-4a90-9e76-8b1a8719aa8e	/home/ladmin/Schreibtisch	btrfs     	rw,relatime,ssd,discard=async,space_cache=v2,subvol=/@desktop	0 0

# /dev/nvme0n1p5
UUID=4843fb47-bb68-4a90-9e76-8b1a8719aa8e	/home/ladmin/Downloads   	btrfs     	rw,relatime,ssd,discard=async,space_cache=v2,subvol=/@downloads0 0

# /dev/nvme0n1p1
UUID=EECE-A231      				/boot/efi     			vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/nvme0n1p6
UUID=b44e24c0-3400-4df8-a163-cc9291ef5da6	none      			swap      	defaults  							0 0

The partitions:

[ladmin@250g8 ~]$ sudo fdisk -l /dev/nvme0n1
Festplatte /dev/nvme0n1: 3,64 TiB, 4000787030016 Bytes, 7814037168 Sektoren
Festplattenmodell: TS4TMTE250S                             
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: 7A6FC701-F525-446E-B977-A7B141B731C8

Gerät              Anfang       Ende   Sektoren Größe Typ
/dev/nvme0n1p1       2048    2099199    2097152    1G EFI-System
/dev/nvme0n1p2    2099200  421480447  419381248  200G Microsoft Basisdaten
/dev/nvme0n1p3  421480448  422555647    1075200  525M Windows-Wiederherstellungsumgebung
/dev/nvme0n1p4  422555648  422588415      32768   16M Microsoft reserviert
/dev/nvme0n1p5  422588416 4717555711 4294967296    2T Linux-Dateisystem
/dev/nvme0n1p6 4717555712 4985991167  268435456  128G Linux Swap
[ladmin@250g8 ~]$ 

UUIDs:

[ladmin@250g8 ~]$ lsblk -f
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                            
├─nvme0n1p1 vfat   FAT32       EECE-A231                               965M     5% /boot/efi
├─nvme0n1p2 ntfs               D4C8CF7AC8CF597E                                    
├─nvme0n1p3 ntfs               52D0F881D0F86C9B                                    
├─nvme0n1p4                                                                        
├─nvme0n1p5 btrfs              4843fb47-bb68-4a90-9e76-8b1a8719aa8e  671,8G    67% /home/ladmin/Schreibtisch
│                                                                                  /home/ladmin/Downloads
│                                                                                  /var
│                                                                                  /home
│                                                                                  /
└─nvme0n1p6 swap   1           b44e24c0-3400-4df8-a163-cc9291ef5da6                [SWAP]

/etc/mkinitcpio.conf contains:

HOOKS=(base udev autodetect modconf kms keyboard keymap block filesystems fsck resume)

I think this is correct so far, isn't it? What else would be needed then?

The swap-partition itself is working (and also being used when needed, as I have seen before).

[ladmin@250g8 ~]$ cat /proc/swaps 
Filename				Type		Size		Used		Priority
/dev/nvme0n1p6                          partition	134217724	0		-2

Last edited by Elmario (2023-09-18 09:12:14)

Offline

#28 2023-09-18 15:58:21

seth
Member
Registered: 2012-09-03
Posts: 59,082

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

So, why does hibernation at work at first?

Does it? Did you run the "snafu" test?

"… resume fsck"
Did you "mkinitcpio -P" afterwards?
The error is common if the hook is missing, see eg. https://bbs.archlinux.org/viewtopic.php … 7#p1849927

Offline

#29 2023-09-19 11:16:35

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

seth wrote:

So, why does hibernation at work at first?
Does it? Did you run the "snafu" test?

This was just a misstyping by me. We already determined, that hibernation does not work. I meant to say 'doesn't'. Sorry for the confusion.

seth wrote:

Did you "mkinitcpio -P" afterwards? The error is common if the hook is missing, see eg.

Yes, just for making sure I did before posting the previous log.

The issue just happened again, and this time I am sure it is from a failed hibernation, while I was awayws for an hour.
So I did the usual procedure:

boot archlinx from USB
mount /dev/nvme1p5 -o subvol=@ /mnt
mount /dev/nvmep1 /mnt/boot/efi
arch-chroot /mnt
grub-install
sync
exit
reboot

When booting the arch image from USB there where a lot of ACPI related things visible, and I though there might be something relevant which doesn't show up when I reboot the internal installation from SSD, because technically the first is not the first boot since the issue occured hardware-wise of course, as I always have to from from USB before to repair the installed arch before I can boot the installed arch again. Thus I redirected a dmesg into a logfile.
You can find it here: https://pastebin.com/Q4PYXyXW
But I think there may have been an additional message which isn't contained in the dmesg output, at the very beginning. I will try making a photo next time, which isn't so easy as it's disappearing fast.

Also I created a new 'last boot log':
http://0x0.st/HOOd.txt

Offline

#30 2023-09-19 12:27:29

seth
Member
Registered: 2012-09-03
Posts: 59,082

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

So I did the usual procedure:

Hold on, the failed hibernation forces you to re-install grub???

The first log struggles w/ "intel_tc_port_init"
edit: the second one has it down to "tgl_tc_phy_init", by the end the  system tried to hibernate.
The intel warnings are probably not causing the hibernation fuzz.

/dev/nvme0n1p1 is not clean, but that's likely because the botched hibernations are effectively hard-reboots.

Can you please first and foremost clean up the network situation and disable either NM or dhcpcd?

Last edited by seth (2023-09-19 12:33:41)

Offline

#31 2023-09-19 14:43:11

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

seth wrote:

So I did the usual procedure:

Hold on, the failed hibernation forces you to re-install grub???
..

Yes.
It still is the same everytime as described in the opening post. The notebook got an utterly terrible UEFI with the smallest amount of options available I have ever seen, also some supposedly existing features like 'woL' are not working at all. That's why I thought it might be some issue with BIOS incompatiblity and missing mitigation (or the SSD firmware?):
1. I come to my notebook and it's automatically powered down (from the energy settings telling it to hibernate after 45 min).
2. I power on the notebook and get a message that no boot device has been found at all. Actually the nvme SSD is comletely missing from BIOS/UEFI as a drive (not just the arch-installation!).
3. I 'play around' with the UEFI settings, change one arbitrary setting, save the config, reboot, enter the UEFI settings again and switch the arbitrary  setting I just changed before to it's original value, save the config again and reboot
4. The SSD now may be available again. If not I power down the noteboko and repeat steps 2 - 4 until it's available again.
5. When the SSD finally has become available it instantly boots into the Windows installation, because the UEFI bootloader for my archlinux installation is gone and the windows bootloader still is there an working. Thus the bootorder of the UEFI changes and automatically sets widows to the first position
6. I then reboot using my USB-flash drive with the archlinux image and from there arch-chroot into my installation, reinstall grub, reboot and change the UEFI boot order to have my archlinux first again.
7. It's working normally - until it doesn't want to boot anymore.

It's a very annoying and fearsome procedure everytime, especially if I have to do some important work sad
Overall I have the impression, that it does not happen when I try provoking the problem by manually hibernating the notebook and powering it on again just a minute later. But it seems to happen way ore often (or always?), when I come to my notebook in the morning, after it had been in 'wannabe hibernation' through the night, with the power supply being disabled, as I have it on a switchable wall plug which I always power off through the night. In theory this shoudn't make a difference, because the notebook got a good working battery of course. (Yes, I did try to provoke it manually including switching off the power supply plug and waiting 15 minutes, but the problem did not occure then, possible it needs more power-off time for triggering the issue?)

Still there's no 100% way to provoke the issue. But I am very sure, that the two kernel parameters you told me made it way less frequent to happen.

But: As you found out, that hibernation itself isn't working at all, wouldn't it be best if we tried making this work at first? Maybe this will lead to solving the other issue as well..

Edit:
I just uninstalled dhcpcd.

Last edited by Elmario (2023-09-19 15:20:58)

Offline

#32 2023-09-19 15:36:09

seth
Member
Registered: 2012-09-03
Posts: 59,082

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

Did you recently check that windows fast-start is still disabled?
The nvme completely dropping out from hibernation attempts is very suspicous, though the image not found error might imply that the disk is already gone at this point - unfortunately there's no second drive to  hibernate to :\

Offline

#33 2023-09-19 19:18:17

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

Yes, I checked it last time when we added the kernel parameters.
I could try putting swap onto an USB drive for testint purposes. Would I need to add another hook to mkinitcpio for this to work?

Last edited by Elmario (2023-09-19 19:24:25)

Offline

#34 2023-09-19 20:11:09

seth
Member
Registered: 2012-09-03
Posts: 59,082

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

No, but hibernating to a USB key isn't the most reliable task either.
You can try, but if it doesn't work, that doesn't tell much sad

Offline

#35 2023-09-20 08:24:05

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

Well, it did not work - but in  a different way:
I issues 'systemctl hibernate' and the system seemingly shutdown for a second, to then show the desktop again, but woth frozen mous and no way to interact somehow.
So far this behaviour is identical, to what's happening when trying to hibernate to the SSD.
But when hibernating to the SSD, the 'frozen desktop' then disappears after a few seconds for the system to shutdown a second time and permanently, until I manually power it on (like it should).
Hibernating to the USB drive instead made the 'frozen desktop' stick permanently - I let it run through the night, like 9 hours overall and when I came to the notebook, the desktop was same - full yvisible with no mouse movement or keypresses possible. I was suprised, that one short tip on the power button made the system shutdown. though.
After booting it, I could see that it of course had not hibernated.

Still, I created a new last boot log: http://0x0.st/HOws.txt

Offline

#36 2023-09-20 11:15:14

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

I have recorded the early boot process and made screenshots of the three main steps.

1-Grub.png 2-initrd.png 3-hooks.png

Maybe thers's something conspicuous ..

Last edited by Elmario (2023-09-20 11:18:15)

Offline

#37 2023-09-20 14:35:37

seth
Member
Registered: 2012-09-03
Posts: 59,082

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

Sep 19 21:41:31 250g8 systemd-logind[478]: The system will hibernate now!
Sep 19 21:41:31 250g8 systemd[1]: Starting Hibernate...
Sep 19 21:41:31 250g8 systemd-sleep[3802]: Entering sleep state 'hibernate'...
Sep 19 21:41:31 250g8 kernel: PM: hibernation: hibernation entry
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff]
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Marking nosave pages: [mem 0x29eeb000-0x29efefff]
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Marking nosave pages: [mem 0x3b4ff000-0x40bfefff]
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Marking nosave pages: [mem 0x40c00000-0xffffffff]
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Basic memory bitmaps created
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Preallocating image memory
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Allocated 2039222 pages for snapshot
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Allocated 8156888 kbytes in 1.60 seconds (5098.05 MB/s)
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Creating image:
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Need to copy 2013813 pages
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Normal pages needed: 2013813 + 1024, available pages: 14679007
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Image created (2013813 pages copied)
Sep 19 21:41:40 250g8 kernel: PM: hibernation: Basic memory bitmaps freed
Sep 19 21:41:40 250g8 kernel: PM: hibernation: hibernation exit
Sep 19 21:41:40 250g8 systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Sep 19 21:41:40 250g8 systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Sep 19 21:41:40 250g8 systemd[1]: Failed to start Hibernate.
Sep 19 21:41:40 250g8 systemd[1]: Dependency failed for System Hibernation.
Sep 19 21:41:40 250g8 systemd[1]: hibernate.target: Job hibernate.target/start failed with result 'dependency'.
Sep 19 21:41:40 250g8 systemd[1]: systemd-hibernate.service: Consumed 2.020s CPU time.

The hibernation actually worked  - you just resumed immediately and things went wrong there. Kinda. The log actually shows that the system was perfectly running til the next morning until you

Sep 20 10:13:56 250g8 systemd-logind[478]: Power key pressed short.
Sep 20 10:13:56 250g8 systemd-logind[478]: The system will power off now!
Sep 20 10:13:56 250g8 systemd-logind[478]: System is powering down.

Try that from the multi-user.target (2nd link below) and don't let the system sit there for hours - Greta does not approve tongue

What if you try to hibernate into a swapfile instead of a swap partition?

Offline

#38 2023-09-20 19:08:14

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

seth wrote:

The hibernation actually worked  - you just resumed immediately and things went wrong there. Kinda. The log actually shows that the system was perfectly running til the next morning until you

What if you try to hibernate into a swapfile instead of a swap partition?

Well, the user side symptoms where quite different:
-I commanded hibernation.
-The screen went black for about two seconds, for the desktop to then appear again - but without any mouse or keyboard functionality, like it was frozen. That's exactly what it did everytime befire, when trying with the internal swap partition. I did not do anything to this point, after starting hibernation.
Usually, when using the internal swap partition, it then goes black and powers off again after about 5 seconds.

But it did not this time, with the USB drive. Thus I let the system stay like this for about ten hours, as I thought it might be due to slow writes of the whole 64 GByte RAM to the USB drive,
Ten hours later it was in identical state - fulld esktop visible, but neither mouse nor keyboard working. IThen  shortly pressed the power button and it shut down.

So, if there was a 'working' hibernation, then it seems like the system was woken up immediately again after shutting down for hibernation (which is possible, as I have cinfigured all possible WoL criteria for example..) to then boot again - but with broken Keybord+Mouse. In result I think it's safe to say the system was not frozen during the ten hours of waiting, becaause otherwise it wouldn't have initiaed a soft shutdown after shortly pressing power.

I will try again using a faster UBS-SSD instead of the slow thumb drive and disable WoL in advance, because the obviously is another problem, before trying the internal SSD again.
If this works I will try using a swapfile internally which seems like the lesser chance to be working .. but I doubt the try usuing the USB-SSD will be any better anyway, as I don't see why the mouse and keyboard (USB?) problem should disappear sad

Last edited by Elmario (2023-09-20 19:08:30)

Offline

#39 2023-09-20 19:36:47

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

OK, I now did the following:
-Created a swap partition on a fast USB-SSD. Configured grub defaults to use the new swap for hibernation, and added the new swap partition to fstab using it's UUID.
-Reran my script for rebuilding initrd and grub.
-Disabled WiFi and WoL in the BIOS.
-Rebooted and checked if journal would show the new swap partition as in use for hibernation, and it did
-Disconnected the ethernet plug, disabled wifi and remove all USB-plugs besides the USB-SSD
-hibernated
And it did the same as always: Screen turned black and it seemingly powered off, but instantly came up again to then have even the USB-SSD it just had used for hibernation disabled. (The LED on the drive turned off and it wasn't available anymore for swap, which I could see using 'cat /proc/swaps', where the USB-SSD was then shown as 'deleted'

So it seems pretty much, that hibernation on this notebook has a problem with it's USB chips. Pretty annoying and sad, for a mainstream Intel chip, but how could I workaround this?
The USB problem most probably could also be the reason, why it automatically wakes up after hibernating, couldn't it?

Offline

#40 2023-09-20 19:54:49

seth
Member
Registered: 2012-09-03
Posts: 59,082

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

Hibernating to USB drives isn't something I'd frequently expect to work.
The more curious part is that you're not getting 'kernel: PM: Image not found (code -22)' with it - hence the idea to test a swap file.
You might also try the behavior w/ eg. the LTS kernel after fixing the hibernation configuration to have resume hook and kernel parameter hmm

Offline

#41 2023-09-20 20:04:02

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

I am just working on getting a swapfile to work for hibernation on a new ext4 partition on the internal SSD. Honestly setting up hibernation using a swapfile seems to be ... a painful procedure.. at least sad I am not fully sure which additional kernel parameters I need now and my head is slowly becoming dizzy ...

resume=/run/media/ladmin/swaps/swapfile resume=UUID=52a0852f-86b6-4cde-956c-bdf9714f495 resume_offset=4161536

Is this right?
I am not sure whether I need or should set the path to the file like this, or if this isn't even needed, because the examples on:
https://wiki.archlinux.org/title/Power_ … _hibernate
don't show this exactly, but a paragraph 4.3.1 below says:

'Hibernation into swap file

Using a swap file requires also setting the resume=UUID=swap_device_uuid and additionally a resume_offset=swap_file_offset kernel parameters. See the kernel documentation. '

And the word 'also' is confusing me here, because 'also' in this context mean 'in addition to'. But: in addition to what? There's no example given for a resume=xxx (without UUID or resume:_offset) for a swapfile.
That's why I madeup 'resume=/run/media/ladmin/swaps/swapfile' despite this not being shown in the examples above ..
Do I need this? Or would this lead to problems?

Last edited by Elmario (2023-09-20 20:27:20)

Offline

#42 2023-09-20 20:14:42

seth
Member
Registered: 2012-09-03
Posts: 59,082

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

https://wiki.archlinux.org/title/Power_ … _swap_file
You only need "resume_offset", resume is the UUID of the partition where the file is (instead of your swap partition) and you need to use  https://man.archlinux.org/man/btrfs-inspect-internal.8 to locate the file position on btrfs.

Offline

#43 2023-09-20 20:20:15

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

Sorry, I was thinking and editing very long about this .. could you please check the post above your's? smile


I am referring to this sentence:

Using a swap file requires also setting the resume=UUID=swap_device_uuid and additionally a resume_offset=swap_file_offset kernel parameters. See the kernel documentation. 

If this:

'resume=/run/media/ladmin/swaps/swapfile

is not needed there, then the word 'also' should urgently be removed from this wiki page, because it made me think there was something else needed, like this ..

And from what you just wrote, I take that it's not needed!?

Last edited by Elmario (2023-09-20 20:33:08)

Offline

#44 2023-09-20 20:32:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,303

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

the resume parameter needs to be present -once! - but it needs to reference your partition on which the swapfile is located, not the swapfile itself (the location of the swapfile is given by the resume_offset parameter), which is why it gives the example with UUID in the referenced wiki section. Examples "without" UUID would be resume=/dev/nvme1n1p1 and similar, but these can change so using something persistent like UUIDs is more reccommend

Last edited by V1del (2023-09-20 20:34:55)

Offline

#45 2023-09-20 20:35:23

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

V1del wrote:

the resume parameter needs to be present -once! - but it needs to reference your partition on which the swapfile is located, not the swapfile itself (the location of the swapfile is given by the resume_offset parameter), which is why it gives the example with UUID in the referenced wiki section.

Thank you!
The second part of what you said was clear - it was the first half that confused me - the question, if there might be a 2nd resume parameter needed pointing to the absolute path of the swapfile (which seems like an obvious thing for a non professional, especially when there's the word 'also', seemingly pointing out there might something else being needed).

Are you able to edit the wiki there? I think it would be better without saying 'also'.


I will now try this configuration:

resume=UUID=52a0852f-86b6-4cde-956c-bdf9714f495 resume_offset=4161536

( I intentionally created an additional ext4 partition with the swapfile on, for having it easier with the offset).

Last edited by Elmario (2023-09-20 20:39:10)

Offline

#46 2023-09-20 20:55:43

seth
Member
Registered: 2012-09-03
Posts: 59,082

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

I intentionally created an additional ext4 partition with the swapfile on, for having it easier with the offset

I hope it works, but the idea of the swapfile was to stay on the root partition because that has to stay the longest… hmm

Offline

#47 2023-09-20 20:57:45

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

Oh ... I wanted to you another partition for no risking file system damage in case of - whatever ia about to happen.I did not reboot, yet, since the changes, because I am just busy checking all USB devices including root hubs for power/wakeup being enabled. Soe where enabled, I disabled all..
I will now do the next try!

Offline

#48 2023-09-20 21:03:16

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

Well, it was the same as usual:

Sep 20 22:58:46 250g8 systemd[1]: Reached target Sleep.
Sep 20 22:58:46 250g8 systemd[1]: Starting Hibernate...
(I think that'S where the screesn goes black for two seconds)
Sep 20 22:58:47 250g8 kernel: PM: Image not found (code -22)
(I think it actually fails in writing to swap here!)
Sep 20 22:58:47 250g8 systemd-sleep[3894]: Entering sleep state 'hibernate'...
Sep 20 22:58:47 250g8 kernel: PM: hibernation: hibernation entry
(And that's where it shuts down)

I guess as I have a swapfile setup already  .. I can now go and create one on root .. reluctantly.

Last edited by Elmario (2023-09-20 21:04:30)

Offline

#49 2023-09-20 21:10:09

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

For some reason I cannot enable the swapfile on /

[ladmin@250g8 ~]$ sudo swapon /swapfile
swapon: /swapfile: swapon fehlgeschlagen: Das Argument ist ungültig

Of course I created it using fallocate and mkswap.
Isn't this possible on btrfs?

Edit: Well, yes. I read it's not possible on a btrfs filesystem with CoW enabled. One could create a new subvolume with Cow disabled.. but wouldn't this defeat the purpose of having it unmounted last?

Last edited by Elmario (2023-09-20 21:15:09)

Offline

#50 2023-09-20 21:27:28

Elmario
Member
Registered: 2023-08-21
Posts: 59

Re: SOLVED: Shutdown and hibernation make the drive disapper from BIOS

A new inspiration:
I ran the SSD vendor's (Transcend) tool 'SSD scope' on the Windows installation, just for checking if there was a new firmware.
There was no new firmware, but in the SMART tab I noticed an smart value named 'unsafe shutdowns' which was at 61.

I have read some forums about this, trying to find what exactly this means, but there was nothing conclusive, with speculations reaching from the nvme driver (on Windows) to issues with the SSDs' firmware (which happened to be Samsung SSDs instead of my Transcend..)

Maybe it's the system powering off, without telling the SSD it had to shutdown before?

Last edited by Elmario (2023-09-20 21:28:20)

Offline

Board footer

Powered by FluxBB