Bug 89756 - xorg.conf devices don't get re-enabled after VT switch
Summary: xorg.conf devices don't get re-enabled after VT switch
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Hans de Goede
QA Contact: Xorg Project Team
Depends on:
Blocks: 89653
  Show dependency treegraph
Reported: 2015-03-25 04:03 UTC by Peter Hutterer
Modified: 2017-02-03 03:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

[PATCH] Re-enable non serverfd input devices immediately on vtenter (1.47 KB, patch)
2015-04-08 12:09 UTC, Hans de Goede
no flags Details | Splinter Review

Description Peter Hutterer 2015-03-25 04:03:14 UTC
Start a systemd-logind enabled server with xorg.conf with AutoAddDevices off and a mouse + kbd driver device. server is suid root.

systemd_logind_controls_session() returns 1 if systemd can be initialized, but the devices are /dev/tty and /dev/input/mice. After a VT switch, xf86VTEnter() skips over the xf86EnableInputDeviceForVTSwitch() loop and leaves us with dead devices.
xinput enable <device> restores the devices. 

Not 100% sure what we should do there. Maybe check the driver flags for server FD support? Or probably better: remember which devices were opened by systemd-logind and re-enable all but those.
Comment 1 Hans de Goede 2015-03-25 08:39:31 UTC

Making xf86VTEnter enable non server-fd enabled devices on vtenter certainly is possible, but TBH I would really like to see people just stop using these drivers on what is otherwise a brand new Linux install (since it is systemd-logingd enabled). So I'm tempted to just refuse to load non server-fd enabled drivers when systemd-logind is enabled. What do you think?


Comment 2 Hans de Goede 2015-04-08 12:09:32 UTC
Created attachment 114955 [details] [review]
[PATCH] Re-enable non serverfd input devices immediately on vtenter

Here is the patch which I've just sent to xorg-devel which fixes this.
Comment 3 Peter Hutterer 2017-02-03 03:50:53 UTC
commit 21e7d2bb5cd810688bb905b6ed092497ca8a2c59

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.