Display doesn't turn on after waking up from sleep unless switched to a different tty and came back.

I am running Manjaro Cinnamon installed using the community ISO. I have NVIDIA RTX 4070 and use the proprietary NVIDIA driver. My kernel version is 6.6.32-1-MANJARO and nvidia driver video-nvidia version is 2024.05.03.

Whenever I turn on my PC after sleep, my display and monitor doesn’t turn on, even if I press some keys on the keyboard and move the mouse. But then if I switch to a different tty by pressing Ctrl+Alt+FunctionKeys then my monitor and display turns on and I can see the tty terminal, and then if I swtich back to tty7 then the GUI turns on and I can enter my password and unlock.

But everytime after entering my password and unlocking, my wallpaper disappears and is replaced by a full black color, but the desktop icons remain in place correctly. And in that state I often see some graphics glitches also, such as when I open any program such as the file manager or text editor, sometimes the window title bar and the window control buttons (maximize, close etc. buttons) disappear and the entire window title bar gets replaced by a black or white color or the background.

This problem has been happening since a big update 3-4 months ago. The update which broke the NVIDIA driver for many users due to EOL kernel. My NVIDIA driver broke then also and after searching the forums, I switched to tty and uninstalled the nvidia driver using mhwd, installed the new kernel, uninstalled the old EOL kernel, and again installed the nvidia driver using mhwd. And ever since then my screen doesn’t turn on after waking up from sleep, and that wallpaper problem is also happening since then. Before that update my PC could wake up from sleep and unlock just fine. I have recieved one or two big updates and kernel and nvidia driver updates after fixing my driver and kernel after that update which broke them, but still this problem didn’t get fixed after those new kernel and nvidia driver updates.

But I think this a big part of this problem might be cinnamon, cinnamon lock screen and cinnamon-screensaver related also rather than only a nvidia driver config related problem. How can I fix this, so that my screen and monitor turns on when I press the power button to wake up from sleep and after I enter my password and unlock, the wallpaper doesn’t disappear and the window title bar doesn’t glitch?