Score:1

How to create swap partition during Ubuntu Desktop 22.04.1 LTS installation?

tw flag

I have been distro hopping for a month (on a laptop with Ryzen 5 5500U 2x8 GB RAM) and I have noticed that none of the Linux distros are good at battery saving when left ON with no foreground applications running for a whole night. That is, system only is running and still the battery drains quite heavily although Linux is popular for being lightweight.

Windows on other hand goes to sleep (maybe hibernates; I don't know the exact term) and saves battery a lot!

With a little bit of research I concluded that the solution came down to using a swap partition. I've always thought any distro would use swap by default. Turns out I should specifically create a swap partition during installation and manually enable it post installation to actually use sleep/hibernation (I don't know the exact term).

Now the thing is my workload is quite low. I have 16 GB of RAM installed. The reason to not use swap for me is that I would never get a workload that fills up 16 GB of RAM. But now that lack of swap is creating battery issues, I'm considering using swap.

Please enlighten me with the correct way to create a swap partition during installation of Ubuntu desktop 22.04.1.

Pilot6 avatar
cn flag
I can't see relation between using swap and a battery. Ubuntu creates a swap file by default. It can be used the same way as a swap partition. So the question is unclear.
I sit in a Tesla and translated this thread with Ai:

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.