From 749d25f6f0faed00a4cd906171ea6f96d76591e7 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 7 Mar 2014 04:59:47 -0500 Subject: [PATCH] systemd-logind: Fix vt-enter not working when using a legacy video driver If there is only a single non kms video device (tested with the vesa driver), then we will never get a resume signal for a drm node, so also call vtenter when we get a resume for an input device. Notes: 1) vtenter checks if it is ok to do the vtenter, so if there are kms video devices the calls for input device resumes are a nop 2) This assumes that there will always be at least one server event fd supporting input device. Since all non legacy input-drivers will be patched to supported server fds this seems a safe assumption. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer --- hw/xfree86/os-support/linux/systemd-logind.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c index abb8e44d9..a8406d8be 100644 --- a/hw/xfree86/os-support/linux/systemd-logind.c +++ b/hw/xfree86/os-support/linux/systemd-logind.c @@ -347,7 +347,6 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data) if (pdev) { pdev->flags &= ~XF86_PDEV_PAUSED; - systemd_logind_vtenter(); } else { pInfo->fd = fd; @@ -355,6 +354,8 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data) if (info->vt_active) xf86EnableInputDeviceForVTSwitch(pInfo); } + /* Always call vtenter(), in case there are only legacy video devs */ + systemd_logind_vtenter(); } return DBUS_HANDLER_RESULT_HANDLED; }