Author Topic: Enabling integral WiFi adaptor Ubuntu 20.04  (Read 2586 times)

Tim Hall

  • Victoria is my queen
Enabling integral WiFi adaptor Ubuntu 20.04
« on: 15 February, 2022, 10:17:21 pm »
This machine is running Ubuntu 20.04. Currently it's connected via an Ethernet cable to my router. Because reasons I need to connect it over wifi.

The pull down box top right of the screen has an option for WiFi, suggesting there's an adaptor buried in the guts of the machine, but selecting it doesn't show any networks.
Frantic googling tells me to enter

Code: [Select]
sudo lspci -vWhich shows
Code: [Select]
02:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3165 Plus Bluetooth (rev 79)
Subsystem: Intel Corporation Dual Band Wireless-AC 3165 Plus Bluetooth
Flags: bus master, fast devsel, latency 0, IRQ 126
Memory at df000000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [c8] Power Management version 3
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [40] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Device Serial Number dc-53-60-ff-ff-b8-5b-9b
Capabilities: [14c] Latency Tolerance Reporting
Capabilities: [154] L1 PM Substates
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi
Which suggests there is a wireless adaptor in there. What now? I've read a several of articles, some of which were relevant (possibly), and I almost understood them. No joy though.

FWIW I rummaged in a drawer of tqt and unearthed a USB wireless adaptor. That works, but I'm running out of USB ports.
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #1 on: 15 February, 2022, 10:21:33 pm »

Tim Hall

  • Victoria is my queen
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #2 on: 15 February, 2022, 10:55:14 pm »
Yes, that was one of the pages I read yesterday. Downloaded the relevant .tgz file and extracted it. Copied the two files (other than Readme and License files), into /lib/firmware.

Still no joy.  I very much in the dark here, so likely to have missed something simple.
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Kim

  • Timelord
    • Fediverse
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #3 on: 15 February, 2022, 10:59:15 pm »
Perhaps stating the obvious, but have you reloaded the driver?  (Simplest way would be to reboot.)

Tim Hall

  • Victoria is my queen
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #4 on: 15 February, 2022, 11:03:51 pm »
Perhaps stating the obvious, but have you reloaded the driver?  (Simplest way would be to reboot.)
Yes done that. But you're absolutely right to suggest basic moves like that.
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Tim Hall

  • Victoria is my queen
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #5 on: 15 February, 2022, 11:17:02 pm »
Code: [Select]
lshw -C networkReturns
Code: [Select]
*-network
       description: Wireless interface
       product: Dual Band Wireless-AC 3165 Plus Bluetooth
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlp2s0
       version: 79
       serial: dc:53:60:b8:5b:9b
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.13.0-28-generic firmware=29.1654887522.0 7265D-29.ucode latency=0 link=no multicast=yes wireless=IEEE 802
Does this mean it's using firmware 7265D-29.ucode? I copied 7265D-14.ucode into /lib/firmware

Both are iwlwifi-7265D-14.ucode and iwlwifi-7265D-29.ucode are present in /lib/firmware
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #6 on: 15 February, 2022, 11:41:39 pm »
Do you have the firmware-iwlwifi package installed? You will need to enable the non-free repository to see the package: https://wiki.debian.org/SourcesList#Example_sources.list

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #7 on: 15 February, 2022, 11:43:08 pm »
Oops, that's Debian. You do will still need the package but I don't know where Ubuntu puts it.

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #8 on: 15 February, 2022, 11:46:10 pm »
Also, run dmesg and see whether the firmware is being loaded, or failing to load.

Tim Hall

  • Victoria is my queen
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #9 on: 16 February, 2022, 12:11:08 am »
Thanks. I'll try that tomorrow.
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #10 on: 16 February, 2022, 06:41:44 am »
Try deleting the drivers you downloaded then:

 sudo apt-get install firmware-iwlwifi

It should juts get them from the normal Ubuntu 20.04 repository.

Then do:

 sudo modprobe iwlwifi

That will load the driver.

If it still doesn't work try a reboot.
Also make sure WiFi is switched on. Is there a WiFi on/off toggle switch or key on your laptop ?

Looks like there have been some issues with this driver and some kernels in Ubuntu 20.4 so if its still not working I would make sure the system was completely up to date:

 apt-get update
 apt-get upgrade

Then reboot.

If it still doesn't work then have a look over on the Ubuntu forums and see if they have recommendations for a specific firmware version from Intel's web site.
I think you'll find it's a bit more complicated than that.

Tim Hall

  • Victoria is my queen
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #11 on: 16 February, 2022, 11:11:41 pm »
Mixed results.
When I tried to
Code: [Select]
sudo apt-get install firmware-iwlwifiI got this
Code: [Select]
Unable to locate package firmware-iwlwifi
Code: [Select]
sudo dmesg | grep wifiGives me this. That's either with or without the firmware files that I downloaded yesterday.
Code: [Select]
[    4.032471] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002)
[    4.045397] iwlwifi 0000:02:00.0: Found debug destination: EXTERNAL_DRAM
[    4.045400] iwlwifi 0000:02:00.0: Found debug configuration: 0
[    4.045616] iwlwifi 0000:02:00.0: loaded firmware version 29.1654887522.0 7265D-29.ucode op_mode iwlmvm
[    4.124192] iwlwifi 0000:02:00.0: Detected Intel(R) Dual Band Wireless AC 3165, REV=0x210
[    4.137565] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[    4.137997] iwlwifi 0000:02:00.0: Allocated 0x00400000 bytes for firmware monitor.
[    4.142635] iwlwifi 0000:02:00.0: base HW address: dc:53:60:b8:5b:9b
[    4.293390] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0
[    7.494347] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[    7.571656] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
[    7.572883] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring
What does that tell me?
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #12 on: 17 February, 2022, 12:09:03 am »
I think the ubuntu package is called linux-firmware, and you probably already have it installed. You are loading firmware version 7265D-29, probably from that package. Run 'uname -a' to see which kernel you are running. Run 'sudo modprobe iwlwifi' to load the driver, and/or 'lsmod' to verify the driver is loaded. You might also find errors in the system log; not sure where that is on ubuntu, /var/log/syslog perhaps, or maybe some graphical "system log" viewer?

[Edited to fix mistakes about firmware versions.]

Kim

  • Timelord
    • Fediverse
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #13 on: 17 February, 2022, 12:56:05 am »
You might also find errors in the system log; not sure where that is on ubuntu, /var/log/syslog perhaps

Indeed.

Code: [Select]
sudo less /var/log/syslog
It's looking an awful lot like the driver is working.  Maybe the configuration utility needs a kicking?  (It's probably NetworkMangler, isn't it?)

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #14 on: 17 February, 2022, 01:42:11 am »
It's hard to debug graphical interfaces remotely, but network manager has a command line as well, so

nmcli radio
nmcli device

will show the basic status.

Tim Hall

  • Victoria is my queen
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #15 on: 17 February, 2022, 09:13:19 pm »
Right. In tonight's episode of clueless Ubuntu user tries to get his wifi working we have:

Code: [Select]
Tim@Dalamar2:~$ uname -a
Linux Dalamar2 5.13.0-28-generic #31~20.04.1-Ubuntu SMP Wed Jan 19 14:08:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
tim@Dalamar2:~$

 
Code: [Select]
lsmod | grep wifi
Code: [Select]
iwlwifi               372736  1 iwlmvm
cfg80211              888832  3 iwlmvm,iwlwifi,mac80211

Above suggests, I think, that the relevant driver is loaded

Code: [Select]
sudo less /var/log/syslogSnipped what I think is the relevant part, below. The "unavailable" doesn't look good.

Code: [Select]
Feb 17 20:38:50 Dalamar2 NetworkManager[1143]: <info>  [1645130330.9616] device (wlp2s0): driver supports Access Point (AP) mode
Feb 17 20:38:50 Dalamar2 NetworkManager[1143]: <info>  [1645130330.9621] manager: (wlp2s0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
Feb 17 20:38:50 Dalamar2 NetworkManager[1143]: <info>  [1645130330.9631] device (wlp2s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Feb 17 20:38:50 Dalamar2 systemd[1]: Started Dispatcher daemon for systemd-networkd.
Feb 17 20:38:50 Dalamar2 systemd[1]: logrotate.service: Succeeded.
Feb 17 20:38:50 Dalamar2 systemd[1]: Finished Rotate log files.
Feb 17 20:38:50 Dalamar2 kernel: [    7.984863] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
Feb 17 20:38:51 Dalamar2 kernel: [    8.062085] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM
Feb 17 20:38:51 Dalamar2 kernel: [    8.063193] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <warn>  [1645130331.1076] Error: failed to open /run/network/ifstate
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.1322] modem-manager: ModemManager available
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.1339] supplicant: wpa_supplicant running
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.1343] device (wlp2s0): supplicant interface state: init -> starting
Feb 17 20:38:51 Dalamar2 systemd[1]: man-db.service: Succeeded.
Feb 17 20:38:51 Dalamar2 systemd[1]: Finished Daily man-db regeneration.
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.1990] sup-iface[0x558060e8d120,wlp2s0]: supports 5 scan SSIDs
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.2014] device (wlp2s0): supplicant interface state: starting -> ready
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.2019] Wi-Fi P2P device controlled by interface wlp2s0 created
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.2029] manager: (p2p-dev-wlp2s0): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/4)
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.2062] device (p2p-dev-wlp2s0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.2084] device (p2p-dev-wlp2s0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <info>  [1645130331.2091] device (wlp2s0): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Feb 17 20:38:51 Dalamar2 NetworkManager[1143]: <warn>  [1645130331.2147] sup-iface: failed to cancel p2p connect: P2P cancel failed



Code: [Select]
tim@Dalamar2:~$ nmcli radio
WIFI-HW  WIFI     WWAN-HW  WWAN   
enabled  enabled  enabled  enabled

Code: [Select]
tim@Dalamar2:~$ nmcli device
DEVICE          TYPE      STATE         CONNECTION         
enp1s0          ethernet  connected     Wired connection 1
virbr0          bridge    connected     virbr0             
wlp2s0          wifi      disconnected  --                 
p2p-dev-wlp2s0  wifi-p2p  disconnected  --                 
lo              loopback  unmanaged     --                 
virbr0-nic      tun       unmanaged     -- 
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #16 on: 18 February, 2022, 02:07:28 am »
Let's try connecting from the command line:

$ nmcli device wifi list

should list the wifi networks

$ nmcli device wifi connect WIFINAME --ask ifname wlp2s0

should attempt to connect to the wifi network called WIFINAME and prompt for a wifi password.  You can use

$ nmcli device wifi connect WIFINAME password PASSWORD ifname wlp2s0

to specify the password on the command line, which is more convenient but often regarded as a security risk, although I wouldn't worry in this case.  If that fails there should be error messages in the terminal or in the systemlog.  If it succeeds you can disconnect using

$ nmcli device disconnect wlp2s0

Whether it works or not the attempt will create a NM connection know as WIFINAME that will show up when you run

$ nmcli connection

You can delete that NM connection using

$ nmcli connection delete WIFINAME

Tim Hall

  • Victoria is my queen
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #17 on: 19 February, 2022, 04:22:03 pm »
Tried
Code: [Select]
nmcli device wifi list
Didn't list any networks.
Slept. Had a day of moving all my stuff around, as the Nerve Centre is being restored to a Spare Room.

Took the opportunity to open up this box to look for Obvious Things.

Not having the antenna leads attached to the wireless card counts as  Pretty Bloody Obvious.

It all Just Works now.

Sorry everyone for wsting your time.
There are two ways you can get exercise out of a bicycle: you can
"overhaul" it, or you can ride it.  (Jerome K Jerome)

Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #18 on: 19 February, 2022, 05:44:55 pm »
Tried
Code: [Select]
nmcli device wifi list
Didn't list any networks.
Slept. Had a day of moving all my stuff around, as the Nerve Centre is being restored to a Spare Room.

Took the opportunity to open up this box to look for Obvious Things.

Not having the antenna leads attached to the wireless card counts as  Pretty Bloody Obvious.

It all Just Works now.

Sorry everyone for wsting your time.

The “div” thread is over there >>>
We are making a New World (Paul Nash, 1918)

Kim

  • Timelord
    • Fediverse
Re: Enabling integral WiFi adaptor Ubuntu 20.04
« Reply #19 on: 19 February, 2022, 07:22:43 pm »
To be fair, the whole point in wireless is that you don't have to do the "Is it plugged in?" test   ;D