[PATCH 2/2] systemd-logind: Fix vt-enter not working when using a legacy video driver
Peter Hutterer
peter.hutterer at who-t.net
Sun Mar 9 23:10:51 PDT 2014
On Fri, Mar 07, 2014 at 11:22:34AM +0100, Hans de Goede wrote:
> 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.
I think 2) is safe enough to assume for the default setup, though I wonder
what would happen on a server without input devices.
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Cheers,
Peter
>
> Signed-off-by: Hans de Goede <hans at localhost.localdomain>
> ---
> 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 abb8e44..a8406d8 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;
> }
> --
> 1.9.0
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
More information about the xorg-devel
mailing list