wifi 选项未设置为禁用电源 / 如何重新加载 wifi 设置更改而无需重启

wifi 选项未设置为禁用电源 / 如何重新加载 wifi 设置更改而无需重启

我的 wifi 选项未设置为禁用省电/如何在不重启的情况下重新加载 wifi 设置更改。我使用的是英特尔 7260ac 卡

我改变了我的iwlwifi配置文件文件

选项 iwlwifi power_save=2并输入sudo iwconfig wlp3s0 关闭电源在终端屏幕上,但我的 power_save 选项始终显示已启用。

参数:power_save:启用 WiFi 电源管理(默认值:禁用)(布尔值)

$ modinfo iwlwifi | grep -v 'pci:' | grep -v 'iwlwifi-'

$ modinfo iwlwifi | grep -v 'pci:' | grep -v 'iwlwifi-'
filename:       /lib/modules/4.8.0-41-generic/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
license:        GPL
author:         Copyright(c) 2003- 2015 Intel Corporation <[email protected]>
description:    Intel(R) Wireless WiFi driver for Linux
srcversion:     E7651FD3D9AF45F96CD8B2E
depends:        cfg80211
intree:         Y
vermagic:       4.8.0-41-generic SMP mod_unload modversions 
parm:           swcrypto:using crypto in software (default 0 [hardware]) (int)
parm:           11n_disable:disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX (uint)
parm:           amsdu_size:amsdu size 0: 12K for multi Rx queue devices, 4K for other devices 1:4K 2:8K 3:12K (default 0) (int)
parm:           fw_restart:restart firmware in case of error (default true) (bool)
parm:           antenna_coupling:specify antenna coupling in dB (default: 0 dB) (int)
parm:           nvm_file:NVM file name (charp)
parm:           d0i3_disable:disable d0i3 functionality (default: Y) (bool)
parm:           lar_disable:disable LAR functionality (default: N) (bool)
parm:           uapsd_disable:disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3) (uint)
parm:           bt_coex_active:enable wifi/bt co-exist (default: enable) (bool)
parm:           led_mode:0=system default, 1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0) (int)
parm:           power_save:enable WiFi power management (default: disable) (bool)
parm:           power_level:default power save level (range from 1 - 5, default: 1) (int)
parm:           fw_monitor:firmware monitor - to debug FW (default: false - needs lots of memory) (bool)
parm:           d0i3_timeout:Timeout to D0i3 entry when idle (ms) (uint)
parm:           disable_11ac:Disable VHT capabilities (default: false) (bool)
$ 

$ uname -a
Linux sys76 4.8.0-41-generic #44~16.04.1-Ubuntu SMP Fri Mar 3 17:11:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


$ iwconfig
lo        no wireless extensions.

enp4s0f2  no wireless extensions.

wlp3s0    IEEE 802.11  ESSID:"2.4ghz"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: E0:3F:49:93:3F:10   
          Bit Rate=144.4 Mb/s   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=60/70  Signal level=-50 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:6  Invalid misc:248   Missed beacon:0

如果我在不重新启动的情况下更改了 iwlwifi.conf 文件,有没有办法重新启动 wifi 并让更改生效?

答案1

使用

sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
禁用 wifi 电源管理。重新启动,电源管理应保持关闭状态。结果modinfo iwlwifi不反映 /etc/modprobe.d/conf 文件中模块选项所做的任何更改,使用

grep [[:alnum:]] /sys/module/iwlwifi/parameters/*

要查看这些更改,可以通过删除并重新安装驱动程序来加载对 conf 文件的更改, sudo modprobe -r iwlwifi等待十秒钟,然后sudo modprobe iwlwifi

相关内容