Manjaro KDE screen freezes when closing laptop

Welcome the Manjaro community @galyxy

First, please don’t start multiple support topics for the same issue. Your duplicate topic has been closed.

Is that the actual command you ran? If it is, it won’t work as there are two typos in it: you are missing echo at the start, and also need a space between sudo & tee. The correct command would be:

echo kernel.sysrq=1 | sudo tee --append /etc/sysctl.d/99-sysctl.conf

If you want to check if the changes were written to the /etc/sysctl.d/99-sysctl.conf file, you can view its contents by running the following command:

cat /etc/sysctl.d/99-sysctl.conf

Have you tested to see if the issue also occurs in a Plasma Wayland session?

You can change your Plasma session from X11 to Wayland by selecting the session type at the login screen (Wayland is now KDE’s default for Plasma).

If you have set up autologin to skip the password screen, you can change to a Wayland session by opening System Settings → Colors & Themes → Login Screen (SDDM) → Behavior.