Intentional delay to fix desync in csgo using Netem in OpenWRT

Everything about latency. This section is mainly user/consumer discussion. (Peer-reviewed scientific discussion should go in Laboratory section). Tips, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
dermodemon
Posts: 134
Joined: 10 Aug 2023, 12:03

Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by dermodemon » 10 Aug 2023, 12:11

Hello guys.
My goal is to fix bad desync in csgo.
I use vpn to make a little bit of delay(it's SOO much better than without vpn) but i decided to stop using it.
I update my firmware on the router to OpenWRT. Installed SQM, Netem etc.
In the command line i put:

tc qdisc add dev eth0 root netem delay 2ms

Now my ping results are floating. Instead of stable 3ms(1ms+2ms) i have something like this:
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=4мс TTL=64
Reply from 192.168.1.1: bytes=32 time=9мс TTL=64
Reply from 192.168.1.1: bytes=32 time=7мс TTL=64
Reply from 192.168.1.1: bytes=32 time=10мс TTL=64
Reply from 192.168.1.1: bytes=32 time=6мс TTL=64
Reply from 192.168.1.1: bytes=32 time=11мс TTL=64
Reply from 192.168.1.1: bytes=32 time=6мс TTL=64
Reply from 192.168.1.1: bytes=32 time=9мс TTL=64
Reply from 192.168.1.1: bytes=32 time=5мс TTL=64
Reply from 192.168.1.1: bytes=32 time=6мс TTL=64

My question is how to make it more stable. And overall am i doing all of this right?
How to configure only outbound or inbound packets? How does it works :D

KingAzar
Posts: 117
Joined: 28 Dec 2022, 00:54

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by KingAzar » 25 Aug 2023, 23:00

When I used to have a small router with no option to configure much, I was using Clumsy where the lag is created directly from my pc
2023-08-25 21_57_14-.png
2023-08-25 21_57_14-.png (90.18 KiB) Viewed 7624 times
Then I built my own Router Firewall which is more powerful and did it directly from the network
2023-08-25 21_58_20-Shaper _ Firewall _ Popoland.localdomain and 7 more pages - Personal - Microsoft.png
2023-08-25 21_58_20-Shaper _ Firewall _ Popoland.localdomain and 7 more pages - Personal - Microsoft.png (33.45 KiB) Viewed 7624 times
The reason why yours is not stable is probably your router is probably not powerful enough to maintain. Try Clumpsy

dermodemon
Posts: 134
Joined: 10 Aug 2023, 12:03

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by dermodemon » 26 Aug 2023, 13:49

hey, where can i change these firewall settings? is it built in your router? or this is windows program?

dermodemon
Posts: 134
Joined: 10 Aug 2023, 12:03

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by dermodemon » 26 Aug 2023, 14:06

Am i doing it right? want to add 20ms delay
Attachments
Untitled.png
Untitled.png (77.97 KiB) Viewed 7451 times

KingAzar
Posts: 117
Joined: 28 Dec 2022, 00:54

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by KingAzar » 26 Aug 2023, 20:53

Do you have Codel instead of Cake to manage your queueing?

KingAzar
Posts: 117
Joined: 28 Dec 2022, 00:54

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by KingAzar » 26 Aug 2023, 21:05

dermodemon wrote:
26 Aug 2023, 13:49
hey, where can i change these firewall settings? is it built in your router? or this is windows program?
I did build my own router, what I did I bought a cheap factor computer (used) with a CPU that can easily handle a 1Gbps fibre connection, well Mine can handle up to 10Gbps easily but I also to make sure to check on the power consumption. Anyway, I have a Core i5 6500 with 8 GB of ram. The little pc did cost me $120 which is way more than those "GAMING ROUTER" and coupled with OPNsense (similar idea as OpenWrt) it's a little beast.
1077071024.jpg
1077071024.jpg (107.41 KiB) Viewed 7335 times
2023-08-26 20_02_02-Dashboard _ Lobby _ Popoland.localdomain - Personal - Microsoft​ Edge.png
2023-08-26 20_02_02-Dashboard _ Lobby _ Popoland.localdomain - Personal - Microsoft​ Edge.png (124.31 KiB) Viewed 7335 times

triplese
Posts: 130
Joined: 13 Dec 2021, 12:20

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by triplese » 27 Aug 2023, 09:43

Queue's delay parameter actually not delaying packets :mrgreen:
Here is man for fq_codel:
https://man7.org/linux/man-pages/man8/t ... del.8.html
more details in human readable format for noobs:
https://www.geeksforgeeks.org/controlle ... iscipline/
how AQM works:
https://openarchive.nure.ua/server/api/ ... 62/content

Same for any queueing mechanism - its not delayer but parameter for packet dropping, so messing with this parameters without knowledge can lead to packet drop.

For actually delaying packets you need netem module.

P.S. you can only control egress packets

cursed-gamer
Posts: 239
Joined: 16 Aug 2023, 13:07

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by cursed-gamer » 27 Aug 2023, 09:53

Guys it's all on ISP side but be prepared that they gonna pretend like dumbs and ask you for speedtest. It's all about congestion control and UDP traffic handling. By looking how the game behaves it is so obvious because it's being extrapolated all the time.

dermodemon
Posts: 134
Joined: 10 Aug 2023, 12:03

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by dermodemon » 27 Aug 2023, 12:54

KingAzar wrote:
26 Aug 2023, 20:53
Do you have Codel instead of Cake to manage your queueing?
yeah i have something like that
Attachments
Untitled.png
Untitled.png (8.16 KiB) Viewed 7133 times

wilkN
Posts: 11
Joined: 02 Aug 2023, 02:56

Re: Intentional delay to fix desync in csgo using Netem in OpenWRT

Post by wilkN » 28 Aug 2023, 01:36

Is there any recommended intentional delay that fixes desync in csgo?

Post Reply