Slow Shutdown times with xorg

,

Hello !
I am using Manjaro with kde minimal and Xorg. I have an amd cpu and an nvidia gpu.
2 out of 5 times when I reboot, I get stuck on the black screen saying :

A stopjob is running (45sec/1min 30sec)

After some web searching I found out that is is a problem with the kwin_x11 failing to properly shutdown, as mentioned in https://www.reddit.com/r/ManjaroLinux/comments/oq2aez/fix_for_slow_shutdown_and_reboot_on_manjaro_kde/ reddit post.
According the op I need to make a script that runs on every shutdown which kills the kwin process before it hangs, hence letting the system shutdown normally.

My question is that is this workaround a viable solution AND will this cause ANY problems in my system ??

Here is the summary:

we need a script that kills the kwin process at /usr/lib/systemd/system-shutdown.
cd /usr/lib/systemd/system-shutdown > sudo touch kill_kwin.shutdown

Put these lines in the script.
#!/bin/sh

# Kill KWin immediately to prevent stalled shutdowns/reboots
pkill -KILL kwin_x11

Make the script executable.
chmod +x kill_kwin.shutdown

Create a systemd service at /etc/systemd/system
/etc/systemd/system > sudo touch kill_kwin.service

Put these lines in the file.
[Unit]
Description=Kill KWin at shutdown/reboot

[Service]
Type=oneshot
ExecStart=/bin/true
ExecStop=/bin/sh /usr/lib/systemd/system-shutdown/kill_kwin.shutdown
RemainAfterExit=true

[Install]
WantedBy=multi-user.target

Then enable the service.
sudo systemctl enable kill_kwin.service