Crashes using XFCE + Nvidia drivers when using two monitors

This crash is a full system lock, can only ssh remotely, can’t ctrl alt f3 or anything to get into TTY. If I boot with both monitors connected it usually happens a few seconds after the desktop loads. If it doesn’t trigger it will trigger either when I connect my external monitor, or if I try to run nvidia-settings.

This happens only on XFCE and not other DEs. For testing you can use the live USB of Manjaro since it includes an option for pre-installed Nvidia drivers. (it acts exactly the same as an installed system).

  1. Operating system version. Manjaro XFCE 21.05
    Nvidia bug report: Ubuntu Pastebin

  2. Graphics hardware.
    1060 Mobile 6gb

  3. Graphics driver version.

  4. Display Control Panel settings for screen resolution, monitor configs, and driver settings.
    Default generated by nvidia-xconfig.
    Internal Display 1080p120hz
    External 1440p144hz

Both are Gsync displays.

  1. Reproducer project.
    No project, happens when connecting external monitor, or when booting with two monitors connected. Only happens with XFCE and not KDE or Gnome.

  2. Description of single steps to reproduce the problem.
    Simply boot up the live usb of Manjaro XFCE or install Xubuntu (or any XFCE OS) with propitiatory NVIDIA drivers.

  3. Description of the expected result (screenshots if possible).
    As with other DE’s it shouldn’t lock up the system with dual monitors.

  4. If there is a crash in an NVIDIA module, the exact crash offset.
    There’s an error in the log file relating to a display timeout. At this moment xrandr seems to have crashed and isn’t accessible via ssh. Error:

Extra Detail:
I’m currently enjoying Manjaro with KDE but before had tried using the XFCE version. And before that I used Kubuntu, after falling to use Xubuntu.

I want to make XFCE work but whenever I use a distro based on it and install Nvidia drivers my system becomes unstable and freezes up with my second screen connected, either after a few seconds of booting up, or shortly after.

If I only use the integrated screen on my laptop this freeze never happens. I can repeat the problem by booting with an external display connected, or by plugging it in whilst already running. If I use nouveau drivers everything works fine.

I’ve spent so much time trying to work out the issue, but I’m dumbfounded because everything works fine when using KDE.

What could be different causing this issue?

I’ve tried drivers from the legacy v380 package up to latest v460 and it’s the same.

My computer is a HP Omen laptop and I’m using an external monitor via display port. Both integrated and external displays are gsync. The internal 1080p120. The external 1440p144.

Other specs: 16gb RAM, i7 8750H, GeForce 1060, 256gb NVME, Realtek LAN, Intel WiFi.

I’ve updated the system to the latest bios. Legacy boot and secure boot are both disabled.
Stock linux drivers don’t have this problem.