diff --git a/scripts/99-punktfunk-net.conf b/scripts/99-punktfunk-net.conf new file mode 100644 index 0000000..c15ad04 --- /dev/null +++ b/scripts/99-punktfunk-net.conf @@ -0,0 +1,11 @@ +# Larger UDP socket buffers for clean 4K/5K streaming. +# +# A single high-resolution frame is a burst (a 5120×1440 keyframe is ~130 packets sent at once), +# which overflows the Linux default (~208 KB) — dropping packets and, under infinite-GOP, freezing +# the client decode on one frame. punktfunk requests 8 MB SO_SNDBUF/SO_RCVBUF, but the kernel +# clamps to these caps; raise them on the HOST for send-side headroom (the host logs a warning +# when the grant is small). macOS clients need no tuning (their default cap is already multi-MB). +# +# Install: sudo cp scripts/99-punktfunk-net.conf /etc/sysctl.d/ && sudo sysctl --system +net.core.wmem_max = 8388608 +net.core.rmem_max = 8388608 diff --git a/scripts/punktfunk-steam-session.service b/scripts/punktfunk-steam-session.service index d218e65..8d66ac3 100644 --- a/scripts/punktfunk-steam-session.service +++ b/scripts/punktfunk-steam-session.service @@ -10,6 +10,7 @@ # sudo loginctl enable-linger $USER # user services run without a graphical login # sudo systemctl set-default multi-user.target # don't auto-start the local gaming session # sudo systemctl isolate multi-user.target # stop it now (or reboot) +# sudo cp scripts/99-punktfunk-net.conf /etc/sysctl.d/ && sudo sysctl --system # big UDP buffers (4K/5K) # # Install: # mkdir -p ~/.config/systemd/user && cp scripts/punktfunk-steam-session.service ~/.config/systemd/user/