FS#69223 - [linux] QCA6390 wifi not working in arch kernel but does in stable

Attached to Project: Arch Linux
Opened by Bjørn Snoen (bjornsnoen) - Tuesday, 05 January 2021, 16:06 GMT
Last edited by Toolybird (Toolybird) - Sunday, 04 June 2023, 03:39 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:
The linux kernel package should have support for QCA6390 wifi in the ath11k_pci module, indeed it is enabled in the kernel config, but for some reason it doesn't actually work. Building from the stable kernel sources (git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git) @ tag v5.10.4 with the same kernel config (minus CONFIG_USER_NS_UNPRIVILEGED=y which is arch specific?) produces a kernel with working wifi.
I'm not sure if the firmware pull request has been accepted into linux-firmware yet so the blob copy instructions from the mailing list may still need to be followed (https://lists.infradead.org/pipermail/ath11k/2020-November/000537.html).

Additional info:
I'm attaching the dmesg log from the failing kernel, as well as the kernel configs from /proc for both the failing and the working kernels, as well as the zdiff between these.

Steps to reproduce:
* Install the linux package version 5.10.4.arch2-1 on a Dell XPS 15 9500 or any other machine with the QCA6390 chip
* Boot into new kernel
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 04 June 2023, 03:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed according to upstream ticket.
Comment by Jan Alexander Steffens (heftig) - Wednesday, 21 April 2021, 11:28 GMT
I guess this has been fixed by now?
Comment by Bjørn Snoen (bjornsnoen) - Wednesday, 21 April 2021, 14:32 GMT
Nope, still no wifi as of today with linux 5.11.15.arch1-2
Comment by Jan Alexander Steffens (heftig) - Wednesday, 21 April 2021, 17:07 GMT
This is bizarre, then.
Comment by Jan Alexander Steffens (heftig) - Wednesday, 21 April 2021, 17:08 GMT
Are you sure the success/failure difference wasn't from you rebooting in different ways?
Comment by Bjørn Snoen (bjornsnoen) - Wednesday, 21 April 2021, 19:13 GMT
I'm not doing anything special. I have two boot configs using systemd-boot.

➜ ~ cat /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=UUID=400512e1-6134-4682-9c35-71cd1eacc163 rw
➜ ~ cat /boot/loader/entries/athtest.conf
title Arch Linux
linux /vmlinuz-athtest-5.10.10
initrd /intel-ucode.img
initrd /initramfs-athtest-5.10.10.img
options root=UUID=400512e1-6134-4682-9c35-71cd1eacc163 rw acpi_backlight=vendor resume=UUID=cd67d834-1779-409c-9a10-729788881ce2

I'm simply calling "sudo reboot now" from the terminal to switch between the two. My custom kernel called athtest works, the standard one from the pacman repos does not give wifi.
Comment by Bjørn Snoen (bjornsnoen) - Monday, 24 May 2021, 12:56 GMT
Now on 5.12.6, still not working. On boot there seems to be no wireless nic detected. rfkill only lists the bluetooth card, ip addr only shows a loopback device and docker0. My vanilla 5.12.6 kernel is chugging along just fine.

I would love to get this sorted out even though I'm able to work with my own kernel, but as I am not familiar with kernel debugging I'm going to need some detailed steps to tell me how to help.
Comment by Jan Alexander Steffens (heftig) - Monday, 24 May 2021, 17:14 GMT
Is there anything in /usr/lib/modules/5.12.6-arch1-1/extramodules ?
Comment by Bjørn Snoen (bjornsnoen) - Monday, 24 May 2021, 19:02 GMT
No, that path doesn't exist on my filesystem, nor does /usr/lib/modules/5.12.6athtest/extramodules
Comment by Jan Alexander Steffens (heftig) - Monday, 24 May 2021, 19:16 GMT
do you have dmesgs from a boot with each of the 5.12.6 kernels?
Comment by Bjørn Snoen (bjornsnoen) - Monday, 24 May 2021, 20:09 GMT
Yep
Comment by Bjørn Snoen (bjornsnoen) - Monday, 24 May 2021, 20:11 GMT
[ 2.724279] ath11k_pci 0000:6c:00.0: firmware crashed: MHI_CB_SYS_ERROR
[ 7.838383] ath11k_pci 0000:6c:00.0: qmi failed memory request, err = -110
[ 7.838393] ath11k_pci 0000:6c:00.0: qmi failed to respond fw mem req:-110

looks relevant but I of course don't know what it means
Comment by Jan Alexander Steffens (heftig) - Monday, 24 May 2021, 20:16 GMT
The athtest boot loaded the driver later. Maybe this is a race?
Comment by Bjørn Snoen (bjornsnoen) - Monday, 24 May 2021, 20:19 GMT
Maybe. I googled just that error and found another thread on the forums. Tried the solution there as a hail mary and it worked. Weird that I don't need the memmap option on vanilla kernel.
https://bbs.archlinux.org/viewtopic.php?pid=1960273#p1960273
Comment by Jan Alexander Steffens (heftig) - Monday, 24 May 2021, 20:20 GMT Comment by Jan Alexander Steffens (heftig) - Monday, 24 May 2021, 20:23 GMT
> Weird that I don't need the memmap option on vanilla kernel.

Yeah. It looks like it's a race with other code getting memory allocated. Whether the driver works depends on whether the firmware is assigned memory below 32M (which breaks) or not.
Comment by Bjørn Snoen (bjornsnoen) - Monday, 24 May 2021, 20:32 GMT
By the way, in that thread it looks like the $ is escaped, which breaks boot. I figured out that ! is the correct separator. Does $ for sure work as well?
Comment by Bjørn Snoen (bjornsnoen) - Monday, 24 May 2021, 21:20 GMT
So with that memmap I have wifi at boot with 5.12.6-arch1-1, the tradeoff being that if I leave the system alone for a second it freezes up completely. I can only recover by forcing a reboot. Don't know if this is a separate bug or what, but there's a lot of ath11k stuff in the journal. This happens consistently on every boot. The kernel audit at 23:02:07 was the last message I saw before it froze. I'm not seeing those soft lockup bugs on the vanilla kernel.
   freeze.log (256.5 KiB)
Comment by Jan Alexander Steffens (heftig) - Monday, 24 May 2021, 21:29 GMT
! and $ seem to do completely different things. See the description of memmap=nn[KMG]$ss[KMG] and following on https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
Comment by Bjørn Snoen (bjornsnoen) - Monday, 24 May 2021, 21:39 GMT
Hm, I see, reserved vs protected. I'll replace it. Also I've widened the reserved area as per Kalle's last comment in the kernel bugzilla thread.

Loading...