Can't restart or power-off

I am on Fedora 40 with the 6.8.11 kernel, using X11, KDE Plasma Version: 6.0.5, KDE Framework Version: 6.3.0, Qt Version: 6.7.1. For whatever reason, I can’t restart or power-off, I just hear the log-out sound and the display goes black. I can still see the mouse pointer and if, for instance, the Updates app is open it stays visible as well. This means I can only power-off by going in a different session and hitting shutdown -h now… By the way, this happens only with X11, on wayland it shutsdown properly.

Looking at journalctl --user-unit plasma-plasmashell.service I can see the following

Jun 11 22:04:17 fedoramachine systemd[1664]: Stopping plasma-plasmashell.service - KDE Plasma Workspace...
Jun 11 22:04:17 fedoramachine plasmashell[2189]: kf.plasma.quick: Couldn't create KWindowShadow for NotificationPopup_QMLTYPE_455_QML_493(0x55a7a39bd3f0)
Jun 11 22:04:17 fedoramachine plasmashell[2189]: kf.plasma.quick: Couldn't create KWindowShadow for NotificationPopup_QMLTYPE_455_QML_493(0x55a7a39bd3f0)
Jun 11 22:04:17 fedoramachine plasmashell[2189]: kf.plasma.quick: Couldn't create KWindowShadow for NotificationPopup_QMLTYPE_455_QML_493(0x55a7a39bd3f0)
Jun 11 22:04:17 fedoramachine plasmashell[2189]: The X11 connection broke (error 1). Did the X11 server die?
Jun 11 22:04:17 fedoramachine systemd[1664]: plasma-plasmashell.service: Main process exited, code=exited, status=1/FAILURE
Jun 11 22:04:17 fedoramachine systemd[1664]: plasma-plasmashell.service: Failed with result 'exit-code'.
Jun 11 22:04:17 fedoramachine systemd[1664]: Stopped plasma-plasmashell.service - KDE Plasma Workspace.
Jun 11 22:04:17 fedoramachine systemd[1664]: plasma-plasmashell.service: Consumed 59.806s CPU time.

and in sudo journalctl -b -1 -p3

Jun 11 22:04:18 fedoramachine dbus-broker-launch[1035]: Activation request for 'org.freedesktop.nm_dispatcher' failed.
Jun 11 22:04:18 fedoramachine dbus-broker-launch[1035]: Activation request for 'org.freedesktop.nm_dispatcher' failed.
Jun 11 22:04:18 fedoramachine dbus-broker-launch[1035]: Activation request for 'org.freedesktop.nm_dispatcher' failed.

See: 488187 – CVE-2024-36041 patches in 6.0.5.1 break shutdown/restart on X11