udev: Try to detect virtual graphics and EFI better

Ray Strode requested to merge fix-udev-logic-with-simpledrm into main

With EFI and simpledrm we may end up booting without a card0 but with a card1 drm device. This defeats GDM's simplistic hybrid graphics check.

Also, our detection for virtio graphics wasn't working so well, because it wrote the results into an environment variable of a non-parent device.

This commit gets the detection logic working better for virt/efi setups.

Closes: #832 (closed)

Merge request reports