Skip to content
  • Jocelyn Falempe's avatar
    xf86/logind: Fix drm_drop_master before vt_reldisp · 8eb1396d
    Jocelyn Falempe authored and Povilas Kanapickas's avatar Povilas Kanapickas committed
    
    
    When switching to VT, the ioctl DRM_DROP_MASTER must be done before
    the ioctl VT_RELDISP. Otherwise the kernel can't change the modesetting
    reliably, and this leads to the console not showing up in some cases, like
    after unplugging a docking station with a DP or HDMI monitor.
    
    Before doing the VT_RELDISP, send a dbus message to logind, to
    pause the drm device, so logind will do the ioctl DRM_DROP_MASTER.
    
    With this patch, it changes the order logind will send the resume
    event, and drm will be sent last instead of first.
    so there is a also fix to call systemd_logind_vtenter() at the right time.
    
    Signed-off-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    (cherry picked from commit da9d012a)
    8eb1396d