I'm having an issue with a 2017 iMac - it doesn't boot - crashes about half way through Apple logo progress bar, often with some funny graphics displaying - e.g. half the screen is yellow.

I've reset NVRAM/PRAM/SMC, wiped hard disks and installed Big Sur, then upgrade to Monterey.  Still I'm getting the same issue.

It does boot fine in safe mode...

I'm suspecting graphics card failure.  I received these details on one failed start, can anybody help diagnose please?


```
panic(cpu 0 caller 0xffffff7facc1f244): "virtual bool IOAccelLegacyDisplayMachine::display_mode_did_change(uint32_t): AMDRadeonAccelerator driver returns false" @IOAccelLegacyDisplayMachine.cpp:267
Panicked task 0xffffff855221a3e0: 10 threads: pid 143: WindowServer
Backtrace (CPU 0), panicked thread: 0xffffff855177fcd0, Frame : Return Address
0xffffffe0970a3600 : 0xffffff801489c00d 
0xffffffe0970a3650 : 0xffffff80149f5d85 
0xffffffe0970a3690 : 0xffffff80149e5763 
0xffffffe0970a36e0 : 0xffffff801483ba60 
0xffffffe0970a3700 : 0xffffff801489c3dd 
0xffffffe0970a3820 : 0xffffff801489bb96 
0xffffffe0970a3880 : 0xffffff8015118649 
0xffffffe0970a38f0 : 0xffffff7facc1f244 
0xffffffe0970a3900 : 0xffffff7facbc7eee 
0xffffffe0970a3940 : 0xffffff7facc11180 
0xffffffe0970a3980 : 0xffffff7facd74c70 
0xffffffe0970a3ac0 : 0xffffff7facd5f195 
0xffffffe0970a3b50 : 0xffffff7facd6a627 
0xffffffe0970a3b70 : 0xffffff7facd6f3c9 
0xffffffe0970a3bf0 : 0xffffff7f95614a80 
0xffffffe0970a3c20 : 0xffffff7facd64fb8 
0xffffffe0970a3cb0 : 0xffffff801502957c 
0xffffffe0970a3d10 : 0xffffff80150968d3 
0xffffffe0970a3d70 : 0xffffff801499f007 
0xffffffe0970a3dc0 : 0xffffff8014876cf9 
0xffffffe0970a3e50 : 0xffffff801488dd89 
0xffffffe0970a3ee0 : 0xffffff80149caaf2 
0xffffffe0970a3fa0 : 0xffffff801483c246 
      Kernel Extensions in backtrace:
         com.apple.iokit.IOGraphicsFamily(593.0)[D7EBF011-CEEF-3DF8-BD85-6CCE427455B7]@0xffffff7facd54000->0xffffff7facd82fff
            dependency: com.apple.iokit.IOPCIFamily(2.9)[5E1B0BE0-4B73-35F5-9126-EB05FBB8BAF5]@0xffffff80173ee000->0xffffff8017418fff
         com.apple.iokit.IOAcceleratorFamily2(462.4)[37BACF45-3C71-3411-97DB-E9AA07F37D0E]@0xffffff7facbc7000->0xffffff7facc30fff
            dependency: com.apple.driver.AppleMobileFileIntegrity(1.0.5)[BB7769F7-6389-3ABC-A6CF-2BC079FA7BF8]@0xffffff8015f6f000->0xffffff8015f90fff
            dependency: com.apple.iokit.IOGraphicsFamily(593)[D7EBF011-CEEF-3DF8-BD85-6CCE427455B7]@0xffffff7facd54000->0xffffff7facd82fff
            dependency: com.apple.iokit.IOPCIFamily(2.9)[5E1B0BE0-4B73-35F5-9126-EB05FBB8BAF5]@0xffffff80173ee000->0xffffff8017418fff
            dependency: com.apple.iokit.IOReportFamily(47)[81D7D4E0-A39C-332D-A4A4-AEBB70A9B6FF]@0xffffff801742a000->0xffffff801742cfff
            dependency: com.apple.iokit.IOSurface(302.9)[F42646DD-8963-3EA4-BAC3-2D0F36CDA224]@0xffffff801755d000->0xffffff8017579fff
         com.apple.kext.AMDFramebuffer(4.0.7)[0E573FD7-F1EF-3237-86D1-12C11C80C1FA]@0xffffff7f95613000->0xffffff7f95638fff
            dependency: com.apple.iokit.IOACPIFamily(1.4)[7EF77A11-B2B8-3CCF-9188-597E1279EDAC]@0xffffff8016f48000->0xffffff8016f49fff
            dependency: com.apple.iokit.IOGraphicsFamily(593)[D7EBF011-CEEF-3DF8-BD85-6CCE427455B7]@0xffffff7facd54000->0xffffff7facd82fff
            dependency: com.apple.iokit.IOPCIFamily(2.9)[5E1B0BE0-4B73-35F5-9126-EB05FBB8BAF5]@0xffffff80173ee000->0xffffff8017418fff
            dependency: com.apple.kext.AMDSupport(4.0.7)[61E40B4A-8B3E-3569-85EB-250CD91E8EB1]@0xffffff7fab20d000->0xffffff7fab2d7fff

Process name corresponding to current thread (0xffffff855177fcd0): WindowServer

Mac OS version:
21A559

Kernel version:
Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64
Kernel UUID: 19BD4E1B-0268-3EE0-BC66-91F035BC9429
KernelCache slide: 0x0000000014600000
KernelCache base:  0xffffff8014800000
Kernel slide:      0x0000000014610000
Kernel text base:  0xffffff8014810000
__HIB  text base: 0xffffff8014700000
System model name: iMac18,2 (Mac-77F17D7DA9285301)
System shutdown begun: NO
Panic diags file available: YES (0x0)
Hibernation exit count: 0

System uptime in nanoseconds: 11656145872
Last Sleep:           absolute           base_tsc          base_nano
  Uptime  : 0x00000002b6c2ae6a
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000
  Wake    : 0x0000000000000000 0x0000000e05726742 0x0000000000000000
Zone info:
Foreign   : 0xffffff802afb3000 - 0xffffff802afc0000
Native    : 0xffffff804309e000 - 0xffffffa04309e000
Readonly  : 0 - 0
Metadata  : 0xffffffe7be2c3000 - 0xffffffe7de444000
Bitmaps   : 0xffffffe7de444000 - 0xffffffe7e4444000
last started kext at 9537884636: >AudioAUUC	1.70 (addr 0xffffff7facac5000, size 12288)
loaded kexts:
>AudioAUUC	1.70
>!APlatformEnabler	2.7.0d0
>AGPM	125
>X86PlatformShim	1.0.0
@fileutil	20.036.15
@filesystems.autofs	3.0
>!AUpstreamUserClient	3.6.8
@kext.AMDFramebuffer	4.0.7
@kext.AMDRadeonX4000	4.0.7
>!AHDAHardwareConfigDriver	283.15
>!AHDA	283.15
>!AGFXHDA	100.1.434
@kext.AMDRadeonServiceManager	4.0.7
>!AThunderboltIP	4.0.3
@kext.AMD9500!C	4.0.7
>!A!IKBLGraphics	18.0.2
>eficheck	1
>AGDCBacklightControl	6.4.9
>!ABacklight	180.3
>!AMCCSControl	1.14
>!A!IPCHPMC	2.0.1
>!AGraphicsDevicePolicy	6.4.9
>ACPI_SMC_PlatformPlugin	1.0.0
@UVCService	1
@AGDCPluginDisplayMetrics	6.4.9
>!ASMCLMU	212
>pmtelemetry	1
|IOUserEthernet	1.0.1
>usb.!UUserHCI	1
>!AHV	1
>!ADiskImages2	126.40.1
>!A!ISlowAdaptiveClocking	4.0.0
>!AFIVRDriver	4.1.0
>!A!IKBLGraphicsFramebuffer	18.0.2
>!ATopCaseHIDEventDriver	5010.1
>!UTopCaseDriver	5010.1
>!AFileSystemDriver	3.0.1
@filesystems.tmpfs	1
@filesystems.lifs	1
@filesystems.hfs.kext	582.40.4
@BootCache	40
@!AFSCompression.!AFSCompressionTypeZlib	1.0.0
@!AFSCompression.!AFSCompressionTypeDataless	1.0.0d1
@filesystems.apfs	1933.41.2
>!ASDXC	3.1.1
>AirPort.BrcmNIC	1400.1.1
|!ABCM5701Ethernet	11.0.0
>!AAHCIPort	351
@private.KextAudit	1.0
>!AACPIButtons	6.1
>!ARTC	2.0.1
>!ASMBIOS	2.1
>!AACPIEC	6.1
>!AAPIC	1.7
@!ASystemPolicy	2.0.0
@nke.applicationfirewall	402
|IOKitRegistryCompatibility	1
|EndpointSecurity	1
@Dont_Steal_Mac_OS_X	7.0.0
@kec.!AEncryptedArchive	1
@kext.triggers	1.0
@kext.AMDRadeonX4200HWLibs	1.0
@kext.AMDRadeonX4000HWServices	4.0.7
>DspFuncLib	283.15
@kext.OSvKernDSPLib	529
>!AThunderboltEDMSink	5.0.3
>!AThunderboltDPOutAdapter	8.5.0
@kext.AMDSupport	4.0.7
>!UAudio	412.8
>!AAudioClockLibs	100.9.1
>!ABacklightExpert	1.1.0
|IONDRVSupport	593
>!AGraphicsControl	6.4.9
>IOPlatformPluginLegacy	1.0.0
>X86PlatformPlugin	1.0.0
>IOPlatformPlugin!F	6.0.0d8
>!AHDA!C	283.15
|IOHDA!F	283.15
|IOAudio!F	300.10
@vecLib.kext	1.2.0
>!ASMBus!C	1.0.18d1
>!ASMBusPCI	1.0.14d1
|IO!BSerialManager	9.0.0
|IO!BPacketLogger	9.0.0
|IO!BHost!CUSBTransport	9.0.0
|IO!BHost!CUARTTransport	9.0.0
|IO!BHost!CTransport	9.0.0
>IO!BHost!CPCIeTransport	9.0.0
|IOAVB!F	1010.2
@plugin.IOgPTPPlugin	1000.11
|IOEthernetAVB!C	1.1.0
|CSR!BHost!CUSBTransport	9.0.0
|Broadcom!BHost!CUSBTransport	9.0.0
|Broadcom!B20703USBTransport	9.0.0
>!AIPAppender	1.0
@!AGPUWrangler	6.4.9
|IOSlowAdaptiveClocking!F	1.0.0
|IOAccelerator!F2	462.4
@!AGraphicsDeviceControl	6.4.9
|IOGraphics!F	593
>!AHS!BDriver	5010.1
>IO!BHIDDriver	9.0.0
>!AMultitouchDriver	5400.25
>!AInputDeviceSupport	5400.30
>!AHIDKeyboard	228
>usb.IOUSBHostHIDDevice	1.2
>usb.cdc	5.0.0
>usb.networking	5.0.0
>usb.!UHostCompositeDevice	1.2
>!AThunderboltPCIDownAdapter	4.1.1
>!AThunderboltDPInAdapter	8.5.0
>!AThunderboltDPAdapter!F	8.5.0
>!AHPM	3.4.4
>!A!ILpssI2C!C	3.0.60
>!A!ILpssI2C	3.0.60
>!A!ILpssDmac	3.0.60
>!ABSDKextStarter	3
|IOSurface	302.9
@filesystems.hfs.encodings.kext	1
>!AXsanScheme	3
>!AThunderboltNHI	7.2.8
|IOThunderbolt!F	9.3.2
|IOAHCIBlock!S	333
|IO80211!FLegacy	1200.12.2b1
|IOSkywalk!F	1.0
>corecapture	1.0.4
>mDNSOffloadUserClient	1.0.1b8
|IOAHCI!F	295
>!A!ILpssGspi	3.0.60
>usb.!UXHCIPCI	1.2
>usb.!UXHCI	1.2
>usb.!UHostPacketFilter	1.0
|IOUSB!F	900.4.2
>!AEFINVRAM	2.1
>!AEFIRuntime	2.1
|IOSMBus!F	1.1
|IOHID!F	2.0.0
|IOTimeSync!F	1000.11
|IONetworking!F	3.4
>DiskImages	493.0.0
|IO!B!F	9.0.0
|IOReport!F	47
$quarantine	4
$sandbox	300.0
@kext.!AMatch	1.0.0d1
|CoreAnalytics!F	1
>!ASSE	1.0
>!AKeyStore	2
>!UTDM	532.40.7
|IOUSBMass!SDriver	209.40.6
|IOSCSIBlockCommandsDevice	452.30.4
|IO!S!F	2.1
|IOSCSIArchitectureModel!F	452.30.4
>!AMobileFileIntegrity	1.0.5
$!AImage4	4.1.0
@kext.CoreTrust	1
>!AFDEKeyStore	28.30
>!AEffaceable!S	1.0
>!ACredentialManager	1.0
>KernelRelayHost	1
|IOUSBHost!F	1.2
>!UHostMergeProperties	1.2
>usb.!UCommon	1.0
>!ABusPower!C	1.0
>!ASEPManager	1.0.1
>IOSlaveProcessor	1
>!AACPIPlatform	6.1
>!ASMC	3.1.9
|IOPCI!F	2.9
|IOACPI!F	1.4
>watchdog	1
@kec.pthread	1
@kec.Libm	1
@kec.corecrypto	12.0
```