Xorg spikes 100 percent CPU, very slow in redraw after unlocking screensaver (light-locker/lightdm)

If I let my computer go idle, either by directly locking the screen with light-locker, or letting light-locker time out and lock the screen, when I unlock the system with the lightdm greeter, all I will see is my urxvt terminal window with no text, my xfce panel completely blank, and no other windows. The mouse cursor moves very jerky and slow. If I log into the system via SSH (changing to one of the other virtual terminals does not work), I see that Xorg has pegged one CPU at 100 percent.

If I let it sit and wait, it eventually comes back, and Xorg goes back to normal CPU usage. I don’t see anything in the Xorg.0.log which indicates a problem. The only reason I’m mentioning this on this forum is that changing to the nouveau driver doesn’t exhibit this exact problem. With nouveau I have issues with DPMS not working at all.

Here’s the output of nvidia-bug-report.sh: [url]http://filebin.ca/2iiHvgMX1iH7/nvidia-bug-report.log.gz[/url]

I have exactly the same problem.

Debian testing (bookworm)
XFCE 4.16
Kernel 5.17.0-1
nvidia-driver 470.103.01-3

Graphics card: GTX 1060 3GB

I just upgraded from Debian stable (bullseye) and a previous version of the nvidia-driver, but
nothing changed.

I found some others saying it’s a problem with the combination of having an nvidia-driver and the lightdm session manager in xfce4. Apparently if you can install xfce4-screensaver (found on Ubuntu, but not Debian) or xscreensaver as a replacement, that solves the problem.