Featured image of post LinuxのWiFiの速度が異常に遅かった時の原因

LinuxのWiFiの速度が異常に遅かった時の原因

目次

1.背景

  • ThinkPadに入れたLinux (Kubuntu) のWiFiが異常に遅くなった
  • fast.comで調べても、300Kbpsというレベルの速度だった
  • そのWiFiが異常に遅い問題を直した時のメモ

2.結論

  • 原因は、Intel の iwlwifiドライバのバグだった
  • IntelのWi-Fi チップでは、受信側(RX)の速度だけが 6.5Mbps に固定されるバグがある
    • Intel 6.5Mbps WiFi Limitと呼ばれる
  • なぜ、6.5Mbpsになるかというとドライバの省力モードによるもの
  • Linuxのiwlwifiドライバが省電力関連の機能を有効にしていたため発生した
  • ちなみに、充電しっぱなしのPerformance Modeで発生した

3.用語

  • iwlwifi (Intel Wireless WiFi Linux driver)
    • Intel製 Wi-Fi チップ用の公式 Linux ドライバ
    • Linux カーネルに標準で含まれている
  • U-APSD(Unscheduled Automatic Power Save Delivery)
    • Wi-Fi の省電力機能のひとつで、
    • ルーターからのデータをまとめて受け取る」仕組み
  • 802.11n の省電力関連オプション
    • パラメーターで制御できる
      • 0: 無効にしない(デフォルト)
      • 1: 11n を完全無効化(遅くなる)
      • 8: U-APSD を無効化

4.現状確認

speedtest-cliでWifiの速度の確認をした。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$ sudo apt install speedtest-cli
$ speedtest-cli

Retrieving speedtest.net configuration...
Testing from SoftBank Corp. (126.89.41.182)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by fdcservers.net (Tokyo) [32.61 km]: 162.46 ms
Testing download speed................................................................................
Download: 0.36 Mbit/s
Testing upload speed......................................................................................................
Upload: 5.55 Mbit/s

特にダウンロードが異常に遅い。

5.解決策

以下のコマンドで、U-APSDだけ無効化した。

1
2
$ sudo modprobe -r iwlwifi
$ sudo modprobe iwlwifi 11n_disable=8

恒久的に対応する場合はドライバのオプションを入れる。
/etc/modprobe.d/iwlwifi.conf11n_disable=8を追加すると恒久対応になる。
もともとのオプションは以下。

1
2
3
4
5
6
7
8
9
$ cat /etc/modprobe.d/iwlwifi.conf 

# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system.  When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211

以下でドライバのオプションの追加。

1
$ echo "options iwlwifi 11n_disable=8" | sudo tee -a /etc/modprobe.d/iwlwifi.conf

Update後の確認。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
$ cat /etc/modprobe.d/iwlwifi.conf

# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system.  When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211
options iwlwifi 11n_disable=8

6.直ったか確認

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
$ speedtest-cli

Retrieving speedtest.net configuration...
Testing from SoftBank Corp. (126.89.41.182)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by 7 BULL (Tokyo) [32.61 km]: 9.97 ms
Testing download speed................................................................................
Download: 92.86 Mbit/s
Testing upload speed......................................................................................................
Upload: 295.55 Mbit/s

ダウンロードが100倍早くなり、正常になった。

7.まとめ

  • LinuxのWiFiが遅くなる問題はIntelのWifiドライバーが原因だった
  • SSHやミーティングにも影響していたので、クリティカルな課題だった

8.参考文献

最終更新 Aug 05, 2025 03:00 +0900
Built with Hugo
テーマ StackJimmy によって設計されています。