NixOS monitor display issues with 4K or Docking - ThinkPad?

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.

Is there anything in GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks. that would help you?

What happens if you connect the monitor directly to the laptop?

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?

the log is quite clean except:

tpm tpm0: tpm_try_transmit: send(): error -5

I tried the t490 file but without success

with Ubuntu the same setup works fine (out of the box).

  • at the moment even nixos works ok (but I have issues to switch to a new configuration)

I check dmesg again and found:

ucsi_acpi USBC000:00: PPM init failed (-110)

Is there a NIXOS parameter or kernel extra to solve the usb(-c) error?

Hello Damien,

I tried to insert the t490 config

but all that works at the moment is nixos-rebuild boot and build (not switch)
https://discourse.nixos.org/t/nixos-rebuild-switch-vs-build-vs-boot-networkmanager-wait-online-service-fails/7720

  • I guess that the boot part has changed but don’t know how to proof that

At the moment with some other adjustments regarding the kernel and libinput parameter the freezing is gone in its dramatic way.

What do you mean? Everything works fine but switching to configuration causes problems?
Does X restart in the meantime?

I cannot nixos-rebuild switch while connected to the docking station.

the mouse now freezes differently.
it stops and wakes up on mouse click …

(booting takes now minutes …)

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.

Hello DamienCassou,
if I enable powertop in the configuration there is no (sudo) powertop.

It activated makes the system useless (e.g. with external usb Trackball).

Please install the powertop package without enabling the powertop module.

Thanks for your support.
It is already on “BAD” and the freezing was only when i activated powertop in services