Published on

Steamdeck Swap File

If you try to run a large game that crashes the game/steam when trying to load, it could be because the linux swapfile is not large enough. I'm unsure the reason of this but below are the steps to take make it larger.

By default the SteamOS swapfile is 1gb in size. I increased mine to 4gb but you can try smaller first to see if that fixes your crashing problem.

These steps requires a root password to be setup, if you have not already created a root password do that first.

The swapfile is located on the /home directory. Open a terminal at the /home directory and follow these commands.

Remove read only

sudo steamos-readonly disable

Stop swap processes

sudo swapoff -a

Increase the file size

sudo dd if=/dev/zero of=swapfile bs=1G count=4

Make it a swap file again

sudo mkswap swapfile

Activate the swap

sudo swapon swapfile

Check if you have 4gb of swap with

grep SwapTotal /proc/meminfo

More Details