Cannot suspend after some time of idle

High!

I’m using arch linux with kernel ‘4.13.8-1-ARCH’, systemd 235 and nvidia 387.12-2 driver. After some time of idle and/or gpu activity the suspend feature becomes broken.

After doing some gpu actions (playing game or watching gpu accelerated video) system doesn’t go to sleep (I haven’t found the exact steps to reproduce). systemctl suspend outputs the following: “Failed to suspend system via logind: There’s already a shutdown or sleep operation in progress”. If I run systemctl shutdown -f the system goes suspend first, than I wake it up and it shuts down. I face it with proprietary drivers(tried 384 and 387) and maybe since systemd 235. My graphics card is 1060. dmesg and syslog doesn’t output any errors. Does anyone has the same problem?

Currently I’m using nouveau driver and everythong works well.
nvidia-bug-report.log.gz (119 KB)

It seems that this issue was closely related to lightdm and light-locker. light-locker switches VT to lightdm’s one and suspend action is going on in parallel. Seems nvidia cannot handle this correctly.