Go back to topic: [SOLVED] Qualcomm QCNFA765 (ath11k/wcn6855) WiFi working on Thinkpad P14s Gen4 AMD
| Your Qualcomm WiFi card should now | Your Qualcomm WiFi card should now load, and you should be able to see to nearby networks in the NetworkManager applet. |
| - Qubes 4.3 | - Qubes OS 4.3.0 |
| lspci -s 02:00.0 -vv | grep -A1 "MSI:" | sudo lspci -s 02:00.0 -vv | grep -A1 "MSI:" |
| Replace `02:00.0` with the ID of your network card shown in ` | Replace `02:00.0` with the ID of your network card shown in `lspci | grep -i network`. Note the values for "Address" and "Data". Mine were `fee0a000` and `4000`. |
| You can now build the kernel with | You can now build the kernel with the patch applied. This will take a while. |
| You should see your precise kernel version under `vermagic` (not `-dirty`) and parameters for `host_msi_vector_addr` and `host_msi_vector_data`. | You should see your precise kernel version under `vermagic` (not ending in `-dirty`) and parameters for `host_msi_vector_addr` and `host_msi_vector_data`. |
| ``` And shut down the template once they are installed: ``` | |
| Boot sys- | Boot sys-net with this template. Unload the existing `ath11k` drivers: |
| Last symptoms in `dmesg`: | Last symptoms in `dmesg` in sys-net (after giving it enough RAM): |
| - Troubleshooting steps are available in the comments that may help. |
| Create a StandaloneVM based on the new template, make it an `HVM` and set the kernel to `(provided by qube)` (I called it `fedora-net-build`). Give it 4 CPUs and 4GB of RAM (or however much RAM/CPUs are available) and extra storage ( | Create a StandaloneVM based on the new template, make it an `HVM` and set the kernel to `(provided by qube)` (I called it `fedora-net-build`). Give it 4 CPUs and 4GB of RAM (or however much RAM/CPUs are available) and extra storage (64 GB is probably enough). |
| The 20GB cap on the root directory (which includes `/usr/src/linux`) will not be enough to build the kernel. To take advantage of the allocated storage, we create a symlink: | |
| mkdir -p /rw/usr_src_linux ln -s /rw/usr_src_linux /usr/src/linux ``` Now clone the kernel repository: ``` | |
| **Note:** In my case, I had to create the directory `/rw/usr_src_linux` and make a symlink from `/usr/src/linux` to `/rw/usr_src_linux` (in order to take advantage of added storage) due to initial storage issues. |
| Prepare the source tree to build the kernel: ``` cp /boot/config-$(uname -r) .config make olddefconfig ``` |
| [This patch](https://lore.kernel.org/lkml/20240322104912.94811-1-jtornosm@redhat.com/) was made by Jose Ignacio Tornos Martinez from Red | [This patch](https://lore.kernel.org/lkml/20240322104912.94811-1-jtornosm@redhat.com/) (originally tested on bhyve) was made by Jose Ignacio Tornos Martinez from Red Hat with the help of Baochen Qiang, an engineer at Qualcomm. |
| Boot sys-net. Unload the existing `ath11k` drivers: | |
| rmmod ath11k_pci rmmod ath11k ``` Re-load them with your new MSI parameters: ``` modprobe ath11k modprobe ath11k_pci host_msi_vector_addr=0xfee0a000 host_msi_vector_data=0x4000 ``` Replace `fee0a000` and `4000` with the values you recorded earlier. Your Qualcomm WiFi card should now be loaded, and you should be able to see to nearby networks in the NetworkManager applet. To make this happen every time, add these lines to the end of `/rw/config/rc.local` in sys-net (must not be disposable): ``` | |
| Replace `fee0a000` and `4000` with the | Replace `fee0a000` and `4000` with the values you recorded earlier. If `rc.local` did not exist previously, set a `#!/bin/sh` shebang as the first line and make it executable with `chmod +x /rw/config/rc.local`. |
| Now it's time to build a new set of patched modules. | Now it's time to build a new set of patched modules. You may notice that `ath11k.ko` and `ath11k_pci.ko` are already compiled, but these need to match your kernel version (from `uname -r`) exactly. |
| - This process was a result of ongoing troubleshooting, so some steps may be | - This process was a result of ongoing troubleshooting, so some steps may be unnecessary. Specifically, I'm still not sure if compiling the whole kernel is necessary before building the modules (I had already tried compiling the modules with the upstream kernel before discovering I needed to match the build more precisely). Additionally, much of this report is coming from memory, so I may have missed some details. |
| - In my case, letting the driver fail once (as demonstrated | - In my case, letting the driver fail once (as demonstrated in step 7) before reloading with parameters was necessary. Setting the values with a `.conf` file at `/etc/modprobe.d/` did not work, and blacklisting the drivers before loading them fresh caused the initialization to fail. |
| **Note:** In my case, I had to create the directory `/rw/ | **Note:** In my case, I had to create the directory `/rw/usr_src_linux` and make a symlink from `/usr/src/linux` to `/rw/usr_src_linux` (in order to take advantage of added storage) due to initial storage issues. |
| Replace `fee0a000` and `4000` with the actual values you recorded earlier. If `rc.local` did not exist previously, | Replace `fee0a000` and `4000` with the actual values you recorded earlier. If `rc.local` did not exist previously, set a `#!/bin/sh` shebang as the first line and make it executable with `chmod +x /rw/config/rc.local`. |
| - This process was a result of ongoing troubleshooting, so some steps may be | - This process was a result of ongoing troubleshooting, so some steps may be unnecessary (i.e. I'm still not sure if compiling the whole kernel is necessary before building the ath11k modules). Additionally, much of this report is coming from memory, so I may have missed some details. |