At some random points X.org locks up and does not respond to keyboard and mouse input. This usually happens after a considerable period of uptime (like a few days), during which the system is loaded with various desktop apps (web browser, email client, text editor, etc.), ffmpeg for video transcoding and occasional games via Wine/DXVK. The lock up may happen when the display is off for powersaving or when it is active. In any case, there is no particular user activity that leads to the problem, it just happens by itself at seemingly random points.
When the lock up happens, in the kernel log I can see a backtrace involving Nvidia kernel module and an error saying:
Xorg: page allocation failure: order:4, mode:0x40cc0(GFP_KERNEL|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0