[570] [565] KDE / Plasma (X11) non functional after resuming from suspend with GeForce GTX 1650

I have a partial workaround by stopping plasmashell and kwin before suspend and starting them again on resume. Still not satisfying because the start phase takes a dozen of seconds and some taskbar items are shuffled because of the plasmashell restart.

However, for those interested, you can put the following in an executable file in /usr/lib/systemd/system-sleep :

#!/bin/bash

case "$1" in
  pre)
    for user in $(loginctl list-users | grep -E "active|online" | cut -d " " -f 2); do
      systemctl --user --machine="$user@" stop plasma-plasmashell.service plasma-kwin_x11.service
    done
    ;;
  post)
    for user in $(loginctl list-users | grep -E "active|online" | cut -d " " -f 2); do
      systemctl --user --machine="$user@" start plasma-kwin_x11.service plasma-plasmashell.service
    done
    ;;
esac

Since kwin fails to properly stop and has to be killed, you will speed up the suspend operation by setting in /etc/systemd/user/plasma-kwin_x11.service.d/override.conf :

[Service]
TimeoutStopSec=5