Comment 48 for bug 1849084

Revision history for this message
Richard Baka (bakarichard91) wrote :

Hi khitschler,

I have the default Ubuntu 20.04 kernel and the freeze still occurs. My assumption about the correct behavior was wrong however I think I have just found a workaround could somebody you/somebody test it?

From here (by tbg - Admired ): https://forum.manjaro.org/t/kde-nvidia-screen-corruption-after-resume/60064/44

Apr '19
Here’s my latest version of a service to restart KDE Plasma after suspending, This version seems to work very well and unlike my last version this does not depend on crashing plasma so it doesn’t throw an error when executed.

Plasma Restart Service

With a root text editor create:

/etc/systemd/system/plasma-restart@.service
Service file contents:

#/etc/systemd/system/plasma-restart@.service
#sudo systemctl enable plasma-restart@$USER.service
#sudo systemctl start plasma-restart@$USER.service
#sudo systemctl stop plasma-restart@$USER.service
#sudo systemctl disable plasma-restart@$USER.service

[Unit]
Description=Plasma Restart Service
After=suspend.target
StopWhenUnneeded=yes

[Service]
User=%i
WorkingDirectory=/home/%i
Type=oneshot
Slice=user-%i.slice
RemainAfterExit=yes
ExecStart=/bin/bash -alc "sudo -Hiu %i pkill -ABRT plasmashell"

[Install]
WantedBy=suspend.target
Alias=plasma-restart@%i.service

Save the service file with root permissions, and exit the text editor.

Then, enable the service:

sudo systemctl enable plasma-restart@$USER.service
Then restart.

-----------------------------

Why this is not the default setting if it fixes even the NVIDIA problems?