Hardware-Specific Optimizations
AMD Graphics
For AMD GPU users on Windows, enabling Enhanced Sync in AMD’s graphics settings can help reduce latency by an additional frame.This optimization applies to both
amfenc (AMD’s hardware encoder) and libx264 (software encoder) configurations.How to Enable Enhanced Sync
NVIDIA Graphics
For NVIDIA GPU users, enabling Fast Sync in NVIDIA Control Panel can help reduce streaming latency.How to Enable Fast Sync
Network Optimization
Testing Network Performance
For real-time game streaming, network stability and consistency (low latency with minimal variance) are more important than pure bandwidth. Use iPerf3 to test your network: On the Sunshine host:Watch for packet loss (should be < 5%) and jitter (should be < 1 ms). For Android clients, use PingMaster. For iOS, use HE.NET Network Tools.
Addressing Packet Loss
Buffer Overrun Issues
If your host PC has a much faster network connection than the client device (e.g., 2.5 Gbps host with 1 Gbps client), packet loss can occur due to buffer overruns. Solutions:- Reduce the transmission speed of the host NIC
- Configure traffic shaping rules at the OS level (Linux example below)
MTU Issues
Some clients may work better with a lower MTU value. If you experience significant packet loss (30-60%), try reducing the MTU from 1500 to 1428 on the network interface serving the stream.Encoder Settings
AMD Encoding Latency (Linux)
If you notice high encoding latencies or strong fluctuations (particularly at 4K resolution), ensure your Mesa libraries are version 24.2 or newer.Sunshine automatically sets the
AMD_DEBUG=lowlatencyenc environment variable on systems with Mesa 24.2+. No manual configuration is needed.amdgpu_top. Both should remain high during encoding rather than fluctuating.
Hardware Encoding on Linux
If hardware encoding fails with Mesa drivers, you may need to manually compile Mesa with encoder support enabled:General Performance Tips
- Resolution matching: Stream at your client device’s native resolution when possible
- Bitrate selection: Higher isn’t always better—match bitrate to your network capabilities
- Encoder choice: Hardware encoders (NVENC, AMF, Quick Sync) typically offer better performance than software encoders
- Display capture: On Linux, prefer XDG Portal capture over KMS for better compatibility
- Controller input: If you experience input lag, ensure no other controllers are conflicting

