2

I recently installed Ubuntu 19.04 on my Dell Inspiron 7566 and while everything else seems to be working well the wireless adapter isn't being detected at all. I followed the instructions here and got the following result

sudo lshw -C network

*-network                 
   description: Ethernet interface
   product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:02:00.0
   logical name: enp2s0
   version: 15
   serial: d4:81:d7:86:e9:86
   size: 100Mbit/s
   capacity: 1Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=137.158.130.138 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
   resources: irq:16 ioport:d000(size=256) memory:e5104000-e5104fff memory:e5100000-e5103fff
*-network
   description: Network controller
   product: Wireless 3165
   vendor: Intel Corporation
   physical id: 0
   bus info: pci@0000:03:00.0
   version: 79
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress cap_list
   configuration: driver=iwlwifi latency=0
   resources: irq:126 memory:e5000000-e5001fff

I figured since it is listed as a "Network controller" it must be a driver issue so I then tried following the instructions here and here but to no avail. I did notice that some of the responses I got are quite different:

dmesg | grep iwl
[    3.135219] iwlwifi 0000:03:00.0: enabling device (0000 -> 0002)
[    3.153487] iwlwifi 0000:03:00.0: loaded firmware version 29.1044073957.0 op_mode iwlmvm
[    3.228606] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 3165, REV=0x210
[    3.245646] iwlwifi 0000:03:00.0: base HW address: 70:1c:e7:56:c7:9b
[    5.281828] iwlwifi 0000:03:00.0: Failed to run INIT calibrations: -110
[    5.299406] WARNING: CPU: 6 PID: 494 at drivers/net/wireless/intel/iwlwifi/pcie/trans.c:2030 iwl_trans_pcie_grab_nic_access+0x1ee/0x220 [iwlwifi]
[    5.299406] Modules linked in: snd_hda_codec_hdmi cmac bnep snd_hda_codec_realtek snd_hda_codec_generic joydev intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp nls_iso8859_1 kvm_intel nvidia_drm(POE) nvidia_modeset(POE) crct10dif_pclmul crc32_pclmul ghash_clmulni_intel nvidia(POE) aesni_intel snd_hda_intel snd_hda_codec i915 snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvmgt snd_rawmidi dell_laptop ledtrig_audio vfio_mdev mdev iwlmvm(+) vfio_iommu_type1 dell_smm_hwmon vfio mac80211 aes_x86_64 crypto_simd cryptd glue_helper snd_seq uvcvideo input_leds kvm dell_wmi intel_cstate snd_seq_device snd_timer btusb intel_rapl_perf btrtl irqbypass iwlwifi videobuf2_vmalloc btbcm dell_smbios dcdbas btintel ipmi_devintf videobuf2_memops drm_kms_helper videobuf2_v4l2 wmi_bmof bluetooth videobuf2_common drm ipmi_msghandler snd videodev i2c_algo_bit intel_hid fb_sys_fops media idma64 processor_thermal_device dell_wmi_descriptor cfg80211 mei_me syscopyarea ecdh_generic
[    5.299440] RIP: 0010:iwl_trans_pcie_grab_nic_access+0x1ee/0x220 [iwlwifi]
[    5.299453]  iwl_set_bits_prph+0x3d/0xa0 [iwlwifi]
[    5.299458]  _iwl_trans_pcie_stop_device.constprop.30+0x32e/0x340 [iwlwifi]
[    5.299462]  iwl_trans_pcie_stop_device+0x33/0x60 [iwlwifi]
[    5.299471]  iwl_op_mode_mvm_start+0x89d/0xaa0 [iwlmvm]
[    5.299475]  _iwl_op_mode_start.isra.10+0x4c/0xb0 [iwlwifi]
[    5.299479]  iwl_opmode_register+0x75/0xe0 [iwlwifi]
[    5.299486]  iwl_mvm_init+0x38/0x1000 [iwlmvm]
[    5.299513] iwlwifi 0000:03:00.0: iwlwifi transaction failed, dumping registers
[    5.299514] iwlwifi 0000:03:00.0: iwlwifi device config registers:
[    5.299551] iwlwifi 0000:03:00.0: 00000000: 31658086 00100000 02800079 00000000 00000004 00000000 00000000 00000000
[    5.299552] iwlwifi 0000:03:00.0: 00000020: 00000000 00000000 00000000 44108086 00000000 000000c8 00000000 00000100
[    5.299553] iwlwifi 0000:03:00.0: iwlwifi device memory mapped registers:
[    5.299579] iwlwifi 0000:03:00.0: 00000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[    5.299580] iwlwifi 0000:03:00.0: 00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
[    5.299583] iwlwifi 0000:03:00.0: iwlwifi device AER capability structure:
[    5.299605] iwlwifi 0000:03:00.0: 00000000: 14010001 00100000 00000000 00462031 00002000 00002000 00000014 40000001
[    5.299606] iwlwifi 0000:03:00.0: 00000020: 0000000f e5000024 00000000
[    5.299607] iwlwifi 0000:03:00.0: iwlwifi parent port (0000:00:1c.5) config registers:
[    5.299618] iwlwifi 0000:00:1c.5: 00000000: a1158086 00100007 060400f1 00810000 00000000 00000000 00030300 200000f0
[    5.299619] iwlwifi 0000:00:1c.5: 00000020: e500e500 0001fff1 00000000 00000000 00000000 00000040 00000000 0010020a
[    5.299620] iwlwifi 0000:03:00.0: iwlwifi root port (0000:00:1c.5) AER cap structure:
[    5.299627] iwlwifi 0000:00:1c.5: 00000000: 14010001 00000000 00010000 00060011 00000000 00002000 00000000 00000000
[    5.299629] iwlwifi 0000:00:1c.5: 00000020: 00000000 00000000 00000000 00000000 00000000 00000000
[    7.165959] iwlwifi 0000:03:00.0: Failed to run INIT ucode: -110

At this stage I am totally stuck and confused. Ubuntu can see that my wifi chip is there, but for some reason doesn't recognise it as a wifi adapter. Please help!

EDIT

So I tried 18.04 and it did not work. So I opened up the laptop to unplug the battery and while I was at it I wiggled the cables on the wifi card and now it seems to work on 18.04 and 19.04? I don't know why (probably hardware related) but I am not going to ask questions.