Mutter does not deal well with a "GPU" being unplugged
I've been testing a GNOME3 Wayland session with an external USB display (a micro projector using the gm12u320 chipset). Just like udl devices the kernel driver for this (which is a modified copy of the udl driver) registers itself as a dri-card with only kms features.
This works well with a GNOME3 Wayland session until I unplug the device. When I unplug the device mutter keeps it open (cannot rmmod the module) and still thinks that the GPU is there, including still thinking the extra monitor is there. I can e.g. move Windows there, and the monitor is still shown in the Display Settings of the control-center.
When I try re-plugging the projector mutter crashes shortly afterwards.
If you can give me some pointers where to look I can try to fix this myself.
Unplugging (and replugging) works fine with a Xorg session, so I believe that this is not an issue with the kernel driver.