Recently (past two weeks or so) it has begun to take about a literal 10-15 minutes for my desktop to turn off after selecting hibernate. After clicking the hibernate button, the screen goes black for a few seconds and then comes back on displaying the screen with the menu open and the mouse pointer on the hibernate button, but mouse movement is not detected. That seems normal but it stays like that for the rest of the time.
And the last few days it also takes about the same time to start from hibernation; for it stays on the message about the hibernation image most of that time. However, after it completes, everything appears to work fine.
When I shutdown and restart, it starts much quicker; but, after working a while, will be slow to hibernate. I think it hibernates quickly if I do so immediately after reboot, just to test.
Iâm using stable branch, 6.15 kernel, and KDE.
Any idea where I might begin to look to try and identify why this started?
Thanks. I donât think so. I keep System Monitor open always and usually memory is under 5GiB; total is 32. It has SSD and I havenât noticed anything running slow once it starts.
Donât you think it makes sense to check it before hibernation?
It is quite normal to have cache here. Even if you drop the cache. It will be filled up again after time. The cache is used to reduce I/O and improved responsiveness.
Thanks. I didnât know if this cache was an ever-growing item or an allocated space.
In your example of 5GiB with 20GiB cached, how does that relate to the swap size? Is that disk space where the data from hibernate is written. What happens if the cache exceeds the swap? I set the swap at 16GiB when installing Manjaro.
Well, Iâll have to see what the cache is after I finish working. I use SQLite and Tcl in the CLI a lot. Perhaps I need to exit the CLI session for them before hibernating, since SQLite caches many things also; but I donât know where SQLite caches themâin RAM or a temporary on-disk file.
If I free -h and see a large cache and then close any Konsole sessions running SQLite, I suppose that memory will be released and another free -h will show that before hibernating.
Cache/Buffer will never be dropped to a swap disk/file. It will be freed up, when more RAM gets allocated.
Well, you have 32GB RAM and 16GB SWAP. After time, you will not be able to hibernate, since there have to be written a full image. If Linux decides to drop RAM pages to the SWAP, then this will add up to the image.
32GB + swapped space (e.g. 2GB) = 34GB. You would at least theoretically need 36GB of swap space, since it writes an entire image of the 34GB, not just 32GB, because the swapped 2GB count as âinactiveâ RAM. You can drop cache plus deactivate and activate swap to mitigate the problem, but more swap space would be the easy solution.
Since you can possibly have a lot of RAM usage, 64GB swap would be very well-equipped. But at least 1.5x32GB = 48GB, if Hibernation is really what you need.
I would recommend reading this to improve the swap problem:
IT appears to be the kernel. I ave discovered that kernels 6.12, 6.13, and 6.14 hibernate in about 18 seconds on my machine. With exactly the same apps, same desktop, same everything other than kernel the 6.15 and 6.16 kernels take 2 minutes and 11 seconds. It appears from the logs that they save off many more pages of memory, but I see no reason WHY and I am unsure that would explain the difference.
Thank you. Thay may be the case; for I have not experienced this before started using kernel 6.15 and have not changed the applications I use or the way Iâve been using them.
Iâll have to try and compare the two. I booted under kernel 6.12 for yesterdayâs work and when I hibernated the system and restarted about eight hours later netiher had the delay I posted. However, I didnât do quite as much database work; so, itâs not exactly a fair comparison if that has an impact.
I havenât had time (and likely donât have the ability) to identify the underlying issue if there is one; however, since booting under kernel 6.12 instead of 6.15 (on stable branch), I have not experienced a single delay hibernating/awaking these past three weeks.
My experience has been that hibernation delay appears on kernel 6.17, 6.16, and 6.15. No unusual delay appears on 6.14, 6.13, 6.12, or earlier available kernels. I think this one might be for the kernel team.