iwlwifi confuciousness

Issues related to configuring your network
Post Reply
User avatar
Peek
Posts: 7
Joined: 2019/06/05 06:35:46

iwlwifi confuciousness

Post by Peek » 2019/06/05 06:47:37

Because of the ever mysterious wifi adapter configuration in linux, I’ve hammered my non-GUI NUC8i5BEH installation so badly, re-installing is a must.

However, I’d appreciate getting it’s WiFi adapter to work as an AP before I start re-installing. As I ponder the ever elusive best way forward, my present understanding is as follows:

To get WiFi in Linux working, there’s the (1) driver (iwlwifi), specific adapter’s (2) firmware and (3) WPA configuration.

As such, I start out with “lspci –k” as to see if a (kernel) module is being loaded for the particular hardware:

Code: Select all

00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 30)
        Subsystem: Intel Corporation Device 0034
No “Kernel driver” nor “Kernel module” is reflected as opposed to the Ethernet controller:

Code: Select all

00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (6) I219-V (rev 30)
        Subsystem: Intel Corporation Device 2074
        Kernel driver in use: e1000e
        Kernel modules: e1000e
Which has me ponder if there is any particular difference between the “Kernel driver” and “Kernel module” ?

So, I understand the “iwlwifi” package is to be installed. Yet all contemplations thereof, be it “iwlwifi” , “IWLWIFI”, “iwlwifi-firmware”, “iwlwifi-9560-firmware”, “firmware-iwlwifi” etc fails with:

Code: Select all

No package [i][b]iwlwifi-in-whatever-way-its-typed[/b][/i] available.
Error: Nothing to do
So, it has to be a repo that’s not defined. Right ? Editing /etc/yum.repos.d/CentOS-Base.repo and enabling ALL the repos changes nothing. Even adding all sorts of “related” (aka dodgy and even deprecated) CentOS repos still does not serve up the elusive “iwlwifi” package / driver ….

Which begs the question. How does one determine a package’s correct name for a particular distro and how do you know which (healthy) repo to source it from ? Alternatively, when does one throw in the towel and start thinking “build from source” … ?

Had I been successful to this point, I believe I’d now need to source the specific adapter’s firmware (aka microcode) which is loaded into the adapter (hardware) via the driver (iwlwifi package). The firmware / microcode for the Intel Wireless-AC 9560 being iwlwifi-9000-pu-b0-jf-b0-46.ucode downloadable from https://www.intel.com/content/www/us/en ... rking.html, extracted and simply placed directly in the /lib/firmware folder.

In all regards, the iwlwifi (driver) will upload the specific chip’s firmware (*.ucode content) to the physical adapter. This being the confusing part for Windows users migrating to Linux. The driver (iwlwifi) can only then communicate with the adapter once the adapter has the firmware loaded.

The setup is then concluded by installing the “wpa_supplicant” package as to specify the AP’s details (SSID and password) via:

Code: Select all

$ wpa_passphrase "SSID" PASSWD >> /etc/wpa_supplicant/wpa_supplicant.conf
$ wpa_supplicant -i <interface> -c /etc/wpa_supplicant/wpa_supplicant.conf -B dhclient <interface>
Why isn’t the “wpa_supplicant” package simply merged with the “iwlwifi” package as to prevent confusion and also keep it all together?

However, since the adapter is to function as an WiFi AP, is there any other packages / caveats that needs to be considered?

** The only time I get the WiFi to work, is with an Ubuntu GUI installation **

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: iwlwifi confuciousness

Post by TrevorH » 2019/06/05 15:27:06

iwlwifi is a kernel module and is part of the kernel.

What is the output from the following

uname -r
lspci -nn | grep -i net
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
Peek
Posts: 7
Joined: 2019/06/05 06:35:46

Re: iwlwifi confuciousness

Post by Peek » 2019/06/06 04:29:10

With the "iwlwifi" module being specific to Intel Wireless chipsets, had it been some other manufacturer, how would one know what module is required?

... and then also, how would one know that the particular module is a kernel module ?

As requested:

Code: Select all

# uname -r
4.19.0+1

Code: Select all

# lspci -nn |grep -i net
00:14.3 Network controller [0280]: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:9df0] (rev 30)
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (6) I219-V [8086:15be] (rev 30)
Thanks for indulging in my confuciousness.

User avatar
Peek
Posts: 7
Joined: 2019/06/05 06:35:46

Re: iwlwifi confuciousness

Post by Peek » 2019/06/06 05:51:28

From your reply at Wifi Card/On Board Wifi Not Detected viewtopic.php?f=49&t=70373 the process is thus as follows:

1. Get specific device's vendor/device IDs:

Code: Select all

# lspci -nn |grep -i net
00:14.3 Network controller [0280]: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:9df0] (rev 30)
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (6) I219-V [8086:15be] (rev 30)
8086 being the vendor/manufacturer's ID - ala Intel Corporation
9df0 being the Wireless-AC's device's ID
15be being the Ethernet device's ID

2. Get Kernel version:

Code: Select all

# uname -r
4.19.0+1
3. Validate if there is a "kernel module" (being a single file) already present on the system for each device:

3.1 Intel Corporation Cannon Point-LP CNVi [Wireless-AC] [8086:9df0] (rev 30)

Code: Select all

# grep -i 8086 /lib/modules/$(uname -r)/modules.* | grep -i 9df0
 
3.2 Intel Corporation Ethernet Connection (6) I219-V [8086:15be] (rev 30)

Code: Select all

# grep -i 8086 /lib/modules/$(uname -r)/modules.* | grep -i 15be
/lib/modules/4.19.0+1/modules.alias:alias pci:v00008086d000015BEsv*sd*bc*sc*i* e1000e
 
Soooo, there is a kernel module available for the Intel Ethernet (which is working), yet none for the Intel Wireless-AC 9560.

... though here's where I need clarity again. In your example, your query replied with:
/lib/modules/3.10.0-957.12.2.el7.x86_64/modules.alias:alias pci:v00008086d000008B1sv*sd0000C420bc*sc*i* iwlwifi
From that reply, you knew the package required being "iwlwifi". Yet, if there is no reference, how would one know that the required package is the "iwlwifi" package?

Is it an understanding issue on my behalf. Packages in Linux is not Apps. Apps being only a requirement with a GUI-based installation ? In all regards, these packages actually being drivers, yet sufficient as to enable and configure the device in a TEXT-based installation without an associated app.

In all regards, had there been a module present on my system for the wireless, I'd only need to configure some text files (which would've been placed in /etc by the particular module) to have had WiFi working ?

Would the use of the words : module, driver, microcode, firmware etc all be synonyms in Linux, serving only to confuse Winbloat users?

4. However, there isn't a kernel module... soooo , what next ... :?:

Thanks for indulging in my confuciousness.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: iwlwifi confuciousness

Post by TrevorH » 2019/06/06 09:27:24

You're using a foreign kernel and thus you would need to ask whoever it was that created that why that card is not supported. On the vanilla CentOS distro kernel, I get
[root@centos7 ~]# grep -i 8086 /lib/modules/$(uname -r)/modules.* | grep -i 9df0
/lib/modules/3.10.0-957.12.2.el7.x86_64/modules.alias:alias pci:v00008086d00009DF0sv*sd000042A4bc*sc*i* iwlwifi
...
So your card is supported by the iwlwifi driver in the latest distro kernel but either is not enabled or not supported by your (rather old) 4.19.0+1 kernel.
From that reply, you knew the package required being "iwlwifi".
No. It's not a package, it's a kernel module and is shipped as part of the kernel package.

So a kernel module and a kernel driver are just different words for the same thing. A package is not. That's a way of bundling files and having them managed by the distro package manager, yum (and rpm).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
Peek
Posts: 7
Joined: 2019/06/05 06:35:46

Re: iwlwifi confuciousness

Post by Peek » 2019/06/07 00:01:18

Ok, I see that now. :idea:

So, there is no option as to install a missing driver in Linux as one would in Windows ?

If it's not included with the kernel package, you're out of luck, unless you get a newer kernel, which has that particular driver (kernel module) included.

How does one then go about picking a kernel that has support for a particular device ?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: iwlwifi confuciousness

Post by TrevorH » 2019/06/07 10:40:10

If you are running the distro kernel then it already has your driver in it and you can also add drivers from ELRepo using their kmod-* packages which use the CentOS/RHEL stable kernel ABI to allow them to work. Those kmod packages are built in such a way that they work with multiple distro kernels and usually only require to be rebuilt at point release time (e.g when updating from CentOS 7.6 to 7.7). Otherwise you can yum update the kernel and the kmod package should continue to work even though the kernel has been updated.

If you are using a foreign kernel - like yours - then the only way to add drivers to that is to compile and build them against the original kernel source, using the same options etc as were used to build the kernel itself. If you update the kernel version using that second method then you have to rebuild all the drivers you rebuilt from source to add them again. There are security fixes in the newer kernel-5.x packages that are not in your 4.19.0+1 one.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
Peek
Posts: 7
Joined: 2019/06/05 06:35:46

Re: iwlwifi confuciousness

Post by Peek » 2019/06/11 01:55:37

If you are running the distro kernel then it already has your driver in it and you can also add drivers from ELRepo using their kmod-* packages
If the kernel already has the driver, why would one want to add other drivers ?

As to acquire more clarity on Linux drivers, would following a guide on kernel building be advisable ? If so, any guide you'd recommend?

Thanks yet again for your time and efforts.

Post Reply