Random freeze while using fedora 40

I got my workstation randomly freezed , ( keyboard works but the display is frozen ) , what i tried was making it sleep using shortcut (Fn + F11) , then login again and using
journalctl -p err -b
i found out this ,

Jun 13 10:59:46 fedora systemctl[1203]: Failed to start nvidia-powerd.service: Unit nvidia-powerd.service not found.
Jun 13 11:00:05 fedora gdm-password][2118]: gkr-pam: unable to locate daemon control file
Jun 13 11:00:06 fedora gdm[1406]: Gdm: on_display_added: assertion 'GDM_IS_REMOTE_DISPLAY (display)' failed
Jun 13 11:00:06 fedora systemd[2131]: Failed to start app-gnome-gnome\x2dkeyring\x2dpkcs11-2374.scope - Application launched by gnome-session-binary.
Jun 13 11:00:06 fedora systemd[2131]: Failed to start app-gnome-xdg\x2duser\x2ddirs-2407.scope - Application launched by gnome-session-binary.
Jun 13 11:00:07 fedora systemd[2131]: Failed to start app-gnome-user\x2ddirs\x2dupdate\x2dgtk-2622.scope - Application launched by gnome-session-binary.
Jun 13 11:00:09 fedora gdm[1406]: Gdm: on_display_removed: assertion 'GDM_IS_REMOTE_DISPLAY (display)' failed

i don’t have nvidia drivers installed.

neofetch :
OS: Fedora Linux 40 (Workstation Edition) x86_64
Host: ROG Strix G513RC_G513RC 1.0
Kernel: 6.8.11-300.fc40.x86_64
Uptime: 4 hours, 35 mins
Packages: 2205 (rpm), 14 (flatpak)
Shell: bash 5.2.26
Resolution: 1920x1080
DE: GNOME 46.2
WM: Mutter
WM Theme: Adwaita
Theme: Adwaita [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: gnome-terminal
CPU: AMD Ryzen 7 6800H with Radeon Graphics (16) @ 4.785GHz
GPU: AMD ATI Radeon 680M
GPU: NVIDIA GeForce RTX 3050 Mobile
Memory: 3412MiB / 15234MiB

This is probably the cause since you are trying to sleep and wake up with the nvidia RTX 3050 mobile GPU.

Try installing the nvidia drivers from rpmfusion then see if the same occurs.
https://rpmfusion.org/Howto/NVIDIA

Okay I will surely do that ,
Also I have secure boot enabled,
So should I first install the drivers and then sign them later ?
Using the steps given in HowTo/Secure boot
I prefer secure boot enabled.
Also can you please brief me about this GDM ( display ) if you know

First setup signing then build the drivers.

Set up signing by first installing akmods then follow the steps in the HowTo or by the steps in the file /usr/share/doc/akmods/README.secureboot.

Once the keys have been imported into the bios then install the nvidia drivers and they will be signed at the time of install.

thank you @computersavvy and @barryascott , now everything seems fine, also I have disabled secure boot and then installed nvidia drivers.

well, it happened again, and when i tried to sleep and then wake it up gnome login screen doesn’t appear , only a black screen asking for user and password , like without desktop environment, i got many different errors this time