Turn off WiFi power save and USB autosuspend for Realtek dongles

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A97KUggSE3rBL8veDM5Mr4
This commit is contained in:
Claude
2026-10-16 15:58:43 +00:00
parent f91dbe4d5f
commit c196a5f7e7
2 changed files with 14 additions and 0 deletions
+3
View File
@@ -242,6 +242,9 @@ provision_install_wifi_helper() {
log_warning "Couldn't set up the kiosk WiFi screen's permission - Ctrl+Alt+Super+W won't be able to connect" log_warning "Couldn't set up the kiosk WiFi screen's permission - Ctrl+Alt+Super+W won't be able to connect"
fi fi
rm -f "$tmp" rm -f "$tmp"
# Flaky cheap dongles (RTL8188CUS...) need WiFi power saving off.
provision_install_file "etc/udev/rules.d/70-kiosk-wifi-power.rules" /etc/udev/rules.d/70-kiosk-wifi-power.rules
sudo udevadm control --reload-rules 2>/dev/null || true
} }
provision_configure_firewall() { provision_configure_firewall() {
@@ -0,0 +1,11 @@
# Keep WiFi adapters awake. Power saving (the adapter dozing between
# packets, and the USB port suspending an idle dongle) is what makes
# cheap dongles like the Realtek RTL8188CUS drop or stall a connection.
# Both are ordinary software settings, so nothing here can harm the
# hardware: the cost is a fraction of a watt.
# Radio power save off on every WiFi interface as it appears.
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", RUN+="/usr/sbin/iw dev $name set power_save off"
# No USB autosuspend for the common RTL8188/8192 CU/CUS/RU dongles.
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8176|8177|8178|8179|817a|817b|817c|817d|817e|8191", TEST=="power/control", ATTR{power/control}="on"