I just installed Kubuntu 25.04 on my laptop and started running into an issue. It started when I tried to load Spectacle to take a screenshot. Spectacle froze and so did my panel, but I could still hit Alt+F2 to open new programs. I could also use Alt+Tab to switch between non-frozen programs. I couldn’t get Spectacle’s window to close, but I could use a Konsole to restart the computer:
sudo reboot now
But I didn’t really want to restart every time this happened. I was hoping for an option to just reset the Plasma desktop. I did some searching and finally found an option that works.
Step 1: Open a Konsole.
Step 2: Use the following code:
kwin_wayland --replace
To make this even easier, I created a new Application in my Application menu called “restartwayland”. In the Program field, I included “kwin_wayland” and in the Command-line arguments field I included “–replace.” Now, when everything starts freezing, I can hit Alt+F2 and just type in “restartwayland” and hit Enter. It kills the current session but restarts it immediately.
FYI, this command doesn’t keep your programs up and running. They are forced to close. But it prevents me from having to restart my computer.