Panic: Graphics firmware encountered an exception
Setting up new 2020 MacBook Air macOS Catalina 10.15.4 (19E287) and experienced unexpected shutdowns when sleep initiated.
Spoke with Apple support, suggested turning off hard disk sleep, Power nap in and turning on prevent computer from sleeping automatically when display is off in Energy Saver settings.
Did not solve issue.
Followed this thread
https://discussions.apple.com/thread/8515132
and turned on DND when screen is locked, ran First Aid from Disk Utility in restore mode
Did not solve issue.
Noticed keyboard entries intermittently not recognized when typing, delayed input. Thought their might be some process happening that was affecting user interface.
Ran Activity Monitor and noticed lots of activity with Photos. Thousands of photos were being uploaded to iCloud as part of setup.
Turned off iCloud photos in Photos Preferences
Panic crash on sleep not repeated. Keyboard typing normal.
Problem solved?
I think so.
Will update if not.
MacBook Air 13", macOS 10.15