Hello.
I am trying to run decently the video system of a Lenovo ideapad laptop having AMD Cezanne (denoted as pci 0000:04:00.0: [1002:1638]).

Firstly, the amdgpu module kills the screen (albeit fortunately doesn't do any other harm to the system). Likely corresponds to amdgpu 0000:04:00.0: vgaarb: deactivate vga console

Secondly, a lot of kernel errors pop up in respect to Cezanne, errors like:

iommu ivhd0: AMD-Vi: Event logged [ILLEGAL_DEV_TABLE_ENTRY device=04:00.0 pasid=0x00000 address=0x104900000 flags=0x0180]
[drm] failed to load ucode SDMA0(0x0)
[drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xF)
[drm] psp gfx command LOAD_ASD(0x4) failed and response status is (0xF)
amdgpu 0000:04:00.0: amdgpu: RAS: optional ras ta ucode is not available
[drm:dc_dmub_srv_wait_idle [amdgpu]] *ERROR* Error waiting for DMUB idle: status=3
amdgpu 0000:04:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring kiq_2.1.0 test failed (-110)
[drm:amdgpu_gfx_enable_kcq.cold [amdgpu]] *ERROR* KCQ enable failed
[drm:amdgpu_device_ip_init [amdgpu]] *ERROR* hw_init of IP block <gfx_v9_0> failed -110
amdgpu 0000:04:00.0: amdgpu: amdgpu_device_ip_init failed

(see more details in the dmesg transcript).

That page indicates that amdgpu runs on several instances of this video hardware, hence I am lost on what to blame for the failure. Is the brand-new driver (of Linux 5.17) buggy? Or is the specific laptop at fault? Or the kernel (including modules.dep etc.) is configured inappropriately?

Should I try other versions of the kernel? Such as older releases or, say, linux-amd.

1. Why you need 'vga=775 nofb' Linux kernel boot options? I see them in your dmesg 'Command line'. Have you tried to boot with default GRUB_CMDLINE_LINUX?
2. Have you tried installing released Ubuntu versions? Ubuntu 22.04 is not released yet and probably buggy.
3. Did you install the custom mainline kernel (looks like 5.17.0-051700-generic is the mainline one)? Have you tried with original kernel 5.15.0-18-generic?
4. Nobody tried it with kernel 5.17 before

TIP: try to search by device ID prefix like this next time to find all the subsystems for this card (almost all notebooks have unique per-model subsystems): https://linux-hardware.org/?id=pci:1002-1638

Quote1. Why you need 'vga=775 nofb' Linux kernel boot options? I see them in your dmesg 'Command line'. Have you tried to boot with default GRUB_CMDLINE_LINUX?
Needed at the time because of my ignorance of proper boot configuration. Now switched to GRUB's gfxmode keep (here you can see a probe without modesetting). How exactly would GRUB_CMDLINE_LINUX behave?

Quote2. Have you tried installing released Ubuntu versions? Ubuntu 22.04 is not released yet and probably buggy.
I didn't try other versions of Ubuntu. I don't deem userland relevant at all. After all, Xorg runs over fbdev although visuals are painfully slow, and the underlying VESA VGA doesn't even provide a decent text-mode latency.

Quote3. Did you install the custom mainline kernel (looks like 5.17.0-051700-generic is the mainline one)? Have you tried with original kernel 5.15.0-18-generic?
4. Nobody tried it with kernel 5.17 before
Not tried 5.15.0-18-generic, but tried with 5.15.4-artix1-1 where amdgpu also failed (albeit in another fashion).

I recall that tried gfxmode keep and amdgpu together.  The fail looked visually different from one of amdgpu after vga, but made the display unusable anyway.

Ubuntu team usually adds lot of patches to their Linux kernels.

Default Ubuntu 22.04 kernel packages are currently the following:

linux-generic-hwe-20.04 5.15.0.23.25 amd64
linux-headers-5.15.0-23 5.15.0-23.23 all
linux-headers-5.15.0-23-generic 5.15.0-23.23 amd64
linux-headers-generic-hwe-20.04 5.15.0.23.25 amd64
linux-image-5.15.0-23-generic 5.15.0-23.23 amd64
linux-image-generic-hwe-20.04 5.15.0.23.25 amd64

But you have:

linux-image-unsigned-5.17.0-051700-generic 5.17.0-051700.202203202130 amd64
linux-modules-5.17.0-051700-generic 5.17.0-051700.202203202130 amd64

And your configuration is likely not tested by Ubuntu team and not expected to work properly.

You need to either use default 5.15.0-23-generic kernel from Ubuntu 22.04 or use stable Ubuntu 20.04 to make this device functional.

QuoteIs the brand-new driver (of Linux 5.17) buggy?

I do not thing so. Your card is too new and in the nearest future Linux kernel versions should behave better for your card.

QuoteOr is the specific laptop at fault?

We've only seen this a couple of times. The probability of this is too small taking into account manufacture date of your device.

Or the kernel (including modules.dep etc.) is configured inappropriately?
It's very likely since you are using non-standard kernel build.

I don't have a solution, but I think you might want to check out kernel.org as they might be better able to assist in this issue.  I see two problems the amd-vi iommu, and the amdgpu driver problem.

Another thing I noticed in your second output, it does not look like you loaded the amdgpu drivers, as I only saw the radeonfb in the lsmod output. 

All problems with GPU disappeared when I switched the computer to UEFI (instead of legacy boot). The driver's rant about BIOS here suggested me to look towards UEFI problems.