Steam Deck

Steam Deck

winnie Jul 14, 2023 @ 11:51am
How to disable swap file?
I have successfully created SWAP partition, ad StemOS automatically enables it on boot, so I don't need swap file no more, but it keeps auto creating and enabling it.
< >
Showing 1-1 of 1 comments
Ludensius Jan 14, 2024 @ 6:39am 
Late answer but maybe still useful.
You normally can't deactivate this behavior without changing the files which are on the read-only steamos partition. And next update will override this again.
But with this dirty trick you can still do it:

sudo swapoff /home/swapfile sudo rm /home/swapfile sudo touch /home/swapfile
This will stop the swapfile. Do this when system is idle or it will take some time.
Then delete the swapfile and create a empty file.

During boot systemd will check for the existence of the swapfile and creates a 1G file if it does not exist. With the empty file none is created. But the empty file can't be used for swap.

BTW: is you use a swap partition, for what ever reason it is automatically used during next boot without change in /etc/fstab. This a non standard behavior. Seems to be a feature of systemd to auto mount swap partitions if they are not marked as "Do not mount"
Last edited by Ludensius; Jan 14, 2024 @ 7:17am
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: Jul 14, 2023 @ 11:51am
Posts: 1