When system is waking up from S3 sleep and Nvidia driver calls nvkms_open() after calling drm_master_open(), the driver fails to handle return value -EINTR. Instead of repeating the call to nvkms_open() (as expected for an interrupted syscall) the driver proceeds to return failure for the Xorg call to EnterVT() instead.
See https://forums.developer.nvidia.com/t/xorg-crashes-on-resume-from-deep-sleep-nvidia-gpu-0-failed-to-acquire-modesetting-permission/380031/9?u=mikko.rantalainen for details.
As I don't have the source code for the driver, I've been debugging this with bpftrace and according to that, the driver never retries call to nvkms_open() after receiving -EINTR and Xorg immediately crashes/aborts as a result after single -EINTR return value from nvkms_open().
When system is waking up from S3 sleep and Nvidia driver calls
nvkms_open()after callingdrm_master_open(), the driver fails to handle return value-EINTR. Instead of repeating the call tonvkms_open()(as expected for an interrupted syscall) the driver proceeds to return failure for the Xorg call toEnterVT()instead.See https://forums.developer.nvidia.com/t/xorg-crashes-on-resume-from-deep-sleep-nvidia-gpu-0-failed-to-acquire-modesetting-permission/380031/9?u=mikko.rantalainen for details.
As I don't have the source code for the driver, I've been debugging this with
bpftraceand according to that, the driver never retries call tonvkms_open()after receiving-EINTRand Xorg immediately crashes/aborts as a result after single-EINTRreturn value fromnvkms_open().