1

I am a very new Ubuntu user, and I'm having a bit of trouble with my wifi card. Here's my setup: I have a dual boot of Windows 10 and Ubuntu 18.04 on a 7th generation Thinkpad X1 Carbon. When I first installed Ubunutu on the machine in January 2020, it had trouble detected the wireless card. I tried to install the proper drivers but nothing worked, so a friend wrote a driver himself and got the wifi working. (Unfortunately, I do not have a copy of what he wrote.)

This past weekend, I tried to connect a bluetooth keyboard to the laptop, which seemed to interfer with the wifi connection by slowing it down dramatically. Without thinking about the fact that my friend had written some weird driver, I tried to fix the bluetooth issue by following this post: wi-fi and bluetooth not working simultaneously. Specifically, I tried

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi bt_coex_active=N"

and then rebooted. It didn't seem to help so I removed this via

sudo rm /etc/modprobe.d/iwlwifi-opt.conf

These commands resulted in internet connection being very unstable -- the connection would be fine for a moment and then drop out and come back intermittently. After some searching, I came across this post Unstable wireless with Intel 7260 + iwlwifi after upgrade to 15.04, which seemed to match my problem almost identically. So, I tried to install the appropriate drivers from [wireless.wiki.kernel.org/en/users/drivers/iwlwifi], but it did not fix anything. However, that posting pointed me to https://forum.ubuntu-fr.org/viewtopic.php?pid=22251520#p22251520 -- when I ran

sudo apt install git build-essential
git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwif/backport-iwlwifi.git
cd backport-iwlwifi
make defconfig-iwlwifi-public
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config
make -j4
sudo make install
cd /lib/firmware
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/iwlwifi-9000-pu-b0-jf-b0-38.ucode
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/iwlwifi-9260-th-b0-jf-b0-38.ucode

Ubuntu completely stopped detecting any wifi adapter at all, so now I have no idea what to do.

Here's output from commands that seem important from looking through similar posts:

Output from lspci -knn | grep Net -A3; rfkill list:

00:14.3 Network controller [0280]: Intel Corporation Device [8086:02f0]
    Subsystem: Intel Corporation Device [8086:0030]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi
0: tpacpi_bluetooth_sw: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

Output from dmesg | grep iwl:

[    5.317830] Loading modules backported from iwlwifi
[    5.317831] iwlwifi-stack-public:master:8324:9176b151
[    5.385415] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
[    5.401853] iwlwifi 0000:00:14.3: Direct firmware load for iwl-dbg-cfg.ini failed with error -2
[    5.402022] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-jf-b0-55.ucode failed with error -2
[    5.402116] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-jf-b0-54.ucode failed with error -2
[    5.402211] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-jf-b0-53.ucode failed with error -2
[    5.402222] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-jf-b0-52.ucode failed with error -2
[    5.402232] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-jf-b0-51.ucode failed with error -2
[    5.402454] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-jf-b0-50.ucode failed with error -2
[    5.402465] iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-QuZ-a0-jf-b0-49.ucode failed with error -2
[    5.404064] iwlwifi 0000:00:14.3: TLV_FW_FSEQ_VERSION: FSEQ Version: 43.2.23.17
[    5.404066] iwlwifi 0000:00:14.3: Found debug destination: EXTERNAL_DRAM
[    5.404067] iwlwifi 0000:00:14.3: Found debug configuration: 0
[    5.404286] iwlwifi 0000:00:14.3: loaded firmware version 48.13675109.0 QuZ-a0-jf-b0-48.ucode op_mode iwlmvm
[    5.404304] iwlwifi 0000:00:14.3: Direct firmware load for iwl-debug-yoyo.bin failed with error -2
[    5.442441] RIP: 0010:iwl_op_mode_mvm_start+0xa8/0xb50 [iwlmvm]
[    5.442479]  _iwl_op_mode_start.isra.6+0x47/0x80 [iwlwifi]
[    5.442489]  iwl_opmode_register+0x88/0xe0 [iwlwifi]
[    5.442510]  __init_backport+0x3d/0x1000 [iwlmvm]
[    5.442565] Modules linked in: iwlmvm(OE+) snd_soc_core aesni_intel(+) snd_compress ac97_bus snd_pcm_dmaengine btusb crypto_simd mac80211(OE) btrtl cryptd libarc4 btbcm glue_helper drm_kms_helper fjes(-) uvcvideo btintel iwlwifi(OE) intel_cstate snd_hda_intel videobuf2_vmalloc drm bluetooth videobuf2_memops snd_intel_dspcfg videobuf2_v4l2 snd_hda_codec videobuf2_common snd_hda_core snd_seq_midi videodev snd_seq_midi_event thinkpad_acpi(+) snd_hwdep processor_thermal_device i2c_algo_bit intel_lpss_pci(+) ecdh_generic cfg80211(OE) fb_sys_fops intel_lpss nvram intel_wmi_thunderbolt serio_raw wmi_bmof input_leds mc ledtrig_audio ecc snd_pcm snd_rawmidi intel_rapl_common mei_me idma64 syscopyarea compat(OE) virt_dma mei sysfillrect ucsi_acpi sysimgblt intel_soc_dts_iosf typec_ucsi snd_seq typec snd_seq_device snd_timer snd int3403_thermal soundcore int340x_thermal_zone mac_hid int3400_thermal acpi_thermal_rel acpi_pad acpi_tad sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4
[    5.442623] RIP: 0010:iwl_op_mode_mvm_start+0xa8/0xb50 [iwlmvm]

Output from lspci -nnk | grep 0280 -A3:

00:14.3 Network controller [0280]: Intel Corporation Device [8086:02f0]
    Subsystem: Intel Corporation Device [8086:0030]
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi

I'd be happy to post any more output that is required to fix this problem, but I'm not sure exactly what would be useful at this point, so please let me know. Thanks for any help.

1 Answers1

2

This will be a partial answer until we find further information.

Ubuntu completely stopped detecting any wifi adapter at all, so now I have no idea what to do.

Let's undo the step that disabled the wireless. From the terminal:

cd backport-iwlwifi
sudo make uninstall

Reboot. Now is the wireless working, albeit unstable?

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi bt_coex_active=N"

I believe that the idea is for the wireless driver and bluetooth to coexist. Please try, instead:

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi bt_coex_active=Y"

That is, 'Yes, I DO want wifi and bluetooth to coexist.' Follow with:

sudo modprobe -r iwlwifi
sudo modprobe iwlwifi bt_coex_active=Y   

Is there any improvement?

EDIT: Since bluetooth frequencies overlap 2.4 gHz wifi channels, you may find improved performance by using 5 gHz channels only in wifi. As most consumer-grade routers are set, by default, to use the same SSID, or router name, for both segments and, further, to enable auto selection of the channel, it is very likely that your wifi is roaming among the 2.4 and 5 gHz channels. You can avoid this by renaming the segments to differing names such as chili2.4 and chili5 or some such. After making this change, connect to chili5; that is, using the 5 gHz channel exclusively.

There are also several steps you can take to optimize wireless connectivity. First, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I recommend a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

EDIT2: Let's try updating the firmware files. From the terminal:

wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.189_all.deb
sudo dpkg -i linux-*.deb

Reboot and let us see another paste of:

ping -c10 www.ubuntu.com
dmesg | grep -e wlp -e iwl

http://paste.ubuntu.com

EDIT3: I suggest that you remove the backport package that has often been shown to be troublesome:

sudo apt purge backport-iwlwifi-dkms

Reboot and let us hear the result.

chili555
  • 60,188
  • Thanks for your reply! The first set of commands in the terminal did get the wireless working. However, after following the second set of commands for the bluetooth, my connection is still quite unstable. For example, it took 10+ seconds to load my email page. – Cathy Hsu Jul 27 '20 at 21:25
  • Please see my edit above in a few moments. – chili555 Jul 27 '20 at 21:46
  • I was able to split my wifi into 2.4 gHz and 5 gHZ channels with different names and confirmed it uses the WPA2 security but do not have the capability (as far as I know) of changing the channel widths or using changing the fixed channels. So far it definitely seems like a better connection but it still seems to disconnect periodically. The wifi icon does not vanish or show a complete disconnection, but webpages won't load. (I don't know if this is relevant but Firefox is also working significantly worse than Chrome.) – Cathy Hsu Jul 28 '20 at 05:27
  • Please run the terminal commands: ping -c10 www.ubuntu.com and also: dmesg | grep -e iwl -e wlp As the result will be lengthy, paste the result here and give us the link: http://paste.ubuntu.com – chili555 Jul 28 '20 at 14:42
  • Link for output of commands: https://paste.ubuntu.com/p/fwzNxqGbdv/ – Cathy Hsu Jul 28 '20 at 15:06
  • Your demsg looks as if you connected perfectly but your ping does not. Does ip addr show have valid inet address 192.168.x.x or 172.x.x.x or some such? What does this report? ls -al /etc/resolv.conf Please see my edit above. – chili555 Jul 28 '20 at 15:22
  • ip addr show does seem to give a valid inet address 10.x.x.xxx/xx – Cathy Hsu Jul 28 '20 at 15:38
  • Output from ls -al /etc/resolv.conf: -rw-r--r-- 1 root root 79 Jul 28 08:11 /etc/resolv.conf – Cathy Hsu Jul 28 '20 at 15:43
  • Output from the first step of Edit 2 (which was not successful): https://paste.ubuntu.com/p/FcxB3HZY3f/ – Cathy Hsu Jul 28 '20 at 15:47
  • I think you mis-typed the URL. It is not mirrors/kernel, it is mirrors.kernel. You may safely copy and paste my command above. – chili555 Jul 28 '20 at 15:54
  • Edit 3 worked perfectly -- thank you so much! – Cathy Hsu Jul 30 '20 at 16:50