Created attachment 304851 [details] Logs Dear Maintainer, If D3Cold is enabled from BIOS the tablet boots without Wifi. The only two ways to enable wifi support is either by disabling D3Cold from BIOS (not ideal) or adding pcie_port_pm=off to grub [ 12.681303] iwlwifi 0000:01:00.0: Detected Intel(R) Dual Band Wireless AC 7265, REV=0x210 This is needed for our new Juno Tab 2 Please check the following logs attached.
> If D3Cold is enabled from BIOS the tablet boots without Wifi. Does this issue also happen in Windows? Can you confirm what power state Windows puts the root port into? > The only two ways to enable wifi support is either by disabling D3Cold from BIOS (not ideal) or adding pcie_port_pm=off to grub Why is disabling D3cold from the BIOS not ideal here? It seems like it's the perfect case to me. You have an incompatibility with D3cold and your wifi device and a knob you can turn it off that would fix the issue! > Low Power S0 Idle (V5) : 0 Unfortunately, my patch series [1] won't be able to help this system. [1] https://lore.kernel.org/linux-pci/20230809185453.40916-1-mario.limonciello@amd.com/T/#t
On Windows the wifi is detected either with D3Cold on and off. No extra settings needed. The only advantage is that it has better power savings when enabled. On Linux if D3Cold is enabled on BIOS the OS will not find the Wifi card at all, unless I add the module. Wouldn't it be better if the Wifi card model had D3cold support and take advantages of its features?
> On Windows the wifi is detected either with D3Cold on and off. No extra > settings needed. The only advantage is that it has better power savings when > enabled. Can you share another log file without pcie_port_pm=off on your kernel command line? > Wouldn't it be better if the Wifi card model had D3cold support and take > advantages of its features? Got it; This wasn't obvious to me that Windows worked with D3cold enabled.
Created attachment 304858 [details] logs-nowifi
I have added a new zip with logs without pcie_port_pm=off Sorry, I guess I should have mentioned that it does work with windows.
(In reply to Juno Computers from comment #2 and comment #4) Interesting that without pcie_port_pm=off (the case where iwlwifi doesn't work), we *did* enumerate 01:00.0, so it was powered up to begin with, but it seems to have been put in D3cold later, and we are unable to bring it back to D0: pci 0000:00:1c.0: [8086:4db9] type 01 class 0x060400 pci 0000:00:1c.0: PCI bridge to [bus 01] pci 0000:01:00.0: [8086:095a] type 00 class 0x028000 ... pcieport 0000:00:1c.0: Data Link Layer Link Active not set in 1000 msec pci 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible iwlwifi 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible iwlwifi 0000:01:00.0: HW_REV=0xFFFFFFFF, PCI issues? iwlwifi: probe of 0000:01:00.0 failed with error -5 In comment #2, you mentioned we didn't find the wifi at all (although I think the PCI core technically DID find the device as above, but iwlwifi couldn't use it because it got powered off). But you *also* said "unless I add the module." Tell me more about that! Does that mean that if you modprobe iwlwifi manually, it does work?
Created attachment 304859 [details] PCI PM debug Would you mind adding this patch (this is based on v6.5-rc1), building with CONFIG_DYNAMIC_DEBUG=y, and adding 'dyndbg="file drivers/pci/* +p"' to your kernel parameters? This is low-tech and will probably require multiple iterations, but I don't understand PM very well so I don't really know how to do anything smarter.
Hi Bjorn, I compiled the kernel with the patch and added dyndb to my kernel. Do you want me to run all the same test or just one in specific?
I guess start with D3cold enabled in BIOS (what is the actual BIOS Setup prompt?) and boot once with pcie_port_pm=off (which should work) and once without (which should fail).
Created attachment 304925 [details] logs-patch-pmoff
I have uploaded the new files with the patch. I don't think much has changed. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nopnp pcie_port_pm=off 'dyndbg=file drivers/pci/* +p'"
Did you try a boot without "pcie_port_pm=off"? In the comment #10 attachment, I only see the working case (with "pcie_port_pm=off"). There's also this patch: https://lore.kernel.org/r/20230824013738.1894965-1-chenfeiyang@loongson.cn, which touches that path. But it fixes a bug for devices that lack a Power Management capability, and your 7265 device *does* have capability, so I don't think the patch will make a difference for you.
I patched the kernel and it did not work. Bummer ;( Do you have any other idea what it could be?
Can you boot the instrumented kernel without "pcie_port_pm=off" and collect the dmesg log?
Created attachment 305058 [details] dmesg with patch 2
File uploaded
Hi, any updates on this?