(Commands starting with a $ can be run as a user; those with # need to be run as root or using sudo.)

System Information:

$ uname -a
Linux laptop1 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
$ lspci | grep -w Wireless
02:00.0 Network controller: Intel Corporation Intel Dual Band Wireless-AC 3165 Plus Bluetooth (rev 79)
This will need the non-free firmware-iwlwifi drivers for Debian 9 https://packages.debian.org/stretch/firmware-iwlwifi (version 20161130-5). I had installed them using
# apt-get install firmware-iwlwifi
after adding the non-free repositories to the /etc/apt/sources list. Wifi would not work. Installing this package copies many files named iwlwifi-CARDNAME-REVISION.ucode. Thinking that I did not add the lastest versions I got the stretch-backports version of firmware-iwlwifi https://packages.debian.org/stretch-backports/firmware-iwlwifi (version 20190114-1~bpo9+2). Now
$ ls /lib/firmware/iwlwifi-* | grep 7265
/lib/firmware/iwlwifi-7265-12.ucode
/lib/firmware/iwlwifi-7265-14.ucode
/lib/firmware/iwlwifi-7265-16.ucode
/lib/firmware/iwlwifi-7265-17.ucode
/lib/firmware/iwlwifi-7265-9.ucode
/lib/firmware/iwlwifi-7265D-10.ucode
/lib/firmware/iwlwifi-7265D-12.ucode
/lib/firmware/iwlwifi-7265D-13.ucode
/lib/firmware/iwlwifi-7265D-14.ucode
/lib/firmware/iwlwifi-7265D-16.ucode
/lib/firmware/iwlwifi-7265D-17.ucode
/lib/firmware/iwlwifi-7265D-21.ucode
/lib/firmware/iwlwifi-7265D-22.ucode
/lib/firmware/iwlwifi-7265D-27.ucode
/lib/firmware/iwlwifi-7265D-29.ucode
Strangly I got
# dmesg | grep iwlwifi | head -15
[    8.915617] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-26.ucode (-2)
[    8.915624] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-26.ucode failed with error -2
[    8.915667] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-25.ucode (-2)
[    8.915673] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-25.ucode failed with error -2
[    8.915707] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-24.ucode (-2)
[    8.915713] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-24.ucode failed with error -2
[    8.915746] iwlwifi 0000:02:00.0: firmware: failed to load iwlwifi-7265D-23.ucode (-2)
[    8.915752] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-7265D-23.ucode failed with error -2
[    9.369135] iwlwifi 0000:02:00.0: firmware: direct-loading firmware iwlwifi-7265D-22.ucode
[    9.369712] iwlwifi 0000:02:00.0: loaded firmware version 22.391740.0 op_mode iwlmvm
[    9.920513] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 3165, REV=0x210
[    9.922593] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[    9.922804] iwlwifi 0000:02:00.0: L1 Enabled - LTR Disabled
[   11.118178] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0
Of course, wifi wouldn't still work. It was trying to load Revisions 23-26, while I had 22 and 27! Searching online did not yield much help, so I asked the Debian kernel maintainers. One of them replied that 23-27 are not "required" and the driver has loaded 22 successfully. After reading some online discussions about wicd, I began suspecting that it did not know the name of the the wireless interface; the output of dmesg said that wlan0 has been renamed as wlp2s0. Indeed that was the case. (To see the setting, use: Dropdown Arrow on its GUI → Preferences → General Settings → Wireless interface). I suppose it can also be set inside /etc/wicd/manager-settings.conf directly. The field was empty. When I entered wlp2s0 there, I was able to connect using wifi.
Manoj's Home-page | sys
Last modified: Tue Apr 30 10:31:06 IST 2019