I'm facing a frustrating issue with my computer where it completely freezes up whenever I try to put it into sleep mode. I've looked around for solutions, but most of them don't apply to my situation or they haven't worked for me. I have a setup with KDE Plasma and Wayland on CachyOS, and here are my specs: B760 DS3H AC DDR4, Intel Core i7-13700KF, NVIDIA RTX 4070, and 24GB DDR4. One odd thing is that the fans continue running even though I thought my PC was capable of using S3 sleep mode. I can't find the S3 option in BIOS, and I'm starting to wonder if I'm misremembering my previous settings. Has anyone experienced this and found a solution?
2 Answers
You might want to try a couple of commands to fix the freezing after waking up. First, run this command: `sudo echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" >> /etc/modprobe.d/nvidia-options.conf`. This helps prevent glitches after waking from sleep. Then, make sure to install `nvidia-suspend-common` if you haven't already. After that, enable the necessary services by running these commands:
```
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service
```
Don't forget to restart your PC after making these changes! This issue has appeared in both Debian and Arch documentation, so it's worth trying out.
Have you considered just turning off the PC instead of putting it to sleep? I know it’s not ideal, but it might simplify things for you. Just power it off and then on when you need it. Sometimes keeping it simple is the best way to go!

I tried that first command, but I got a warning about permissions being denied. Any tips on fixing that? And where can I find `nvidia-suspend-common`? I'm feeling kind of lost here.