12:21vliaskov: Hi I have an acer laptop with Ryzen iGPU and Nvidia dgpu (GeForce RTX 3070 Mobile). nouveau fails to initialize with "nouveau 0000:01:00.0: init failed with -16" . Abbreviated dmesg and kernel warning/trace here: https://pastebin.com/8PHpuBus
12:21vliaskov: Can vga_switcheroo work with nouveau/AMD-igpu to disable the iGPU? I haven't made much progress with https://nouveau.freedesktop.org/Optimus.html There is also no /sys/kernel/debug/vgaswitcheroo/switch file, though there are 2 switcheroo messages in dmesg.
12:21vliaskov: Now I realize that if the matrix is up-to-date https://nouveau.freedesktop.org/FeatureMatrix.html , Ampere (NV170, for RTX3070) is not yet supported, is that correct? Any hints on whether this is a problem specifically with the amdgpu/nvidia switcheroo, or specifically with NV170 nouveau support would be helpful.
12:24vliaskov: This was a long way to say: It's clear from the dmesg that the amdgpu igpu is active, but I am not sure if that's what causes nouveau to fail
19:48vliaskov: Perhaps this is a PCI power management issue "nouveau 0000:01:00.0: Unable to change power state from D3cold to D0, device inaccessible" , There was a workaround applied in 434fdb515 "drm/nouveau: workaround runpm fail by disabling PCI power management on certain intel bridges", but for an Intel chipset + nvidia. I wonder if such as workaround is needed for this AMD chipset.
19:52Lyude: it may very well be
19:52karolherbst: vliaskov: no acceleration supported on Ampere yet
19:53karolherbst: but the runpm stuff might be broken on those AMD systems as well. Just I never got access to hardware being broken
19:53Lyude: oh also that, but I think your statement may still be valid vliaskov as I remember me and karolherbst talking about the potential of amd needing this fix.
19:53karolherbst: I asked for docs and hardware several times....
19:53Lyude: karolherbst: if you need access i probably have the magic evil chipset w/ amd in one of these machines
19:53karolherbst: it might help, yeah
19:53karolherbst: at least I can poke stuff until it doesn't break
19:53karolherbst: just need a way of hard resetting the machine :)
19:54Lyude: oh that should be simple, it's intel so amt
19:54karolherbst: shouldn't be broken on an intel system though :/
19:54Lyude: ??? I thought the bug was specific to like, a specific intel chipset/
19:54Lyude: *?
19:54karolherbst: yeah no.. AMD is also broken :)
19:54karolherbst: but differently
19:55karolherbst: so the same workaround doesn't apply
20:01vliaskov: thanks Lyude and karolherbst. I see the problem on "PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge", which is device id 0x1453 I believe. I tried a hack to extend the 434fdb515 hack to a PCI_VENDOR_ID_AMD + device==0x1453 but it didn't help . Yes, I guess this will require a different workaround, it being a completely different chipset :).
20:01Lyude: hopefully y'all can get more info on this then we could
20:01Lyude: figuring this out on nouveau was a bit of a nightmare
20:01karolherbst: it was
20:01Lyude: (also if you do please let us know we would be very much interested in hearing)
20:01karolherbst: my hope is now that nvidia pushes all what's needed into their driver and we just copy that
20:06airlied: they already have a bunch in their open driver
20:08karolherbst: yeah.. but runtime_pm is disabled
20:08karolherbst: or not hooked up
20:08vliaskov: I am happy to help with testing. Hopefully i won't fry the laptop... I haven't looked into the open driver yet, I will. Are we missing also AMD chipset docs for this, or is it only on the nvidia side ?
20:08Lyude: would be actually impressed if you fried it tbh
20:08karolherbst: it might make sense to scan their driver for workarounds related to your chipset
20:09karolherbst: and figure out what they are doing
20:09karolherbst: then we could check if it helps
20:09karolherbst: but I wouldn't be surprised if some code is still missing
20:09vliaskov: understood, ok I 'll give it a try
20:10karolherbst: cool, thanks