On 02-17-2024 12:32PM, Carlos E. R. wrote:
On 2024-02-17 19:15, -pj via openSUSE Users wrote:
On 02-17-2024 12:02PM, Carlos E. R. wrote:
On 2024-02-17 18:37, -pj via openSUSE Users wrote:
On 02-17-2024 07:06AM, Carlos E. R. wrote:
On 2024-02-17 06:58, -pj via openSUSE Users wrote:
On 02-16-2024 11:21PM, Masaru Nomiya wrote:
> [...] > > The swap size is too small. > As it is too small, it will lockup under stress. > If you want to use hibernate, the swap size should be at least 12GB > (8x1.5). > So, create a swap file.
So basically expand system-swap lvm for suspend to 12 GB
For hibernate, not for suspend.
If you don't hibernate, then swap is not needed (yet)
I would like to be able to use the hibernate feature also.
Ah.
Well, then you need swap to be a bit bigger than your used RAM size.
I think you can add two swap areas; but for recovering the kernel only uses one, the one that is cited in the kernel boot line.
A while ago you had:
BOOT_IMAGE=/boot/vmlinuz-6.7.4-1-default root=/dev/mapper/system-root resume=/dev/system/swap nosimplefb=1 splash=0 plymouth.enable=0 mitigations=auto i8042.nomux=1 i8042.reset i8042.noloop=1
So you have to change that "resume=..." section.
Hum, you like is strange to me, I don't know what /dev/system is.
I think /dev/system/swap is the LV the way the block device communicates with it. I believe that was in there when the OS was initially installed.
I have not changed "resume=..." section. I have not even removed any "i8042..." entries yet either. Please see the current output: - # cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-6.7.4-1-default root=/dev/mapper/system-root resume=/dev/system/swap nosimplefb=1 splash=0 plymouth.enable=0 mitigations=auto i8042.nomux=1 i8042.reset i8042.noloop=1 -
Ok, you have simply enlarged the previous swap space, so it should work. There is no references to uuids or labels.
Notice that swap has no effect on your power-off problem.
I am noticing that swap has no effect on my power-off problem.
(this is why machine is jamming up sometimes lately)? Can I leave the *btrfs filesystem* in system-root expanded 100% (as is now) and shrink system-root lvm then expand system-swap lvm? Any benefits to make system-swap 20GB not only 12GB? - Also create a 12 GB swapfile in order to use hibernate otherwise hibernate will never work?
I prefer a swap partition, but if the disk is already partitioned, I understand a swapfile will do. But then the existing swap space will be superfluous.
I didn't want to take the route described in the following link here yet if possible: https://linuxize.com/post/create-a-linux-swap-file/#:~:text=How%20to%20add%2...
Check out what I have done as follows please:
I'm not an expert on btrfs or lvm, sorry.
1. # btrfs filesystem resize -9g / Resize device id 1 (/dev/mapper/system-root) from 924.98GiB to 915.98GiB -
...
- 7. Note how swap is now displayed at 15.5G in size.
Yes, I did.
Please note that 'free -m' output displays only what appears to be the previous swap size. I just noticed this.
Huh?
[...]
Right, you need to call "mkswap" on the device.
Disable swap, run mkswap on it, enable swap.
I am very glad you responded to this above. I have never done this before (enlarging swap). I see in 'man swap' the following might accomplish this. 1. # swapoff -all - passing: lsblk -f -> system-swap swap 1 e736498b-60e5-4f99-99c2-8a6850a78ca9 [SWAP] I see in 'man mkswap' the following may be what I am looking for to enlarge the actual swap file. 2. # mkswap --uuid e736498b-60e5-4f99-99c2-8a6850a78ca9 /dev/system/swap - Then enable swap partition again. 3. # swapon /dev/system/swap - What will happen if no "uuid" is specified in mkswap? Does this look correct to you what I am considering to do above? I do not believe that a new uuid needs to be generated by default. .....
# free -m total used free shared buff/cache available Mem: 7693 5655 350 130 2076 2037 Swap: 6671 10 6661
- 8. I believe that it may not have been necessary to pass the following at all: # btrfs filesystem resize -9g / -
I can't say.
9. Do you have any recommendations on setting the machine up for hibernation?
It either works or not :-)
:| Ok.
When hibernation fails, there is little one can do, short of dancing around the computer with a magic wand and incense sticks.
Ok, no, there are things one can do, but after it fails.
...