Optimizing the Steam Deck

Posted on:January 1, 2024 at 06:29 AM

So I got the Steam Deck recently to reward myself for a great 2023, and wanted to document my journey customizing and optimizing the Steam Deck.

Why?

While there have been new competitors such as the ROG Ally and the Legion Go that have been introduced to the market, the Steam Deck has been a much more popular choice due to it’s first class support for Steam Games, and lack of jankiness that comes coupled with Windows.

Another reason why the OLED refresh has been much more popular is the battery life and general community support for it compared to it’s alternatives. I think this is also why I chose it despite the alternatives being significantly cheaper here in Singapore.

However, a big complaint was that the Steam Deck ships with a really outdated Zen 2 custom SoC, compared to the Z1 on the other machines, which provide much better performance. While this is true that OOTB, the Steam Deck is significantly poorer in performance, this does not have to be the case. The Steam Deck ships with quite sane defaults, but if you know what you are doing as an enthusiast, you can significantly boost performance, and more importantly, battery life.

Here are some of my overarching thoughts:

On the Operating System

On Optimizations:

Benchmarks

Tweaks

ABT’s SteamOS Optimizations

cat << EOF | sudo tee /etc/systemd/system/cpu_performance.service
[Unit]
Description=CPU performance governor
[Service]
Type=oneshot
ExecStart=/usr/bin/cpupower frequency-set -g performance
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable cpu_performance.service
cat << EOF | sudo tee /etc/tmpfiles.d/mglru.conf
w /sys/kernel/mm/lru_gen/enabled - - - - 7
w /sys/kernel/mm/lru_gen/min_ttl_ms - - - - 0
EOF
cat << EOF | sudo tee /etc/security/limits.d/memlock.conf
* hard memlock 2147484
* soft memlock 2147484
EOF
cat << EOF | sudo tee /etc/udev/rules.d/64-ioschedulers.rules
ACTION=="add|change", KERNEL=="nvme[0-9]*", ATTR{queue/scheduler}="kyber"
ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="kyber"
EOF
sudo sed -i -e '/home/s/\bdefaults\b/&,noatime/' /etc/fstab
sudo sed -i 's/\bGRUB_CMDLINE_LINUX_DEFAULT="\b/&mitigations=off nowatchdog nmi_watchdog=0 /' /etc/default/grub
sudo grub-mkconfig -o /boot/efi/EFI/steamos/grub.cfg

ABT’s Steam Deck mods

And to uninstall:

sudo systemctl disable cpu_performance.service
sudo rm /etc/tmpfiles.d/mglru.conf
sudo rm /etc/security/limits.d/memlock.conf
sudo rm /etc/udev/rules.d/64-ioschedulers.rules
sudo sed -i -e 's/,noatime//' /etc/fstab
sudo sed -i -e 's/mitigations=off nowatchdog nmi_watchdog=0 //' /etc/default/grub
sudo grub-mkconfig -o /boot/efi/EFI/steamos/grub.cfg

Uninstall ABT’s Mods

Cryo’s Steam Deck Utilities

GitHub - CryoByte33/steam-deck-utilities: A utility to improve performance and help manage storage on Steam Deck.

This is another one click install via the .desktop link to modify to swap space of the deck.

Undervolting

This is another really simple modification since this has been now built into the BIOS. We simply hold down the volume up button with the power to boot into BIOS. I’ve applied a 20mv undervolt to everything, as I feel like that is the sweet spot for me. Performance may vary though.

Customization

Next, I wanted to install software and support that isn’t on the default SteamOS. In particular, Emudeck and Nix are both must-haves in my opinion to set up an optimal Steam Deck experience.

Emudeck Installation

Emudeck installation is another simple point and click adventure: simply download the .desktop file and let it do its thing. We’ll need to then install the firmware and keys, which is a simple google search away.

Results

With the already improved battery life from the OLED model, coupled with optimizations and undervolting, I could easily get 4-6 hours depending on the Deck, with a 10w TDP limit with almost no stuttering, which is absolutely insane to me.

This machine will probably be a must keep for any linux gamer.