[systemd-devel] logind: multiseat without framebuffer graphic cards

Oleg Samarin osamarin68 at gmail.com
Thu Nov 22 11:04:10 PST 2012


В Ср., 21/11/2012 в 20:23 +0100, Lennart Poettering пишет:

> I think there are other ways thinkable, where we don't have to add
> explicit nvidia-compatibility switches. For example, instead of
> explicitly watching for fb devices to show up before we consider a seat
> to be around, we could instead look for devices that are tagged with a
> special tag ("tag" as in udev's TAG= construct) -- we'd then tag all fb
> devices out-of-the-box this way, and people who want to use the nvidia
> binary driver can attach that tag to some kernel device the nvidia
> driver exposes, but I wouldn't have to care about that, and systemd
> upstream wouldn't need to know what people do locally. And maybe you
> could even convince Nvidia to ship the udev rule that attaches this tag
> in their drivers. By doing things this way we'd not introduce the race
> that your patch would introduce, but we'd not hardcode anything directly
> to fb devices.
> 
> Note that in systemd we generally try to fix this things properly, and
> not work-around things. Now, your global swicth didn't appear as a
> "proper fix" to me, due to the race issues. But the solution with a udev
> tag otoh sounds like a worthwile fix that makes logind cleaner -- and
> which as a side-effect allows you to integrate things with your nvidia
> driver.
> 
> Does that make some sense?

OK. So we need two changes:

(1). Introduce a new udev tag that means "master device" for the seat.
Support it with logind.c. Add an udev rule that sets this tag for all
framebuffer device

(2). multi-seat-x should not trigger an error if there is no framebufer
device exist on the seat. It is a temporary stuff until X can get device
from -seat, so it may look for a specially named config file or just
start X without any addition parameters (or with -sharevts only)

This saturday I will be capable of creating some patch for (1). My
questions:

1. Which tag name would be better? "construct"? "seatmaster"? Something
else?

2. What should be right behavior if there are two or more seat masters
in a seat? Create a seat if any of them exists and remove the seat if
there are no more seat-masters on the seat?

Oleg.




More information about the systemd-devel mailing list