simpledrm, running display servers, and drivers replacing simpledrm while the display server is running
Hi
I know this isn't an actual protocol, but I feel like this is probably the most relevant place, other than opening in issue for every compositor
This started with this report against mutter/gdm https://gitlab.gnome.org/GNOME/mutter/-/issues/2909 first. The issue is that drivers like amdgpu
are now taking a bit longer to start, and where simpledrm is available, the display server starts using it. But then when the real driver finishes loading, it kicks out simpledrm's /dev/dri/card0, and it leaves the compositor in an inconsistent state
It was worked around in GDM with a hard coded timeout, which might not be 100% the best solution, especially for users on systems that fall back to SimpleDRM now have to wait 8 more seconds,
There was some discussion about this earlier in multiple places
https://github.com/sddm/sddm/issues/1917 to SDDM, suggesting SDDM should do the same thing
Here drm/amd#3341 (closed) was the initial report against the AMD GPU driver
Here https://github.com/systemd/systemd/issues/32509 saying maybe the timeout should be in udev
and here in LKML asking if there was anything the kernel/simpledrm should do https://lore.kernel.org/dri-devel/9215788.EvYhyI6sBW@nerdopolis2/ but it came down to suggesting that the user space greeters themselves need to support primary GPU hotswap
This impacts every one I tested. Wlroots based ones, Mir, Weston, Mutter, and kwin. (KDE handles it the best, but only because of the cool compositor reloading). Could not test Enlightenment anymore, but I assume that one too.
To replicate, I did so on a VM with virtio as the gpu, booted with modprobe.blacklist=virtio_gpu
, ensuring simpledrm works, and then when the compositor is running, running modprobe virtio-gpu
Many hang, kwin if I start it directly, without the session proxy thing, kwin detects the primary GPU going away, and it quits.
In the terms of greeters, if swapping out the primary GPU is too difficult, exiting might be better, because then the login manager would at least be able to restart the greeter.
Thanks