mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5160] [Bug]: BBR enable #3630
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3630
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vrcher on GitHub (Jun 10, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5160
Describe the bug
When I enable the BBR setting via a script on the server, I get a response stating that two parameters have incorrect values
sysctl: setting key "net.ipv4.conf.all.accept_source_route": Invalid argument
sysctl: setting key "net.ipv4.conf.all.promote_secondaries": Invalid argument
How to reproduce the problem
│ 24. Enable BBR │
│ 25. Update Geo Files │
│ 26. Speedtest by Ookla │
│────────────────────────────────────────────────│
│ 27. PostgreSQL Management │
╚────────────────────────────────────────────────╝
Panel state: Running
Start automatically: Yes
xray state: Running
Please enter your selection [0-27]: 24
1. Enable BBR
2. Disable BBR
0. Back to Main Menu
Choose an option: 1
Expected behavior
No response
Actual behavior
Please enter your selection [0-27]: 24
1. Enable BBR
2. Disable BBR
0. Back to Main Menu
Choose an option: 1
kernel.printk = 4 4 1 7
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
kernel.kptr_restrict = 1
kernel.sysrq = 176
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
kernel.yama.ptrace_scope = 1
vm.mmap_min_addr = 65536
kernel.core_uses_pid = 1
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.default.accept_source_route = 0
sysctl: setting key "net.ipv4.conf.all.accept_source_route": Invalid argument
net.ipv4.conf.default.promote_secondaries = 1
sysctl: setting key "net.ipv4.conf.all.promote_secondaries": Invalid argument
net.ipv4.ping_group_range = 0 2147483647
net.core.default_qdisc = fq_codel
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
fs.protected_regular = 1
fs.protected_fifos = 1
kernel.pid_max = 4194304
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
fs.protected_fifos = 1
fs.protected_hardlinks = 1
fs.protected_regular = 2
fs.protected_symlinks = 1
BBR has been enabled successfully.
Relevant logs
Screenshots
No response
3x-ui version
3.3.0
Xray-core version
26.6.1
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 22.04
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
Yandex Browser
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 10, 2026):
Thanks for the detailed report.
The errors are harmless — BBR is actually enabled successfully. Your output confirms this with the final line: "BBR has been enabled successfully."
Root cause: The
enable_bbrfunction inx-ui.sh(line 729) runssysctl --system, which re-applies all sysctl configuration files on the system, not just the BBR-specific one. This includes Ubuntu 22.04's system-provided file/usr/lib/sysctl.d/50-default.conf(from theprocpspackage), which attempts to set two parameters that are no longer valid on Ubuntu 22.04's kernel (5.15+):net.ipv4.conf.all.promote_secondaries— removed in Linux kernel 5.14+net.ipv4.conf.all.accept_source_route— returnsInvalid argumentwhen written via theallpseudo-interface on newer kernelsThese errors originate from Ubuntu's own system packages, not from x-ui's
99-bbr-x-ui.conf. They would appear any timesysctl --systemis invoked on this Ubuntu version — it is a known upstream issue with theprocpspackage's sysctl defaults on newer kernels.The underlying fix would be to replace the
sysctl --systemcall with a targetedsysctl -p /etc/sysctl.d/99-bbr-x-ui.confinx-ui.sh, so only the BBR settings are applied and the unrelated Ubuntu system sysctl errors are never surfaced. A PR for this change would be welcome.For now, you don't need to do anything — your BBR is working correctly. You can verify with:
@MHSanaei commented on GitHub (Jun 11, 2026):
Fixed in
2db48174:enable_bbrnow applies only/etc/sysctl.d/99-bbr-x-ui.conf(sysctl -p) instead ofsysctl --system, anddisable_bbrdrops the redundantsysctl --systemre-apply. The "Invalid argument" messages came from Ubuntu's own sysctl defaults being re-applied, not from x-ui — BBR was enabled correctly all along. With this change those unrelated errors no longer appear.