Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
Created July 16, 2020 03:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pythoninthegrass/70106e5203e3375cb1cf5bd3f59b467f to your computer and use it in GitHub Desktop.
Save pythoninthegrass/70106e5203e3375cb1cf5bd3f59b467f to your computer and use it in GitHub Desktop.
`ethtool` script to mitigate Plex buffering specifically on LAN with direct play
#!/usr/bin/env bash
# SOURCES
# https://forums.plex.tv/t/massive-buffering-solved/155491/11
# https://serverfault.com/a/779496
# USAGE
# vim /etc/NetworkManager/dispatcher.d/21-ethtool
# sudo chmod 751 /etc/NetworkManager/dispatcher.d/21-ethtool
# chown root:root /etc/NetworkManager/dispatcher.d/21-ethtool
# VERIFY
# $ sudo systemctl status NetworkManager-dispatcher
# $ ethtool -k enp3s0
# tx-checksumming: off
# scatter-gather: off
# tcp-segmentation-offload: off
device='enp3s0'
if [ "$1" = "${device}" ] && [ "$2" = "up" ]; then
/sbin/ethtool --offload ${device} tso off sg off tx off
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment