Skip to content

feat(network): add option to disable DSCP tagging - #6067

Merged
ReenigneArcher merged 1 commit into
LizardByte:masterfrom
G0BL1N:feat/dscp-tagging-option
Nov 9, 2026
Merged

ReenigneArcher merged 1 commit into
LizardByte:masterfrom
G0BL1N:feat/dscp-tagging-option

Conversation

@G0BL1N

@G0BL1N G0BL1N commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a dscp_tagging option (Network tab, enabled by default) to turn off DSCP tagging for audio and video regardless of what the client requests.

With a Linux host, tagged audio can cause episodic loss on some consumer routers (TP-Link so far), heard as crackling on any client. Thanks to @Catkinsv3 for tracking this down in #5508. Until now the only workaround was an iptables mangle rule.

This covers the audio and video sockets. The control stream keeps its own DSCP tag. Local priority (SO_PRIORITY on Linux) is not affected, but on Windows there's no prioritization without tagging, so qWAVE is skipped entirely when disabled.

Kept it as a simple toggle instead of per-type values, since disabling is what actually fixes the issue. Can extend it if needed.

Screenshot

image

Issues Fixed or Closed

Roadmap Issues

Testing

Built on Linux (gcc 16, Release, CUDA off).

  • test_sunshine: 905 passed, 8 skipped, including the new ConfigPersistenceTest.ParsesDscpTaggingOption
  • vitest: 213 passed, including a new test toggling the checkbox on the Network tab
  • clang-format passes
  • Loopback Moonlight stream with the option on and off, logging setsockopt calls: IP_TOS is set on the video and audio sockets when enabled and not set when disabled, SO_PRIORITY is unchanged
  • Real stream over my Wi-Fi: audio crackling is gone with the option disabled

Windows and macOS were not built locally.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Some consumer routers mishandle DSCP-tagged traffic, causing audio
loss on Wi-Fi. Allow disabling tagging regardless of client request.
@ReenigneArcher
ReenigneArcher force-pushed the feat/dscp-tagging-option branch from cd1adb6 to da32f3c Compare November 9, 2026 00:05
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 456 bytes (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sunshine-esm 997.78kB 456 bytes (0.05%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sunshine-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 245 bytes 407.25kB 0.06%
assets/Config-*.js 211 bytes 87.59kB 0.24%

Files in assets/index-*.js:

  • ./src_assets/common/assets/web/public/assets/locale/en.json → Total Size: 60.69kB

Files in assets/Config-*.js:

  • ./src_assets/common/assets/web/configs/tabs/Network.vue → Total Size: 13.26kB

  • ./src_assets/common/assets/web/configs/config_tabs.json → Total Size: 4.2kB

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.36%. Comparing base (7810707) to head (da32f3c).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #6067     +/-   ##
=========================================
  Coverage   49.35%   49.36%             
=========================================
  Files         143      143             
  Lines       31300    31302      +2     
  Branches    13347    13354      +7     
=========================================
+ Hits        15449    15452      +3     
- Misses      12235    13419   +1184     
+ Partials     3616     2431   -1185     
Flag Coverage Δ
Alpine-aarch64 33.05% <0.00%> (-0.01%) ⬇️
Alpine-x86_64 33.19% <0.00%> (-0.01%) ⬇️
Archlinux 34.26% <0.00%> (-0.02%) ⬇️
FreeBSD-amd64 33.84% <25.00%> (-0.01%) ⬇️
Homebrew-macos-15 47.92% <33.33%> (+<0.01%) ⬆️
Homebrew-macos-26 48.32% <33.33%> (+0.01%) ⬆️
Homebrew-ubuntu-24.04 36.30% <33.33%> (+<0.01%) ⬆️
Linux-AppImage-aarch64 38.82% <33.33%> (+<0.01%) ⬆️
Linux-AppImage-x86_64 39.08% <33.33%> (+<0.01%) ⬆️
PowerShell 100.00% <ø> (ø)
Web-UI 56.67% <100.00%> (+0.02%) ⬆️
Windows-AMD64 39.85% <33.33%> (+<0.01%) ⬆️
Windows-ARM64 33.86% <0.00%> (ø)
macOS-arm64 40.48% <0.00%> (ø)
macOS-x86_64 40.03% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/config.cpp 62.65% <100.00%> (+0.03%) ⬆️
src/config.h 65.00% <ø> (ø)
src/stream.cpp 34.29% <100.00%> (+0.18%) ⬆️
..._assets/common/assets/web/configs/tabs/Network.vue 93.22% <100.00%> (+0.11%) ⬆️
...ets/common/assets/web/public/assets/locale/en.json 100.00% <ø> (ø)

... and 32 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7810707...da32f3c. Read the comment docs.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Last Updated 2026-11-09 01:51:03 UTC
Source Run CI Run #6640
Commit da32f3ce957f3bf05777e3d686039dbbaef1f632

Screenshot Comparison

PR #6067 screenshots vs screenshots baseline.

Matrix: AppImage-aarch64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: AppImage-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

@ReenigneArcher
ReenigneArcher merged commit 0ddc73d into LizardByte:master Nov 9, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hardcoded DSCP CS6 on audio causes episodic loss on some consumer WiFi; add option to disable QoS tagging

2 participants