On Thu, 28.05.15 13:25, Mario Limonciello (mario_limoncie...@dell.com) wrote:
> > On 05/28/2015 11:48 AM, Lennart Poettering wrote: > >On Wed, 27.05.15 15:59, Mario Limonciello (mario_limoncie...@dell.com) wrote: > > > >You are aware that the kernel has PCI hotplug support? It sounds > >really weird rebooting the machine due to hotplug events. That's not > >how these things are done... > > > >Are you sure the kernel folks would be happy with a patch that > >chickens out and instead of proper PCI hotplug just always reboots? > > > >Also, why map this to input events at all? If it's really deemed OK to > >do such a weird reboot-on-unplug logic, then this should probably be a > >uevent or so... > > > >But generally, this all appears very questionnable to me... > > > >Lennart > > > Hi Lennart, > > Yes, I'm aware that PCI hotplug support is in the kernel. The kernel > doesn't panic on the PCIe device being removed from the bus, but the > graphics driver and X don't continue working. What should you really do > then? You can ask AMD and NVIDIA to fix the drivers and work with the X > guys to handle the scenario cleanly, but what does that even mean? Hotplug graphics cards are not precisely new. This has been supported on Linux just fine for USB graphics cards, and why should PCI be any different? There are many better strategies for handling graphics card unplug than simply rebooting the system. A very simple one that is already vastly better is to simply let X die, and rely on gdm to bring up a new login. A much better one is to use a display server that actually has a sane strategy and can recover from graphics cards coming and going away. That's absolutely noch rocket science. Either way: simply rebooting is a completely weird choice. That's not how things are done on Linux. > You can't guarantee that there is another GPU to display things on. > X's architecture isn't cut out for GPU's disappearing and > reappearing. Of course it is, see the support for USB graphics chips. And even if it wasn't: as long as the X server just dies userspace can still restart it with new gfx config in place. It's just wrong hardcoding your (incorrect) assumptions about supposedly crappy userspace into the kernel. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel