When my (desktop) Kubuntu goes in sleep mode (after about 10 minutes) it takes ages for the screen to restart and always the computer seems to restart. After having entered my password, I can see in the task bar that Plasma had to be restarted (several times?).
When your PC goes to sleep, the graphics driver can forget what was in video memory.
Plasma then has to rebuild everything from scratch when you wake it up, so the screen stays black for ages and you get that Plasma was restarted pop-up.
Tell NVIDIA to remember its stuff
# Turn on NVIDIA’s sleep/wake helpers
sudo systemctl enable nvidia-suspend.service nvidia-resume.service nvidia-hibernate.service
# Ask the driver to keep its video-memory
echo 'options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp' \
| sudo tee /etc/modprobe.d/nvidia-preserve-vram.conf
# Rebuild boot files and reboot
sudo update-initramfs -u
sudo reboot
1.Translation: Don’t dump my VRAM while I’m asleep.
2.Start Plasma with a clean slate
Go to System Settings - Startup & Shutdown - Desktop Session .
Set On login to Start with an empty session .This stops Plasma’s restore last session feature from tripping over itself after suspend.
After these two tweaks your Kubuntu machine should wake up within a few seconds, minus the annoying black screen and restart messages.