Hello,
I installed a fresh NixOS on LVM on a L490i7 connected to a Lenovo Pro Dock and (one or two) PD2700U (4K).
It happens a lot that the display freezes and after 1 or 2 seconds the mouse appears on a different position (due to movement while the display is frozen).
Other strange behavior appears with the cursor which doubles the size (e.g. in falkon browser when coming from the top display and reaching a browser tab).
I tried to stop animations (not yet fully successful) and would like to get some hints what let NixOS behave with issues regarding the display.
I see weirdest issues with ThinkPad and docking, might be also hardware/firmware glitch.
Do you see something on dmesg (a.k.a. kernel logs) after this happens?
Regarding the mouse, install powertop and start sudo powertop. Then, with tab, navigate to “Tunables” and search for your mouse. If you see “Good” in front of your mouse, try changing that to “Bad” with enter. This might prevent your mouse from sleeping.