starting from yesterday I'm in single player I have chat open(so I can leave things AFK) and after a while I tab back in then it would 1:my screen goes black and game crashes or 2:my screen goes black and completely restarts pc.
Related issues
Comments

Please could you attach the crash report which can be found in minecraft/crash-reports/crash-<DATE>-client.txt. If for some reason you cannot provide this, please attach the full launcher log which can be found in minecraft/launcher_log.txt. Supplying the team with this information would help them to determine what the problem is.
We do not have enough information to find the cause of this issue.
Please attach the crash report found in [minecraft/crash-reports/crash-<DATE>-client.txt|https://minecrafthopper.net/help/finding-minecraft-data-folder/]
here.
If you cannot find a crash report, please attach the full launcher log found in [minecraft/launcher_log.txt|https://minecrafthopper.net/help/finding-minecraft-data-folder/]
.
This issue is being temporarily closed as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Duplicate of MC-112780.

i didnt know about that other one

and i have the latest drivers for Invidia

i tried 1.17 and it was there as well

I also have this issue; it does not resemble MC-112780.
Sometimes the game hanges, sometimes it crashes and sometimes is just goes to 1 FPS until I restart my game.
The logs you provided show that you're experiencing MC-112780.
Thank you for your report!
However, this issue is Invalid.
This is a technical support issue; this site is for bug reports only. We do not have the resources to provide you with technical support.
Please contact Community Support for assistance and refer to this ticket (e.g. "I have reported this issue on Mojira as MC-XYZ.").
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

i have the latest drivers and different that that? and also i dont have it anymore now

i dont know how it fixed
ok just for more info just now i had my game on pause and tabbed out then tabbed back in after a couple of minutes then black screen and then pc doesa a reset and when it resets its like it did a safe reset because when it booted to windows it went blue screen then started to boot and everything went back to normal, so i don't know if its how i leave the game is how it crashes but i think its just random of how it crashes