Missing wifi and bluetooth after sleep on XPS 9370

Bug #1799988 reported by kao
130
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Dell Sputnik
New
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I have XPS9370 with self-installed Ubuntu 18.10 (not project sputnik) with Killer 1435 wireless module.
And sometimes I find wifi and bluetooth missing after sleep. I cannot exactly define preconditions, but it seems there are following steps to reproduce the issue
1. Connect something via bluetooth (I use bluetooth headset)
2. Send laptop to sleep
3. Wake it and find wifi and bluetooth missing.

I have to mention that I have also been experienced bluetooth only missing, but it somehow transformed to the issue with both wireless devices.

Dmesg after waking up with the issue attached
---
ProblemType: Bug
ApportVersion: 2.20.10-0ubuntu13
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: kao 2362 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 18.10
InstallationDate: Installed on 2018-09-22 (33 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Alpha amd64 (20180922)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 012: ID 0489:e0a2 Foxconn / Hon Hai
 Bus 001 Device 002: ID 0bda:58f4 Realtek Semiconductor Corp.
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc. XPS 13 9370
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.18.0-10-generic root=UUID=34230cbd-d3d2-4cb8-855a-307883bc35ea ro quiet splash mem_sleep_default=deep video=1920x1080 usbcore.dyndbg=+p vt.handoff=1
ProcVersionSignature: Ubuntu 4.18.0-10.11-generic 4.18.12
RelatedPackageVersions:
 linux-restricted-modules-4.18.0-10-generic N/A
 linux-backports-modules-4.18.0-10-generic N/A
 linux-firmware 1.175
Tags: cosmic
Uname: Linux 4.18.0-10-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 08/09/2018
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.5.1
dmi.board.name: 0VM1FG
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.5.1:bd08/09/2018:svnDellInc.:pnXPS139370:pvr:rvnDellInc.:rn0VM1FG:rvrA00:cvnDellInc.:ct10:cvr:
dmi.product.family: XPS
dmi.product.name: XPS 13 9370
dmi.product.sku: 07E6
dmi.sys.vendor: Dell Inc.

Revision history for this message
kao (kao1985) wrote :
Revision history for this message
kao (kao1985) wrote :

apport-collect collected no additional data

Revision history for this message
kao (kao1985) wrote :

Use latest firmware for wifi and bluetooth (from linux-firmware git)

/lib/firmware/ath10k/QCA6174/hw3.0/firmware-4.bin
QCA-ATH10KwWLAN.RM.2.0-00180-QCARMSWPZ-1www
/lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin
QCA-ATH10KwRM.4.4.1.c2-00057-QCARMSWP-1

Bluetooth: hci0: QCA: patch rome 0x302 build 0x3e8, firmware rome 0x302 build 0x111
-rw-r--r-- 1 root root 1996 Oct 19 16:46 nvm_usb_00000302.bin
-rw-r--r-- 1 root root 64168 Oct 19 16:46 rampatch_usb_00000302.bin

kao (kao1985)
affects: dell-sputnik → ubuntu
Revision history for this message
thoughton (thoughton) wrote :

I think I have same issue:

XPS 9370. Self-installed Ubuntu 18.04. Not sure which wifi adapter (how can I tell?).

Bluetooth AND Wifi dissappear after waking from sleep.

Note: I have configured "deep" sleep, as by default it was not conserving much power at all.

Sorry, I do not mean to add noise to this issue, I just wanted to say it (seems to) affect others too.

Revision history for this message
Cristian Aravena Romero (caravena) wrote :

Did this issue start happening after an update/upgrade? Was there a
prior kernel version where you were not having this particular problem?

Would it be possible for you to test the latest upstream kernel? Refer
to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest
v4.19 kernel[0].

If this bug is fixed in the mainline kernel, please add the following
tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag:
'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as
"Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19

affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Cristian Aravena Romero (caravena) wrote :

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1799988

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

Revision history for this message
kao (kao1985) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected cosmic
description: updated
Revision history for this message
kao (kao1985) wrote : CRDA.txt

apport information

Revision history for this message
kao (kao1985) wrote : CurrentDmesg.txt

apport information

Revision history for this message
kao (kao1985) wrote : IwConfig.txt

apport information

Revision history for this message
kao (kao1985) wrote : Lspci.txt

apport information

Revision history for this message
kao (kao1985) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
kao (kao1985) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
kao (kao1985) wrote : ProcEnviron.txt

apport information

Revision history for this message
kao (kao1985) wrote : ProcInterrupts.txt

apport information

Revision history for this message
kao (kao1985) wrote : ProcModules.txt

apport information

Revision history for this message
kao (kao1985) wrote : PulseList.txt

apport information

Revision history for this message
kao (kao1985) wrote : RfKill.txt

apport information

Revision history for this message
kao (kao1985) wrote : UdevDb.txt

apport information

Revision history for this message
kao (kao1985) wrote : WifiSyslog.txt

apport information

Revision history for this message
kao (kao1985) wrote :

Cristian Aravena Romero,

The issue started happening as soon as I fresh-installed ubuntu 18.10 alpha and keep happening until now (mixing "bluetooth only missing" and "bluetooth and wifi missing). As I stated earlier, I am not sure why and when it happens. Yesterday it has been 100% reproducible with steps in original message. Today I cannot reproduce it, both wifi and bluetooth wake.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Changed in linux (Ubuntu):
assignee: nobody → Kai-Heng Feng (kaihengfeng)
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Kao, I can see the issue on the XPS 9370 w/ Killer 1435. Let me see what I can do.

Revision history for this message
Chris Klosowski (cklosowski) wrote :

I've had some intermittent Wi-Fi issues after upgrading to 18.10.

I started with the 16.04 installed from Dell, then did the upgrade to 18.04 and then 18.10. Since going to 18.10 (which comes with the new Gnome Shell) I've had issues with WiFi basically become unresponsive after periods of time. I can try and disable WiFi but even the Gnome Shell controls for it get confused on the status of the device.

I'm currently running with the Bluetooth disabled in the bios in order to see if it resolves the WiFi issues. So far it's kept me up and running longer than I've previously seen so it might be something to do with the drivers for the included wireless card that runs both the bluetooth and wifi (I believe)

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Chris,

Do you use Intel Wireless or Killer Wireless?

Revision history for this message
Chris Klosowski (cklosowski) wrote :

This is my readout from running a wireless info report, a note I'm using docker for local development work, so there are a bunch of bridged connections in the iwconfig. I've tried removing docker and still the issue persists. If the information below isn't adequate let me know of a way to get the information you're needing.

##### lspci #############################

02:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32)
 Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter [1a56:143a]
 Kernel driver in use: ath10k_pci

##### rfkill ############################

0: hci0: Bluetooth
 Soft blocked: no
 Hard blocked: no
1: phy0: Wireless LAN
 Soft blocked: no
 Hard blocked: no

##### lsmod #############################

dell_laptop 20480 0
ath10k_pci 40960 0
dell_wmi 16384 0
ath10k_core 417792 1 ath10k_pci
dell_smbios 24576 2 dell_wmi,dell_laptop
ath 32768 1 ath10k_core
mac80211 794624 1 ath10k_core
wmi_bmof 16384 0
dell_wmi_descriptor 16384 2 dell_wmi,dell_smbios
intel_wmi_thunderbolt 16384 0
cfg80211 663552 3 ath,mac80211,ath10k_core
sparse_keymap 16384 2 intel_hid,dell_wmi
wmi 24576 5 intel_wmi_thunderbolt,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor
video 45056 3 dell_wmi,dell_laptop,i915

##### iwconfig ##########################

br-0680506540cc no wireless extensions.

br-c9b267cdf2c6 no wireless extensions.

br-06a283ed0e91 no wireless extensions.

br-b39cec6f88dc no wireless extensions.

br-20073a203686 no wireless extensions.

lo no wireless extensions.

br-972d48aae12f no wireless extensions.

br-9eeb404e9eb7 no wireless extensions.

br-97bdda20c461 no wireless extensions.

docker0 no wireless extensions.

enx<IF from MAC [IF23]> no wireless extensions.

br-66b090f76f15 no wireless extensions.

br-974fea63d9ac no wireless extensions.

br-6ac4d4451b9f no wireless extensions.

br-c8ae023a9d90 no wireless extensions.

br-1d71ca8c1162 no wireless extensions.

br-58bc68ccd1b0 no wireless extensions.

br-9f43193fcebb no wireless extensions.

br-465eadd2becc no wireless extensions.

br-c6338b1e0cf1 no wireless extensions.

br-2e40a51ec6fb no wireless extensions.

br-275e290cebdc no wireless extensions.

br-c27443c14c71 no wireless extensions.

wlp2s0 IEEE 802.11 ESSID:off/any
          Mode:Managed Access Point: Not-Associated Tx-Power=30 dBm
          Retry short limit:7 RTS thr:off Fragment thr:off
          Power Management:on

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Seems like this also happens to v4.19. Trying v4.15 to see if this is a regression...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Observed the issue on 4.15 but not on 4.4.

Changed in linux (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

The issue is introduced by this commit:
commit a0085f2510e8976614ad8f766b209448b385492f
Author: Sukumar Ghorai <email address hidden>
Date: Wed Aug 16 14:46:55 2017 -0700

    Bluetooth: btusb: driver to enable the usb-wakeup feature

The root cause though, is that some Bluetooth LE advertising events wake up the BT controller during system suspend.

I am working on a fix that ignores advertising events during suspend.

Revision history for this message
aberry5555 (aberry9036) wrote :

I am running fedora 28 with kernel 4.19.8-300 and see this issue too, but just any FYI it seems disabling the wireless switch for both bt & wifi (by default both wireless and bluetooth can be switched on/off with the fn+home buttons) in the BIOS resolves this issue, only mentioning as it might help track down the bug.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

aberry5555,

Does Bluetooth/Wifi drop off after reboot? That's another issue though. See LP: #1757218.

Revision history for this message
aberry5555 (aberry9036) wrote :

When I was seeing this issue before I made the bios config change, I did notice that when the wifi and/or bluetooth died it'd need a hard power down and start up rather than a reboot to get it properly working.

To test your query I just rebooted three times in a row, wireless came up, authenticated and got an IP each time, bluetooth was also visible and available to be used (though, as I'm on the train, I have no bluetooth device on hand to actually test it with) whereas, usually if it were broken, wifi & bluetooth would not show as available in the gnome interface or the terminal.

Revision history for this message
aberry5555 (aberry9036) wrote :

As an FYI, here's info about my bios version:

alexberry:~/ $ sudo dmidecode -t bios -q [9:04:26]
BIOS Information
 Vendor: Dell Inc.
 Version: 1.5.1
 Release Date: 08/09/2018
 Address: 0xF0000
 Runtime Size: 64 kB
 ROM Size: 16 MB
 Characteristics:
  PCI is supported
  PNP is supported
  BIOS is upgradeable
  BIOS shadowing is allowed
  Boot from CD is supported
  Selectable boot is supported
  EDD is supported
  Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
  5.25"/1.2 MB floppy services are supported (int 13h)
  3.5"/720 kB floppy services are supported (int 13h)
  3.5"/2.88 MB floppy services are supported (int 13h)
  Print screen service is supported (int 5h)
  8042 keyboard services are supported (int 9h)
  Serial services are supported (int 14h)
  Printer services are supported (int 17h)
  ACPI is supported
  USB legacy is supported
  Smart battery is supported
  BIOS boot specification is supported
  Function key-initiated network boot is supported
  Targeted content distribution is supported
  UEFI is supported
 BIOS Revision: 1.5

BIOS Language Information
 Language Description Format: Long
 Installable Languages: 2
  en|US|iso8859-1
  <BAD INDEX>
 Currently Installed Language: en|US|iso8859-1

Revision history for this message
David G (dgab) wrote :

Hi, I just experienced this today, the only thing that was not usual was that I left my Bluetooth Headphones which were previously used on and the notebook fell asleep. Maybe this is a coincidence, but it happened to me in this exact combination and only once since ever.

Revision history for this message
David G (dgab) wrote :

Sorry for bloating up here, just wanted to state that I have the same bios version as aberry5555

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Kao,

Please test kernel in [1].
This kernel disables Bluetooth LE advertising event before suspend.
I no longer see the issue on the XPS 9370 at my hand.

[1]https://people.canonical.com/~khfeng/lp1799988/

Revision history for this message
kao (kao1985) wrote :

Kai Heng,

Should I keep btusb autosuspend disabled (I have been using it as workaround) while testing?
And could you write few words how missing bluetooth is related to advertising event?

Thank you

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please enable btusb autosuspend during test.

This is what happened:
[25781.865975] PM: suspend entry (deep)
System is about to suspend to deep (S3),

[25782.016682] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
[25782.016691] dpm_run_callback(): pci_pm_suspend+0x0/0x130 returns -16
[25782.016694] PM: Device 0000:00:14.0 failed to suspend async: error -16
[25782.920799] PM: Some devices failed to suspend, or early wake event detected
But the xHC (USB controller) wakes up early, so the system aborted S3,

[25782.922906] usb usb1-port7: status 0103 change 0004
The one wakes xHC up is btusb, which is woken up by BLE events,

[25783.167977] PM: suspend exit
[25783.168050] PM: suspend entry (s2idle)
System tries to suspend again, via s2idle. This happens more than once.

[25842.804908] PM: suspend entry (deep)
[25842.804912] PM: Syncing filesystems ... done.
[25842.834864] Freezing user space processes ... (elapsed 0.002 seconds) done.
[25842.837207] OOM killer disabled.
[25842.837208] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[25842.838619] Suspending console(s) (use no_console_suspend to debug)

Finally it suspends successfully, but both btusb and ath10k_pci devices fail to work:
[25843.579504] ath10k_pci 0000:02:00.0: Refused to change power state, currently in D3
[25844.303534] usb 1-7: device descriptor read/64, error -71

Most devices' .resume() and .suspend() callbacks rely on full system suspend/resume works successfully. This assumption breaks when the first system suspend fails, which is cause by the BLE event.

Revision history for this message
kao (kao1985) wrote :

Just preliminary results. Done 2 cycles of sleep-wake. No signs of missing wifi+bluetooth. It seems encouraging.

Revision history for this message
kao (kao1985) wrote :

Bt+wifi still disappear if laptop goes to sleep while bluetooth active.
In my case, steps to reproduce
1. Listen bluetooth headset
2. Close a lid
3. Wake laptop and watch missed bt+wifi

Logs attached

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Now it's a different issue.

The original issue, which is the system gets woken up early by btusb, seems to be solved.
I don't see "PM: Device 0000:00:14.0 failed to suspend async: error -16" in your new message.

So does this issue happen when Bluetooth is completely disabled?

Revision history for this message
kao (kao1985) wrote :

I didn't test it with disabled Bluetooth. So cannot provide correct information.

However, there is some update on the issue. Recently (4 days ago), I have rolled back to default kernel 4.18 and updated atheros firmware to one from kvalo (QCA-ATH10KwWLAN.RM.4.4.1-00128-QCARMSWPZ).
By now, the issue haven't occurred at all.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Is "dpm_run_callback()" still shown in dmesg?

Revision history for this message
kao (kao1985) wrote :

Cannot see such text. Should I enable some debug flags?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

No it means somehow it's fixed by the new firmware.

Revision history for this message
kao (kao1985) wrote :

As soon as it seems that the issue has been resolved, something bad occurs again.
Right now my laptop woke up without bluetooth (but with wifi). No dpm_run_callback trail though.

Could it be related to bug #1766825 (bluetooth missing after suspend)

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Actually, it still happens:
[45130.159244] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
[45130.159255] dpm_run_callback(): pci_pm_suspend+0x0/0x130 returns -16
[45130.159258] PM: Device 0000:00:14.0 failed to suspend async: error -16
[45130.696215] PM: Some devices failed to suspend, or early wake event detected

This may or may not caused the issue you saw later on:
[45161.989718] usb 1-7: reset full-speed USB device number 4 using xhci_hcd
[45162.117467] usb 1-7: device descriptor read/64, error -71

...which might be able to be solved by this patch series:
https://lore.kernel.org/patchwork/project/lkml/list/?series=379179

Please give it a try.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

FWIW, the "firmware crashed" seems to be solved once a delay is used before resume. But since you no longer see the issue...

Revision history for this message
kao (kao1985) wrote :

Actually, I still have the issue with wifi/bluetooth. But it has so numerous options, so I'm kind of confused.
Now I can definitely state that updated ath10k fw (up to 132) didn't help.
It can be no signs of the issue for few days after update, but it eventually occurs.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Raphael Kimmig (rkimmig) wrote :

I've been testing the patches you linked above on Fedora 29 against 4.19.15-302 for about two weeks and so far I haven't had wifi disappear. I'm reasonably certain that I've lost bluetooth at least once so I'm not quite sure whether the results are just a conicidence.

Revision history for this message
Raphael Kimmig (rkimmig) wrote :

I forgot to add, I'm currently using an older firmware version RM.4.4.1.c2-00057-QCARMSWP-1 (which is mostly a leftover of searching for one that doesn't result in crashes). If you'd like to get any logs or or want me to run any tests, I'll gladly help.

Revision history for this message
Raphael Kimmig (rkimmig) wrote :
Download full text (10.7 KiB)

I'm now running the patches against 4.20.7 with firmware=RM.4.4.1.c2-00057-QCARMSWP-1 and I'm seeing some issues in the log after resume, however the wifi does work fine.

Feb 09 08:13:21 hostname kernel: ACPI: Waking up from system sleep state S3
Feb 09 08:13:21 hostname kernel: ACPI: EC: interrupt unblocked
Feb 09 08:13:21 hostname kernel: ACPI: EC: event unblocked
Feb 09 08:13:21 hostname kernel: ath10k_pci 0000:02:00.0: unsupported HTC service id: 1536
Feb 09 08:13:21 hostname kernel: ath10k_pci 0000:02:00.0: Unknown eventid: 118809
Feb 09 08:13:21 hostname kernel: WARNING: CPU: 2 PID: 26770 at drivers/net/wireless/ath/ath10k/mac.c:5650 ath10k_bss_info_changed+0xe8e/0xfd0 [ath10k_core]
Feb 09 08:13:21 hostname kernel: Modules linked in: cmac rfcomm bnep btusb btrtl btbcm btintel bluetooth ecdh_generic ath10k_pci ath10k_core mac80211 ath cfg80211 thunderbolt fuse ccm xt_CHECKSUM ipt_MASQUERADE tun bridge stp llc devlink nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4 nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables sunrpc vfat fat arc4 hid_multitouch snd_hda_codec_hdmi snd_soc_skl snd_soc_hdac_hda snd_hda_ext_core snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_acpi_intel_match snd_soc_acpi snd_soc_core snd_hda_codec_realtek intel_rapl snd_hda_codec_generic snd_compress x86_pkg_temp_thermal intel_powerclamp ac97_bus iTCO_wdt coretemp snd_pcm_dmaengine dell_laptop iTCO_vendor_support mei_wdt kvm_intel
Feb 09 08:13:21 hostname kernel: snd_hda_intel intel_cstate snd_hda_codec snd_hda_core snd_hwdep intel_uncore snd_seq intel_rapl_perf snd_seq_device snd_pcm dell_wmi uvcvideo dell_smbios joydev videobuf2_vmalloc dcdbas snd_timer videobuf2_memops videobuf2_v4l2 snd videobuf2_common wmi_bmof dell_wmi_descriptor intel_wmi_thunderbolt videodev soundcore rtsx_pci_ms mei_me cdc_acm memstick i2c_i801 media idma64 mei rfkill processor_thermal_device intel_lpss_pci ucsi_acpi typec_ucsi intel_lpss intel_soc_dts_iosf intel_pch_thermal typec intel_hid sparse_keymap int3403_thermal int3400_thermal int340x_thermal_zone acpi_thermal_rel pcc_cpufreq acpi_pad dm_crypt hid_logitech_hidpp hid_logitech_dj i915 r8152 mii kvmgt mdev vfio kvm rtsx_pci_sdmmc irqbypass mmc_core i2c_algo_bit drm_kms_helper crct10dif_pclmul crc32_pclmul crc32c_intel drm nvme ghash_clmulni_intel serio_raw rtsx_pci wmi i2c_hid nvme_core video pinctrl_sunrisepoint pinctrl_intel [last unloaded: cfg80211]
Feb 09 08:13:21 hostname kernel: CPU: 2 PID: 26770 Comm: kworker/u16:1 Tainted: G W 4.20.7-201.0001_fix_ath10k_sleep_wake_issue.patch.fc29.x86_64 #1
Feb 09 08:13:21 hostname kernel: Hardware name: Dell Inc. XPS 13 9370/0F6P3V, BIOS 1.6.3 11/04/2018
Feb 09 08:13:21 hostname kernel: Workqueue: events_unbound async_run_entry_fn
Feb 09 08:13:21 hostname kernel: RIP: 0010:ath10k_bss_info_changed+0xe8e/0xfd0 [ath10k_core]
Feb 09 08:13:21 hostname kernel: Code: 89 c1 89 f2 4c 89 d7 48 c7 c...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please try the kernel in #50.

Revision history for this message
Raphael Kimmig (rkimmig) wrote :

I'll gladly try any patches, if that would be helpful to you. I do however not use ubuntu, so the kernel in #50 is not really an option.

Revision history for this message
David Rasch (rasch) wrote :

Tried the kernel in #50 and seeing better stability.

Still seeing firmware crashes. But recovery seems to work and wifi restored:

[ 4064.530572] ath10k_pci 0000:02:00.0: firmware crashed! (guid 96a14669-a82f-4941-a3b3-690b13b81df9)
[ 4064.530628] ath10k_pci 0000:02:00.0: qca6174 hw3.2 target 0x05030000 chip_id 0x00340aff sub 1a56:143a
[ 4064.530639] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[ 4064.532787] ath10k_pci 0000:02:00.0: firmware ver WLAN.RM.4.4.1-00079-QCARMSWPZ-1 api 6 features wowlan,ignore-otp crc32 fd869beb
[ 4064.534233] ath10k_pci 0000:02:00.0: board_file api 2 bmi_id N/A crc32 20d869c3
[ 4064.534258] ath10k_pci 0000:02:00.0: htt-ver 3.47 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[ 4064.544704] ath10k_pci 0000:02:00.0: failed to get memcpy hi address for firmware address 4: -16
[ 4064.544710] ath10k_pci 0000:02:00.0: failed to read firmware dump area: -16
[ 4064.544712] ath10k_pci 0000:02:00.0: Copy Engine register dump:
[ 4064.544722] ath10k_pci 0000:02:00.0: [00]: 0x00034400 11 11 3 3
[ 4064.544732] ath10k_pci 0000:02:00.0: [01]: 0x00034800 8 7 500 501
[ 4064.544741] ath10k_pci 0000:02:00.0: [02]: 0x00034c00 8 7 6 7
[ 4064.544750] ath10k_pci 0000:02:00.0: [03]: 0x00035000 15 15 17 15
[ 4064.544759] ath10k_pci 0000:02:00.0: [04]: 0x00035400 1631 1629 111 47
[ 4064.544770] ath10k_pci 0000:02:00.0: [05]: 0x00035800 0 0 64 0
[ 4064.544779] ath10k_pci 0000:02:00.0: [06]: 0x00035c00 16 14 16 14
[ 4064.544793] ath10k_pci 0000:02:00.0: [07]: 0x00036000 0 1 0 1
[ 4064.557821] ath10k_pci 0000:02:00.0: failed to read hi_board_data address: -28
[ 4064.642187] ieee80211 phy0: Hardware restart was requested
[ 4064.852139] ath10k_pci 0000:02:00.0: unsupported HTC service id: 1536
[ 4064.980877] ath10k_pci 0000:02:00.0: device successfully recovered

I will attach full dmesg.

Revision history for this message
David Rasch (rasch) wrote :
Revision history for this message
David Rasch (rasch) wrote :

I spoke too soon, back to "question mark" state and no connection.

[16070.951387] ath10k_pci 0000:02:00.0: firmware crashed! (guid a288f3c4-d6a5-43f2-8c18-2ef3ed9d63f6)
[16070.951424] ath10k_pci 0000:02:00.0: qca6174 hw3.2 target 0x05030000 chip_id 0x00340aff sub 1a56:143a
[16070.951433] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[16070.953085] ath10k_pci 0000:02:00.0: firmware ver WLAN.RM.4.4.1-00079-QCARMSWPZ-1 api 6 features wowlan,ignore-otp crc32 fd869beb
[16070.954386] ath10k_pci 0000:02:00.0: board_file api 2 bmi_id N/A crc32 20d869c3
[16070.954407] ath10k_pci 0000:02:00.0: htt-ver 3.47 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[16070.964559] ath10k_pci 0000:02:00.0: failed to get memcpy hi address for firmware address 4: -16
[16070.964581] ath10k_pci 0000:02:00.0: failed to read firmware dump area: -16
[16070.964588] ath10k_pci 0000:02:00.0: Copy Engine register dump:
[16070.964608] ath10k_pci 0000:02:00.0: [00]: 0x00034400 11 11 3 3
[16070.964626] ath10k_pci 0000:02:00.0: [01]: 0x00034800 31 31 395 396
[16070.964641] ath10k_pci 0000:02:00.0: [02]: 0x00034c00 38 37 100 101
[16070.964663] ath10k_pci 0000:02:00.0: [03]: 0x00035000 15 15 17 15
[16070.964679] ath10k_pci 0000:02:00.0: [04]: 0x00035400 347 337 233 169
[16070.964693] ath10k_pci 0000:02:00.0: [05]: 0x00035800 0 0 64 0
[16070.964710] ath10k_pci 0000:02:00.0: [06]: 0x00035c00 14 13 14 12
[16070.964730] ath10k_pci 0000:02:00.0: [07]: 0x00036000 0 0 0 1
[16071.003122] ath10k_pci 0000:02:00.0: failed to read hi_board_data address: -28
[16071.088236] ieee80211 phy0: Hardware restart was requested
[16071.309828] ath10k_pci 0000:02:00.0: unsupported HTC service id: 1536
[16071.430225] ath10k_pci 0000:02:00.0: device successfully recovered

Revision history for this message
Marc-André Moreau (mamoreau) wrote :

I am also experiencing the same issue with on a Dell XPS 13 9370 that I upgraded to 18.04. I added mem_sleep_default=deep to my grub boot options to workaround the battery drainage when "suspended". Just like other people, I can't seem to figure out a pattern to reproduce the issue with 100% certainty. I checked and the BIOS is up to date, and my wifi firmware is WLAN.RM.4.4.1-00079-QCARMSWPZ-1.

When the problem happens, the only way I can get wifi back is to reboot or shutdown + boot, sometimes it takes more than one reboot to get wifi back up. For some reason, a complete shutdown + boot appears to work better than a simple reboot.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Do you still have this issue?

Changed in linux (Ubuntu):
status: In Progress → Confirmed
Revision history for this message
Ellie Frost (stillinbeta) wrote :

Kai-Heng Feng:

I've been using your kernel for about a week, and it's solved the issue for me!
$ uname -rv
5.0.0-3-generic #4~lp1799988 SMP Mon Feb 4 00:02:55 CST 2019

Any ideas when your change can be upstreamed? Before I tried your kernel I tried the Mainline kernel and the issue was still present, so I think I can validate your change.

Revision history for this message
Anthony Wharton (anthonywharton) wrote :

Hi there,

Sorry to come into this so late into the game, I found this thread whilst seaching up about this bug. I see your patches have made it through the the mainline kernel, and I have been using this the last few days.

I'm not sure if it's inappropriate to post here as I'm on Arch Linux, but this seems to be looking more at the kernel so hopefully I'm in the clear:

$ uname -rv
5.0.5-arch1-1-ARCH #1 SMP PREEMPT Wed Mar 27 17:53:10 UTC 2019

Although the problem seems to be a lot better now, it still does seem to manifest itself occasionally, and I am yet to work out how to reproduce it. I might be imagining it, but it feels like it seems to occur more frequently when sleeping on one network, moving location and and waking up on another wireless network with the former network not present. Again I stress, I am yet to validate this.

Just wanted to post to let you know, I'll try update you with a dmesg log when it next occurs.

Finally for the record, I'm on an XPS 13 9370.
Many thanks.

Revision history for this message
Anthony Wharton (anthonywharton) wrote :

Update: correction, I realise foolishly that I was accidentally was looking at the wrong sources, so I have *not* been running with the patch.

I'll compile in the patch and try again. Sorry for the confusion.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

For those who don't use Ubuntu, here are changes that _may_ help the situation:
1) Commit d7a6c0ce8d26412903c7981503bad9e1cc7c45d2 ("USB: Consolidate LPM checks to avoid enabling LPM twice").
This can fix this error:
    [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000302.bin
    [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953 (-110)

2) 0001-disable-BLE-advertisment.patch
This patch can avoid this:
[25782.016682] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
[25782.016691] dpm_run_callback(): pci_pm_suspend+0x0/0x130 returns -16
[25782.016694] PM: Device 0000:00:14.0 failed to suspend async: error -16
[25782.920799] PM: Some devices failed to suspend, or early wake event detected
[25782.922906] usb usb1-port7: status 0103 change 0004

3) 0002-d3delay.patch
Just a random attempt to see if it helps.

tags: added: patch
Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

Suffering from this bug in a Dell XPS 9360 with Killer WiFi. It happened in 18.10 and still happens in 19.04. :/

Revision history for this message
Anthony Wharton (anthonywharton) wrote :

Kai-Heng Feng, I can confirm on my XPS 9370 that everything seems to be working on 5.10-rc3-mainline which includes that patches from #47, but does not seem to have patches from #65 and #66.

I'll try compile these in when I get some time.

Have the latter two patches (#65, #66) been submitted as I can't see them on the latest mainline kernel on kernel.org?

Thanks for your help.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

No not yet. I am certain patch in #65 prevents the system get woken up by BLE events, I am not sure patch in #66 has any effect at all.

Revision history for this message
David Rasch (rasch) wrote :

Still experiencing similar issues with suspend/resume with https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.1-rc6/

Test with both firmware 079 and 057.

Revision history for this message
David Rasch (rasch) wrote :

This is a workaround to make sure Wifi works on each and every resume, not just every other one (obviously this disables wake from Bluetooth) - after "sudo -s".

tee /lib/systemd/systemd-sleep/rfkill-bluetooth-workaround <<EOF
#!/bin/sh
set -e

if [ "${1}" = "pre" ]; then
        rfkill block bluetooth
elif [ "${1}" = "post" ]; then
        rfkill unblock bluetooth
fi
EOF
chmod 755 /lib/systemd/systemd-sleep/rfkill-bluetooth-workaround

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

Thanks for the workaround @rasch, I'll try it.
One question, I don't have a "/lib/systemd/systemd-sleep/" folder. Maybe it is "/lib/systemd/system-sleep/"?

Revision history for this message
David Rasch (rasch) wrote :

Yes, you're correct. Updated snippet:

tee /lib/systemd/system-sleep/rfkill-bluetooth-workaround <<EOF
#!/bin/sh
set -e

if [ "${1}" = "pre" ]; then
        rfkill block bluetooth
elif [ "${1}" = "post" ]; then
        rfkill unblock bluetooth
fi
EOF
chmod 755 /lib/systemd/system-sleep/rfkill-bluetooth-workaround

Revision history for this message
Tim De Pauw (timdepauw) wrote :

THe script by @rasch did not help for the issue that I have on my XPS 9360 where the wifi adapter is gone after resuming from sleep. Not sure if it's supposed to. Putting the machine back to sleep and then waking it up again solves things. However, if it's plugged in while I put it to sleep, waking it up does not help, so I also have to make sure it's unplugged. I've had this since I got the machine last year, with every version of Ubuntu that's been available since then.

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

Sorry I didn't answer before. The script by @rasch seems to have solved the issue for me. I didn't have any problem with WiFi since using it almost two weeks ago.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

FWIW this is the (not upstreamed yet) patch to solve the issue:
https://lkml.org/lkml/2019/4/30/213

Revision history for this message
Taiten Peng (taitenpeng) wrote :

@Kai-Heng is there a patched kernel package I can test with?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Comment #35.

Revision history for this message
Taiten Peng (taitenpeng) wrote :

confirmed #35 build fix same issue on XPS13 9360 with wifi module QCA6174.
Tested 10 suspends on power pluged and unpluged

Thanks Kai-Heng for the fix

Revision history for this message
Taiten Peng (taitenpeng) wrote :

The wifi looks functional after the fix but ath10k driver starts complaining

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

That's just a warning which got fixed in later release. Does it affect network connection?

Revision history for this message
Taiten Peng (taitenpeng) wrote :

No, it doesn't effect functionality AFAIK

Rex Tsai (chihchun)
tags: added: ath10k
Changed in linux (Ubuntu):
assignee: Kai-Heng Feng (kaihengfeng) → nobody
Brad Figg (brad-figg)
tags: added: ubuntu-certified
Revision history for this message
Coenraad Loubser (dagelf) wrote :

Not sure if this might help... looks like this Dell has some hardware design problems - we should be able to come up with a workaround nonetheless. I've had the stock Ubuntu kernels die on me several times - goes into what seems to be disk thrashing (on an SSD?!) and 50% of the time the OOM killer recued it - but only after 30-60 minutes, nobody can wait that long - with nothing in the logs to go on, so I compiled my own kernel to dig deeper.

Which brings me here - Wifi + Bluetooth missing, but only after several suspend / resume cycles -on my own kernel. This has only happened once over the course of 6 months with the Ubuntu 18.04.2 stock kernel. Correct me here, but it seems the Wi-Fi + Bluetooth is connected to the USB3 bus? My next step will be to load the USB3 driver as a module so I can unload and reload it to see if that resets it properly.

Revision history for this message
Coenraad Loubser (dagelf) wrote :

Might I add - looking at the logs above it seems people with both iwl and ath10k are affected - which probably points to something upstream in the bus.

With regards to it being on the USB bus, wireless devices only show under lspci, not lsusb. The the errors in the log with regards to ath10k and the unknown usb device, are probably not related.

Revision history for this message
Tim De Pauw (timdepauw) wrote :

Since the link under #35 is dead, I assume the patch got merged into the kernel at some point?

I'm still experiencing this issue with Linux 5.0.0-32-generic #34-Ubuntu SMP Wed Oct 2 02:06:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux on my XPS 13 9360.

I've tried upgrading to the QCA6174 firmware from https://github.com/kvalo/ath10k-firmware/tree/master/QCA6174/hw3.0 as well as installing TLP, assuming it had something to do with power settings, but none of that seems to have had any effect.

Revision history for this message
Steven Buytaert (steven-buytaert) wrote :

I can confirm that the patch in #77 is working in a kernel 5.3.15 on Devuan Beowulf (https://devuan.org). The kernel is taken from a Devuan Ceres (equivalent for Sid) repository.

The issue (a broken Bluetooth device and my Atheros ath10k/QCA6174/hw3.0 running firmware RM.4.4.1.c2-00057-QCARMSWP-1 also broken, beyond reboot, on a Dell XPS 13 9380) was driving me nuts.

The usual scenario for me was disconnecting a BT device on site A, disconnecting the ethernet connection, going to deep sleep (suspend), resuming at site B with Wifi connectivity; 1 out of 3 times, this resulted in e.g. in the syslog:

ath10k_pci 0000:02:00.0: firmware crashed! (guid ...)
Followed by a slew of other ath10k messages...

I am reporting here because others might be going nuts too.

Currently, I have not seen this issue for 2 days; this is not 100% guarantee yet, but seeing the frequency of occurrence drop dramatically is already encouraging.

So on a 5.3.15 Kernel this patch was NOT yet integrated.

Thanks for the patch Kai-Heng!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.