Bug 89756

Summary: xorg.conf devices don't get re-enabled after VT switch
Product: xorg Reporter: Peter Hutterer <peter.hutterer>
Component: Server/Input/CoreAssignee: Hans de Goede <jwrdegoede>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: peter.hutterer
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 89653    
Attachments:
Description Flags
[PATCH] Re-enable non serverfd input devices immediately on vtenter none

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
Hi,

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?

Regards,

Hans
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.