-
-
Save materemias/3ef8e7f6a1e0ee4440fc1cb802816e65 to your computer and use it in GitHub Desktop.
restart KDE Plasma on resume from sleep (helps with nvidia video memory corruption problems)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#~/.config/systemd/user/plasma-restart.service | |
#systemctl --user enable plasma-restart.service | |
#systemctl --user start plasma-restart.service | |
#systemctl --user status plasma-restart.service | |
#systemctl --user stop plasma-restart.service | |
#sudo loginctl enable-linger <username> | |
#systemctl --user daemon-reload | |
#systemctl --user daemon-reexec | |
[Unit] | |
Description=Restart plasmashell after resuming | |
After=suspend.target | |
StopWhenUnneeded=yes | |
[Service] | |
User=root | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'kquitapp5 plasmashell' | |
ExecStop=/usr/bin/sudo -u $USER /bin/bash -lc 'plasmashell > /dev/null 2>&1 & disown; sleep 2; exit' | |
[Install] | |
WantedBy=sleep.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment