Bug 208239

Summary: Need some method for user-space to exclude an arbitrary keyboard device from VT input for multiseat
Product: Drivers Reporter: bluescreen_avenger
Component: OtherAssignee: other_other
Status: NEW ---    
Severity: low    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.6.0 Subsystem:
Regression: No Bisected commit-id:

Description bluescreen_avenger 2020-06-18 12:58:23 UTC
Hi

So I reported https://github.com/systemd/systemd/issues/15387 against systemd, but I am thinking/told it might be a kernel level issue, or something that needs to be added.

The problem is that if you have two cards, say an Intel and a USB DisplayLink, (The Intel is where the VT terminal appears on), you set up two logind seats, run two instances of different Display Servers on them, (say Weston) and the keyboard input for the two Display Servers are confined properly. All is fine if you don't use the VT subsytem.

However if you switch TTYs, and continue typing on the keyboard for the second seat, the text input gets sent to both the display server running on /dev/dri/card1 , and the VT, which means that if it was another user on the second seat, their input is getting leaked

Since I think "seats" are probably a logind abstraction, the best that would be needed is probably some kind of special lock to allow a user space way to allow a particular keyboard from being excluded from providing input to the VT, until the process gives it up, or dies.

Unless I am missing something. I did read of EVIOCGRAB which works, but locks everything else out as well

Thanks