This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

iwlwifi

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Iwlwifi and the translation is 90% complete.
Resources

iwlwifiIntel の現行の無線チップのための無線ドライバです。

カーネル

動作させるためにはカーネルコンフィグが必要です。ドライバは 802.11a/b/g/n/ac(デバイスによって異なります)をサポートしているので、IEEE 802.11 を有効にする必要があります。

IEEE 802.11

少なくとも cfg80211mac80211 を有功にしてください。いくつかのワイヤレスドライバーについては rate control algorithm も必要です。

KERNEL linux-4.1
[*] Networking support  --->
    [*] Wireless  --->
        <*>   cfg80211 - wireless configuration API
        [ ]     nl80211 testmode command
        [ ]     enable developer warnings
        [ ]     cfg80211 regulatory debugging
        [ ]     cfg80211 certification onus
        [*]     enable powersave by default
        [ ]     cfg80211 DebugFS entries
        [ ]     use statically compiled regulatory rules database
        [ ]     cfg80211 wireless extensions compatibility
        <*>   Generic IEEE 802.11 Networking Stack (mac80211)
        [*]   Minstrel
        [*]     Minstrel 802.11n support
        [ ]       Minstrel 802.11ac support
              Default rate control algorithm (Minstrel)  --->
        [ ]   Enable mac80211 mesh networking (pre-802.11s) support
        -*-   Enable LED triggers
        [ ]   Export mac80211 internals in DebugFS
        [ ]   Trace all mac80211 debug messages
        [ ]   Select mac80211 debugging features  ----

Minstrel とその 802.11n サポートはrate control algorithmの1つです。

iwlwifi デバイスドライバ

Intel の現行の無線チップにはこのドライバを使用してください。次に示すとおり、モジュール <M> として設定してください。加えて、DVM または MVM のうち正しいほうをファームウェアの表Module の列を見て選択する必要があります。

KERNEL linux-4.9
Device Drivers  --->
 
        [*] Network device support  --->
 
        --- Network device support
        [*]   Wireless LAN  --->
 
            --- Wireless LAN
            [ ]   ADMtek devices
            [ ]   Atheros/Qualcomm devices
            [ ]   Atmel devices
            [ ]   Broadcom devices
            [ ]   Cisco devices
            [*]   Intel devices
            < >     Intel PRO/Wireless 2100 Network Connection
            < >     Intel PRO/Wireless 2200BG and 2915ABG Network Connection
            < >     Intel Wireless WiFi 4965AGN (iwl4965)
            < >     Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)
            <M>     Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)
            <M>       Intel Wireless WiFi DVM Firmware support
            <M>       Intel Wireless WiFi MVM Firmware support
            [ ]       Enable broadcast filtering (NEW)
            [ ]       Enable runtime power management mode for PCIe devices (NEW)
                      Debugging Options  --->
            [ ]   Intersil devices
            [ ]   Marvell devices
            [ ]   MediaTek devices
            [ ]   Ralink devices
            [ ]   Realtek devices
            [ ]   Redpine Signals Inc devices
            [ ]   STMicroelectronics devices
            [ ]   Texas Instrument devices
            [ ]   ZyDAS devices
            < >   Simulated radio testing tool for mac80211
            < >   Wireless RNDIS USB support
Important
ドライバをモジュールとしてビルドする(<M>)のではなく、カーネルに組み込む(<*>)場合は、ファームウェアもカーネルに組み込む必要があります。カーネルに組み込む場合の節を見てください。
カーネルコンフィグを変更した後は忘れずにカーネルを再ビルドしてください。

カーネルを再ビルドし、このカーネルで再起動したら、選択は次のように確認できます:

Note
/proc/config.gz 疑似ファイルのサポートは Kernel/IKCONFIG_Support 機能によって有効になります。
user $zgrep 'IWLWIFI\|IWLDVM\|IWLMVM' /proc/config.gz

ファームウェア

この表にある通り、各デバイス毎にファームウェアも必要です。これは sys-linux/linux-firmware や、デバイス個別の sys-firmware/iwlxxxx-*ucode パッケージから利用可能です。

root #emerge --ask sys-kernel/linux-firmware

カーネルに組み込む場合

ドライバをモジュールとしてビルドする(<M>)のではなく、カーネルに組み込む(<*>)場合は、ファームウェアもカーネルに組み込む必要があります。

KERNEL linux-4.1
Device Drivers  --->
 
            Generic Driver Options  --->
 
            -*- Userspace firmware loading support
            [ ]   Include in-kernel firmware blobs in kernel binary
            (iwlwifi-xxxx.ucode) External firmware blobs to build into the kernel binary
            (/lib64/firmware) Firmware blobs root directory
            [ ] Fallback user-helper invocation for firmware loading

iwlwifi-xxxx.ucodeを実際のファームウェア名に置き換えてください。FW_LOADER_USER_HELPER_FALLBACK にも注意してください。

ネットワークデバイス名

起動時にカーネルが作成する eth0eth1 のようなネットワークデバイス名(dmesg 参照)は、/lib/udev/rules.d/80-net-name-slot.rules での udev ルールを用いて変更可能です。

旧来の命名ルールを維持するには、/etc/udev/rules.d ディレクトリ内に、同じ名称のファイルを空で作成することで上書きします:

root #touch /etc/udev/rules.d/80-net-name-slot.rules


テスト

新しいカーネルで再起動するかモジュールを読み込んだ後で、以下の方法を使ってデバイスが利用可能かテストできます:

/sys ファイルシステム

/sys/class/net ディレクトリの内容を ls -al や(app-text/tree パッケージに入っている)tree コマンドで一覧表示させます:

user $tree /sys/class/net
/sys/class/net/
├── enp2s14 -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:0e.0/net/enp2s14
├── lo -> ../../devices/virtual/net/lo
├── sit0 -> ../../devices/virtual/net/sit0
└── wlp8s0 -> ../../devices/pci0000:00/0000:00:1c.0/0000:08:00.0/net/wlp8s0

ip コマンド

デバイス名を取得したりワイヤレスカードが認識されているか検証するには、以下の ip コマンドを実行します:

user $ip addr
3: wlan0:   ...

ifconfig コマンド

ifconfig コマンドは sys-apps/net-tools パッケージを通じて提供されています。まだ有効化されていないものやアクティブになっていないものも含め、認識されているすべてのネットワークカードのリストを表示するには ifconfig -a を使用してください:

user $ifconfig -a
wlan0     ...

以下のようにして、ネットワークカードをアクティブにできます:

root #ifconfig -v wlan0 up
SIOCSIFFLAGS: Operation not possible due to RF-kill
WARNING: at least one error occurred. (-1)

この例では、(通常はベイの電力消費を抑え、また偶然ワイヤレスネットワークに接続してしまわないようにする目的で) radio frequency kill state がセットされているため、ワイヤレスカードの有効化は失敗しています。

iw コマンド

ワイヤレスネットワークカードのドライバーが nl80211 スタックをサポートしていれば、 net-wireless/iw パッケージで提供される iw コマンドで、認識されているワイヤレスカードを表示できます:

root #iw dev
   phy#0
	Interface wlan0
		ifindex 4
		type managed

modprobe と modinfo

modprobe は何も出力しないはずです:

root #modprobe iwlwifi

ドライバモジュールに関するほとんどの情報は modinfo iwlwifi から得られます

user $modinfo iwlwifi

lspci

lspciKernel driver in use:Kernel modules: の欄に iwlwifi と表示するはずです:

root #lspci -nnkv | sed -n '/Network/,/^$/p'
03:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0082] (rev 34)
        Subsystem: Intel Corporation Centrino Advanced-N 6205 AGN [8086:1321]
        Flags: bus master, fast devsel, latency 0, IRQ 33
        Memory at f7d00000 (64-bit, non-prefetchable) [size=8K]
        Capabilities: [c8] Power Management version 3
        Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [e0] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number confidential
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi

xx:xx.x 形式の識別名は dmesg からの特定の情報を grep するのに役立ちます。

dmesg

dmesg の出力を確認してください。03:00.0lspci から得られた識別名で読み替え、wlpネットワークインターフェース名で読み替えてください。

user $dmesg | grep -i -E '03:00.0|wlp|iwl|80211'
[    1.200902] pci 0000:03:00.0: [8086:0082] type 00 class 0x028000
[    1.201065] pci 0000:03:00.0: reg 0x10: [mem 0xf7d00000-0xf7d01fff 64bit]
[    1.201776] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
[    1.201999] pci 0000:03:00.0: System wakeup disabled by ACPI
[   18.260461] iwlwifi 0000:03:00.0: enabling device (0100 -> 0102)
[   18.260598] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[   18.419884] iwlwifi 0000:03:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm
[   18.671329] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUG enabled
[   18.671330] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[   18.671330] iwlwifi 0000:03:00.0: CONFIG_IWLWIFI_DEVICE_TRACING disabled
[   18.671332] iwlwifi 0000:03:00.0: Detected Intel(R) Centrino(R) Advanced-N 6205 AGN, REV=0xB0
[   18.673421] iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
[   18.705882] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[   18.706468] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0
[   23.286871] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
    ......... snip .........
[   48.176954] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[   92.720710] wlp3s0: authenticate with my WLAN AP
[   92.724440] wlp3s0: send auth to my WLAN AP (try 1/3)
[   92.728436] wlp3s0: authenticated
[   92.728646] wlp3s0: waiting for beacon from my WLAN AP
[   92.821389] wlp3s0: associate with my WLAN AP (try 1/3)
[   92.828148] wlp3s0: RX AssocResp from my WLAN AP (capab=0x431 status=0 aid=4)
[   92.853124] wlp3s0: associated
[   92.853173] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready

トラブルシューティング

カーネルがロードされない

正しいカーネルがロードされているか確認してください。次のようにして行えます(IKCONFIG 機能が必要です):

user $zgrep CONFIG_IWL /proc/config.gz

ファームウェアの問題

  • For systems using udev or systemd, it is imperative to configure the kernel to load binary blobs. In this case the wireless card's firmware is the firmware that needs loaded. More information on configuring the kernel in this manner can be found in the following thread on the Gentoo forums: FW_LOADER_USER_HELPER_FALLBACK.

無線が動作していない

See also

外部の情報