USB-C External Monitor Causes NixOS to Switch from Wayland to X11 and Crash

I have been using NixOS for about a year. My primary system is a Gen 12 i7 laptop with a Nvidia 3070 GPU running Gnome with Wayland and has been very stable. Typically I use two screens specifically the inbuilt laptop panel and an external HDMI monitor connected via the Nvidia’s HDMI port. So far so good.

Recently I added a new external USB-C to displayport or HDMI monitor to my primary system. I did this to be able to have an additional screen. NixOS detects the monitor without any issues however I soon noticed three things:

  1. My system went from rock-solid to being prone to freeze and crash inconsistently when running with the new monitor.
  2. I noticed that prior to plugging in the monitor my system was correctly using Wayland. Once I plugged the USB-C monitor in the system automatically changed to X11.
  3. When I plugged the USB-C monitor in I was prompted to re-enter my user password.

For the moment I have reverted to working without the USB-C monitor connected but I would love to be able to use all three screens simultaneously.

I have tried a number of different USB-C connectors but in each case the results are the same. I have not made any changes to my configuration.nix file as the system initially appeared to just work with the new hardware (prior to me become aware of the issues).

I’m happy to provide relevant details and logs on request and would be immensely grateful if anyone can point me in the right direction to resolve this issue.

Thank you :upside_down_face: