Skip to content

Instantly share code, notes, and snippets.

@FikriRNurhidayat
Last active February 26, 2025 16:12
Show Gist options
  • Save FikriRNurhidayat/ce18426ad94fff2140538c0adf0e06ec to your computer and use it in GitHub Desktop.
Save FikriRNurhidayat/ce18426ad94fff2140538c0adf0e06ec to your computer and use it in GitHub Desktop.
Steam Download Speed Issue on Linux

Steam Download Speed is so slow on Linux

Oh boi, here I give you the solution for that. This document is based on these links:

TLDR

My solution seems to be deprecated, there are other solution from the comment on this Gist, that actually works. So, please use that instead, it's way much simpler, and it works. https://gist.github.com/FikriRNurhidayat/ce18426ad94fff2140538c0adf0e06ec?permalink_comment_id=4806133#gistcomment-4806133

Why is it slow?

I don't know, perhaps the Steam application doesn't cache the dns locally or something hence your computer will always lookup for the domain everytime you download it on each chunks. CMIIW.

Here's how you solve it

dnsmasq

This is a binary that will act as DNS server on your local machince, so whenever your machine want to know what google.com is, we will talk to this software then, they will look it up for you and save it to the local cache.

Install dnsmasq

First you need to install dnsmasq.

Arch Linux
sudo pacman -S dnsmasq
Debian
sudo apt install dnsmasq

Configure dnsmasq

After that edit /etc/dnsmasq.conf

# Tell which address should dnsmasqd listen 
listen-address=127.0.0.1

# Tell dnsmasq to not read /etc/resolv.conf
# since it will only contain itself anyway
no-resolv 

# Which port will dnsmasq run
port=0 

# Outside world nameserver,
# so when the dnsmasq don't know what domain it is,
# it will talk to 1.1.1.1 and save the answer to locally
server=1.1.1.1 

# I believe this is Google Nameserver
server=8.8.8.8
server=8.8.4.4

Network Manager

network-manager is a service that will run on systemd, it handles everything about the networking on your local machine.

The only thing that you need to configure on this service is just the dns entry. Edit this /etc/NetworkManager/NetworkManager.conf, don't forget edit it with sudo privileges. Add this following line:

[main]
dns=dnsmasq

Those line will tell network manager to use dnsmasq as dns. And it will automatically start the dnsmasq service everytime NetworkManager started.

Finally

Restart your network manager service.

sudo systemctl restart NetworkManager

Wait for a while. Then try to download it again, it may takes time to actually be on normal speed, since your local machine will lookup for a lot of address on Steam CDN/Repository.

@AmyTazenda
Copy link

AmyTazenda commented Feb 9, 2025

I tried the newer solution with the steam_dev.cfg and it didn't make any difference whatsoever, but your solution made a huge difference. Thanks for the help :)

@SolakkaSilakka
Copy link

For me the steam_dev.cfg edit didn't help either, but setting up dnsmasq did.
My problem was fluctuating download speeds, it was jumping between 5 and 60 megabytes per second.
With dnsmasq, stable 73 megabytes.

@blakeridgway
Copy link

It does appear to be dependent on how your ISP handles their caching on your DNS as well rather or not the steam_dev.cfg file works or the dnsmasq works.

Sadly it doesn't appear to be a one size fits all solution.

@Wolfnut88
Copy link

Stopping by to say that steam_dev.cfg didn't help but dnsmasq changes did. I'm new to Linux and just installed EOS after trying Bazzite. The latter would to download at full speed but the former required the fix listed above. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment