Bug 119241 - iwlwifi: 3160: wireless signal very poor, no bluetooth working
Summary: iwlwifi: 3160: wireless signal very poor, no bluetooth working
Status: NEEDINFO
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-30 10:07 UTC by Michele Mattioni
Modified: 2016-12-07 06:05 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.4.11-040411-generic
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
dmesg output (59.05 KB, text/plain)
2016-05-30 10:07 UTC, Michele Mattioni
Details
trace.data compressed (1.41 MB, application/x-bzip)
2016-07-12 06:23 UTC, Michele Mattioni
Details

Description Michele Mattioni 2016-05-30 10:07:53 UTC
Created attachment 218231 [details]
dmesg output

I have a computer (intel based) with the Intel Dual band 3160, which has booth wireless and bluetooth capabilities. 
Excerpt from dmesg:
```
[  612.459879] iwlwifi 0000:01:00.0: Detected Intel(R) Dual Band Wireless AC 3160, REV=0x164
```

With the previous kernel I was able to use the Bluetooth, and the received signal for the wireless was always very strong.

Starting with the latest kernel (I've tried 4.2, 4.4.0, and 4.4.11 mainline) I couldn't get the bluetooth working, and the degradation of the wifi signal is significant (sometimes not only the transfer is very slow, but the card cannot even associate with an Access Point).

Kernel version:
```
Linux version 4.4.11-040411-generic (kernel@tangerine) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) ) #201605182255 SMP Thu May 19 02:57:22 UTC 2016 
```

I think this should be considered a regression, because it was working very well with previous kernels.
Comment 1 Michele Mattioni 2016-05-30 11:05:37 UTC
I have also updated to the latest mainline kernel (4.6.0-040600-generic) and I can still confirm the problem
Comment 2 Emmanuel Grumbach 2016-05-30 11:18:56 UTC
please check with different wifi firmware version.

ethtool -i wlan0 will tell you what version you are currently running.
Comment 3 Michele Mattioni 2016-05-30 11:40:01 UTC
This is the output:

```
mattions@apollo:~$ ethtool -i wlp1s0
driver: iwlwifi
version: 4.6.0-040600-generic
firmware-version: 17.311016.0
expansion-rom-version: 
bus-info: 0000:01:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
```

The device is named wlp1s0 on my system.

I've tested the firmware from 13 to 17 (the range accepted by the kernel 4.6), but no difference could be detected.
Comment 4 Emmanuel Grumbach 2016-05-30 16:38:42 UTC
Do you still have the kernel that was working well? What was that version?
Can you please check that it still works well and the issue is not caused by an environmental change?

We have a backport tree that can be easily bisectable. If you can go back to an old kernel, you can use that backport tree to try to bisect the problem.

Please check the bug I just linked as well.

Commit 923a8c1d8069104726bde55c37cec66324ccc328 and 34c8b24ff284 are related probably.
But you have the fix in 4.6...
Comment 5 Michele Mattioni 2016-05-30 17:15:32 UTC
I knew it was working with Ubuntu 14.04 (https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes/14.04), which was using the kernel:  3.13.0-24.46 Ubuntu Linux kernel

I remember that I was doing the upgrade normally, and then one day the bluettooth was not working anymore, and the wireless performance degraded.

Unfortunately I can not pick the exact kernel, however the latest ubuntu 14.04 has the  3.19 according to the releases, so maybe the problem could be between the two.

I've tried to install very old kernels (via debian), however I have some dependencies conflict and they do not get install properly.

I can't find the linked bug, where is it?
Comment 6 Emmanuel Grumbach 2016-05-30 17:34:17 UTC
Look for See Also.
Comment 7 Emmanuel Grumbach 2016-07-11 05:49:53 UTC
I was talking about this: https://bugzilla.kernel.org/attachment.cgi?id=178441&action=diff

If you can't find the configuration that worked, we'd need to go for firmware debugging, that typically takes a lot of time.

Can you please install our Core19 release (with Core14 firmware since your device is EOL'ed) and let us know?
In your case, you can install the driver and the firmware only. No need to update the wpa_supplicant, but please make sure you disable VENDOR_CMDS as written in this page:

https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release

thank you.
Comment 8 Michele Mattioni 2016-07-11 07:29:46 UTC
@Emmanuel: so you say that the only firmware that should work properly in my case is the `/lib/firmware/iwlwifi-3160-14.ucode`?

So basically the steps I have to do:

1)
git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git -b release/LinuxCore19

and then follow the steps to compile it.

2) How do I get Core14 firmware?

Then I should just reboot?
If this completely kills my wireless, can I remove it/uninstall it?
Comment 9 Emmanuel Grumbach 2016-07-11 07:36:53 UTC
I just say it is worth trying.
Actually, I just checked, you should be able to skip step 1. Your kernel is new enough to use the -17.ucode.
Just check the version you use with ethtool -i wlp1s0

You can get the Core14 firmware from here https://git.kernel.org/cgit/linux/kernel/git/iwlwifi/linux-firmware.git/plain/iwlwifi-3160-17.ucode

Just drop the file into /lib/firwmare and reboot, then check with ethtool -i wlp1s0
Comment 10 Michele Mattioni 2016-07-11 07:46:12 UTC
This is the result:

```
mattions@apollo:~$ ethtool -i wlp1s0
driver: iwlwifi
version: 4.4.0-28-generic
firmware-version: 17.352738.0
expansion-rom-version: 
bus-info: 0000:01:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
```

However bluetooth is dead, and the wireless signal did not improve.
(I skipped the reboot, I did modprobe -r. Let me know if this change a lot the situation and I will do a reboot).
Comment 11 Emmanuel Grumbach 2016-07-11 07:48:50 UTC
Ok thanks.

can you please record tracing?

https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/debugging#tracing

This may give us an insight on why traffic doesn't flow.
If that doesn't shed more light, we'd need to debug the firmware.
Comment 12 Michele Mattioni 2016-07-12 06:23:50 UTC
Created attachment 222931 [details]
trace.data compressed

Trace.dat obtained with

      sudo trace-cmd record -e iwlwifi
Comment 13 Emmanuel Grumbach 2016-07-12 10:50:41 UTC
What signal do you see?

From the data you sent, you have around -80 which is low, but possible.
To further debug this we'd need to debug the firmware, but the problem is that our firmware team and especially the BT Coexistence team is completely overloaded and it can take a long time until we get inputs from them.

Let me know if you choose to provide the firmware data and I'll send the instructions on how to proceed.
Comment 14 Emmanuel Grumbach 2016-07-12 15:00:52 UTC
Another thing we can try is to disable 11n. 11n can have bandwidth and rate settings that can make the interference with BT even worse.

please add:

options iwlwifi 11n_disable=1

to /etc/modprobe.d/iwlwifi.conf
and reload the module or reboot.

Thanks!
Comment 15 Michele Mattioni 2016-07-13 06:45:39 UTC
Hi Emmanuel,

I've added the option to the /etc/modprobe.d/iwlwifi.conf

but no real improvement:

before:

```
    mattions@apollo:~$ sudo iwconfig 
    lo        no wireless extensions.

    wlp1s0    IEEE 802.11abgn  ESSID:"palmaland"  
              Mode:Managed  Frequency:2.412 GHz  Access Point: C0:3E:0F:E7:6B:49   
              Bit Rate=57.8 Mb/s   Tx-Power=20 dBm   
              Retry short limit:7   RTS thr:off   Fragment thr:off
              Encryption key:off
              Power Management:off
              Link Quality=42/70  Signal level=-68 dBm  
              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
              Tx excessive retries:0  Invalid misc:577   Missed beacon:0

    docker0   no wireless extensions.
```

After:

```
    mattions@apollo:~$ sudo iwconfig 
    lo        no wireless extensions.

    wlp1s0    IEEE 802.11abg  ESSID:"palmaland"  
              Mode:Managed  Frequency:2.412 GHz  Access Point: C0:3E:0F:E7:6B:49   
              Bit Rate=48 Mb/s   Tx-Power=20 dBm   
              Retry short limit:7   RTS thr:off   Fragment thr:off
              Encryption key:off
              Power Management:on
              Link Quality=44/70  Signal level=-66 dBm  
              Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
              Tx excessive retries:1  Invalid misc:101   Missed beacon:0

    docker0   no wireless extensions.
```

If I can offer my help on debugging the firmware. Thanks!
Comment 16 Emmanuel Grumbach 2016-07-13 06:53:27 UTC
In any case, I don't really see any bug here. The bit rate is high, the signal level is fair (-66)...
Comment 17 Michele Mattioni 2016-07-13 07:21:11 UTC
Well the bluetooth is broken (and it was working) and I can't get signal anymore in a room in the office where before I was able to do it.

From my point of view the regression is there.
Comment 18 Emmanuel Grumbach 2016-07-20 20:13:32 UTC
I understand, but I am sorry to say that the symptoms aren't obvious and precise enough to be "debuggable".

I am moving the bug to BT and removing the intel wifi team.
Comment 19 Michele Mattioni 2016-11-06 11:11:12 UTC
Hi,

how can I provide the info needed for this bug?

My problem is still the same: the bluetooth is not working and the wireless card picks up only a very weak signal.

Thanks.

Note You need to log in before you can comment on or make changes to this bug.