Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • 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.

@TheJrBiscuts
Copy link

TheJrBiscuts commented Jul 8, 2023

any clues on what to do if this doesnt work?
linux mint 21.2 user

@Ailadir
Copy link

Ailadir commented Sep 13, 2023

For myself it worked without any changes in NetworkManager.conf and with one change in dnsmasq.conf: listen-address=127.0.0.1.
After that I used two commands:
sudo systemctl restart dnsmasq.service
sudo systemctl restart NetworkManager
Pause-start download in steam and all fixed

@P6g9YHK6
Copy link

image
Noticeable improvement on service restart

@TobberH
Copy link

TobberH commented Nov 12, 2023

Sad to say, this did nothing at all to fix or change the speed cap I get downloading from Steam on Linux. I'm pretty sure this is not a DNS problem.

@blakeridgway
Copy link

Try this...

https://wiki.archlinux.org/title/steam#Disable_HTTP2_for_faster_downloads

Native Installs:
Edit/Create this file: ~/.steam/steam/steam_dev.cfg

Put in the following two lines and restart Steam:
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0
If you are using Flatpak use this file path:
~/.var/app/com.valvesoftware.Steam/.steam/steam/steam_dev.cfg

Put in the following two lines and restart Steam:
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0

Before the change to the file:
image

After the change:
image1

@igrmm
Copy link

igrmm commented Dec 25, 2023

Try this...

https://wiki.archlinux.org/title/steam#Disable_HTTP2_for_faster_downloads

Native Installs:
Edit/Create this file: ~/.steam/steam/steam_dev.cfg

Put in the following two lines and restart Steam:
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0
If you are using Flatpak use this file path:
~/.var/app/com.valvesoftware.Steam/.steam/steam/steam_dev.cfg

Put in the following two lines and restart Steam:
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0

Before the change to the file: image

After the change: image1

perfect! getting max speed now!

@hengamer03
Copy link

Hello,

Ive followed the steps above,

Ive now tried dnsmasq, disabling IPv6, adding the steam_dev.cfg file with the two lines mentioned above, and yet my download speeds platau around 130 Mbps

Downloading on Windows Hover it shoots up to 300Mbps.

To note, i am running a dual booted machine and my theory is that there is something going on here, but i dont know for certain.

Any more tips around this would be greatly appreciated.

@hengamer03
Copy link

hengamer03 commented Dec 31, 2023

Hello again,

Aparently a reboot wasnt enough, but this morning after booting up my pc, i noticed steam downloads being good.

Meaning that the solutions mentioned here work!

@behindsecurity
Copy link

Try this...

https://wiki.archlinux.org/title/steam#Disable_HTTP2_for_faster_downloads

Native Installs:
Edit/Create this file: ~/.steam/steam/steam_dev.cfg

Put in the following two lines and restart Steam:
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0
If you are using Flatpak use this file path:
~/.var/app/com.valvesoftware.Steam/.steam/steam/steam_dev.cfg

Put in the following two lines and restart Steam:
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0

Before the change to the file: image

After the change: image1

Awesome, it worked for me. Thank you!

@AlanMauricioC
Copy link

@blakeridgway thanks! that actually worked for me!

@eode
Copy link

eode commented Jan 19, 2024

@blakeridgway thanks, your comment worked for me.

@christianKossmann2741
Copy link

Thanks, for some reason all other solutions did not work, this was the only one that worked

@blakeridgway
Copy link

I have since made a repo for the fix.
Will be working on a script to be able to run that will autodetect the file path of the Steam install and place the steam_dev.cfg file in it.

https://github.com/blakeridgway/linux_steam_download_fix

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