Score:0

system slow after hibernation, it seems like files dont transfer back to RAM

sg flag

i have my main ubuntu OS on a SSD and a swap partinion on HDD. Whenever I boot from hibernation, everything is slower, lags, and for example if i open new chrome windows or even alt+tab to another app , i hear my HDD spinning , making noises. So it seems the files dont transfer back to RAM after hibernation?

swapon -s gives me this:

Filename                Type        Size    Used    Priority
/dev/sdb2             partition  16963580           1461736-2
paladin avatar
kr flag
How much RAM do you have and how big is you SWAP partition?
sg flag
@paladin my RAM is 8gb and swap partition 16gb, i think it's more than enough.
paladin avatar
kr flag
Please do a `swapon -s` in a terminal and tell us what this command tells you.
sg flag
Filename Type Size Used Priority /dev/sdb2 partition 16963580 1461736-2
Score:2
us flag

RAM is much faster than swap. It may happen that after hibernation, not all memory is being copied back to RAM from swap.

Run the command sudo swapoff -a && sudo swapon -a to transfer the memory in swap to RAM, and then turn swap on again.

paladin avatar
kr flag
I agree to Archisman, but usually a hibernating process works like all the RAM is copied into SWAP and at a reboot all the former copied RAM within SWAP is copied back to RAM.
sg flag
I wonder can this command be automatically run whenever the system comes from hibernation?
us flag
@slawckaJS I don't know how to do that.
paladin avatar
kr flag
It's possible via systemd targets, but I don't recommend it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.