Reset drm device into text mode on tty switch
This commit is contained in:
parent
5725d1bb34
commit
2294e79814
|
@ -615,6 +615,21 @@ impl<A: ControlDevice + 'static> SessionObserver for StateToken<DrmDevice<A>> {
|
|||
return;
|
||||
}
|
||||
}
|
||||
for (handle, &(ref info, ref connectors)) in device.old_state.iter() {
|
||||
if let Err(err) = crtc::set(
|
||||
&*device.context,
|
||||
*handle,
|
||||
info.fb(),
|
||||
connectors,
|
||||
info.position(),
|
||||
info.mode(),
|
||||
) {
|
||||
error!(
|
||||
device.logger,
|
||||
"Failed to reset crtc ({:?}). Error: {}", handle, err
|
||||
);
|
||||
}
|
||||
}
|
||||
device.active = false;
|
||||
if device.priviledged {
|
||||
if let Err(err) = device.drop_master() {
|
||||
|
|
Loading…
Reference in New Issue