Stem Deck: Easy tweak for better performance, from memory hungry games.
with a few simple commands in desktop mode you could see snappier performance by increasing your swap file size.
Before diving in…
Things you’ll need to know in order to get this done.
How to get switch to desktop mode.
you’ll need to have set a root password for your user account.
Steam Deck: How to set a Root password in SteamOS 3.x (Check this guide if you need help with this step)
an ability to follow instructions.
Things that are helpful to have but not entirely needed.
A keyboard.
A mouse.
What this tweak will accomplish.
smooth out performance… I’m not promising more FPS but in my testing, I’ve noticed FPS having higher lows.
Here’s a quick primer on why this helps
The steam deck has 16 GB (gigabyte) of DDR5 RAM which is a decent amount and more than enough for most games and apps however, thats not the full story and there is some behind the scenes tech wizardry going on.
The 16 GB is shared between the CPU and the GPU so that means that the steam deck has to decide some of that ram to the GPU, by default it dedicates 1 GB out of the 16 GB it has to the GPU (that’s not a lot) but the GPU has permission to use up to 8 GB of that 16 GB leaving the CPU with anywhere between 8GB and 15 GB to do its thing.
Why does this matter?
See the CPU does CPU things and the GPU does GPU things and the more ram the GPU needs the less the CPU has available to work with, and current & new games are getting more and more RAM hungry with larger texture files etc., it leaves less ram for the CPU to do things like creating crowds, tracking things like what NPC’s might be doing off screen, etc.
so how do we overcome that limitation?
We use the internal SSD as faux ram whats great about this is that the Steam Deck already does this by default!
Our aim here is to increase the default swap size from 1GB (gigabyte) to something larger like 4 or 6 GB or more allowing our memory hungry games to have as much as they want.
Let’s get to the tweaking
Mozy on over to desktop mode and launch Konsole so we can start giving the steam deck some commands.
now that you konsole open you should see the command line by default it opens up to your “Home” directory thats what the “~” symbol means.
(deck@steamdeck ~)$let’s drop some commands now!
First you want to move up a directory so type “cd ..” this is a case sensitive OS so it’s important to type it in exactly as shown and dont forget the space between “cd” and “..”.
(deck@steamdeck ~)$ cd ..Notice the command line has changed from “~” to “home”
(deck@steamdeck home)$let’s make sure the swapfile is in this folder, use this command “ls -lah” to show the contents of the folder
(deck@steamdeck home)$ ls -lahYou should be looking for a file called “swapfile” if it’s there, then you are golden and ready to go.
(deck@steamdeck home)$ ls -lah
total 11534384
drwxr-xr-x 5 root root 4.0k Dec 5 05:45 .
drwxr-xr-x 1 root root 150 Dec 5 08:47 ..
drwx------ 23 deck deck 4.0k Dec 13 10:39 deck
drwx------ 2 root root 16.0k Dec 5 05:15 lost+found
drwxr-xr-x 3 root root 4.0k Dec 5 05:45 .steamos
-rw------- 1 root root 1G Dec 5 08:53 swapfile
(deck@steamdeck home)$Time to take the kid gloves off, now this is the point where it starts to get dangerous…
Assuming everything checked out so far, we can now get to the good parts, Enter in this command “sudo steamos-readonly disable” this will allow you to makes the changes you need and because this is the first time you are using “sudo” it’s going to ask you for your password.
(deck@steamdeck home)$ sudo steamos-readonly disable
[sudo] password for deck:Before we modify the swap file, we need to turn it off.
(deck@steamdeck home)$ sudo swapoff -aThis next command will modify the swap file size since this will take some of your internal SSD drive space if you have a 64GB deck it might be wise to be conservative here and stick with 4GB but if you have more internal storage space then you could go higher something like 8GB.
You want more? then change the 4 to the ammount you want.
(deck@steamdeck home)$ sudo fallocate -l 4G /home/swapfileTurning swap back on, almost done.
(deck@steamdeck home)$ sudo swapon /home/swapfileChecking to make sure that the changes are active
(deck@steamdeck home)$ grep SwapTotal /proc/meminfo
SwapTotal: 4194304 KB Swaptotal will show up in kilobytes so as long as you see a number that starts the number you picked with the “fallocate” command you should be good to go.
You’ve made it! this is the last step. turn on readonly mode and reboot back in to gaming mode.
(deck@steamdeck home)$ sudo steamos-readonly enableCongrats!!!! you’ve done it, now all that’s left is to play some games or to make MORE tweaks to your Steam Deck.
so maybe check out the guide on how to increase the dedicated GPU Ram now that you have more memory to play with.


